Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When a user has no roles, logout on button click #830

Merged
leanneeliatra marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
if (Cypress.env('SECURITY_ENABLED')) {
it('Tests if no role button redirects to logout screen', () => {
cy.visit('/app/customerror/missing-role');

cy.contains('button', 'Logout').should('be.visible').click();

cy.intercept({
method: 'POST',
url: '/auth/logout',
});

cy.getElementByTestId('submit').should('contain.text', 'Log in');
});
}
Loading