Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-01-04 15:43:54 +0300
committerJulius Härtl <jus@bitgrid.net>2020-01-04 15:43:54 +0300
commitbd57f359cbdea0f435e4b041f239437682b63bf8 (patch)
tree32251e5bef5afd67a2e525381626fd2872e74e50 /cypress
parent7af53363b6919fa1af1cf8bf6c6846ff8fdb98b5 (diff)
Clear cookies for logout
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'cypress')
-rw-r--r--cypress/support/commands.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index a70605462..e29fefb9d 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -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)/
})
})