2020-11-22 20:50:07 +00:00
|
|
|
/*
|
2021-01-06 20:37:59 +00:00
|
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
2020-11-22 20:50:07 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
2020-07-16 09:22:53 +00:00
|
|
|
declare namespace Cypress {
|
|
|
|
interface Chainable {
|
|
|
|
/**
|
|
|
|
* Custom command to log the user out.
|
|
|
|
* @example cy.logout()
|
|
|
|
*/
|
2021-02-03 21:13:04 +00:00
|
|
|
logout(): Chainable<Window>
|
2020-07-16 09:22:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Cypress.Commands.add('logout', () => {
|
2021-12-25 15:44:24 +00:00
|
|
|
cy.getByCypressId('user-dropdown').click()
|
|
|
|
cy.getByCypressId('user-dropdown-sign-out-button').click()
|
2020-07-16 09:22:53 +00:00
|
|
|
})
|