performs logout using the API (#51596) (#51693)

This commit is contained in:
MadameSheema 2019-11-26 11:37:16 +01:00 committed by GitHub
parent 5d3d25c41a
commit 181f1df0b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,9 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { LOGOUT } from '../urls';
export const logout = (): null => {
cy.visit(`${Cypress.config().baseUrl}${LOGOUT}`);
cy.request({
method: 'GET',
url: `${Cypress.config().baseUrl}/logout`,
}).then(response => {
expect(response.status).to.eq(200);
});
return null;
};