зеркало из https://github.com/nextcloud/text.git
Clear cookies for logout
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
7af53363b6
Коммит
bd57f359cb
|
@ -41,10 +41,15 @@ Cypress.Commands.add('login', (user, password, route = '/apps/files') => {
|
|||
})
|
||||
|
||||
Cypress.Commands.add('logout', () => {
|
||||
cy.get('#expanddiv li[data-id="logout"] a').then(logout => {
|
||||
if (logout) {
|
||||
cy.visit(logout[0].href)
|
||||
}
|
||||
Cypress.Cookies.defaults({
|
||||
whitelist: []
|
||||
})
|
||||
|
||||
cy.clearLocalStorage()
|
||||
cy.clearCookies()
|
||||
|
||||
Cypress.Cookies.defaults({
|
||||
whitelist: /^(oc|nc)/
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче