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