Skip to content

Conversation

@backportbot-nextcloud
Copy link

@backportbot-nextcloud backportbot-nextcloud bot commented Jan 5, 2022

⚠️ This backport had conflicts and is incomplete ⚠️

backport of #2039

@backportbot-nextcloud backportbot-nextcloud bot added the tests If you write them we ♥ you label Jan 5, 2022
@backportbot-nextcloud backportbot-nextcloud bot added this to the Nextcloud 22.2.4 milestone Jan 5, 2022
azul added 2 commits January 5, 2022 14:04
Use the new session feature to create and reuse sessions:
https://docs.cypress.io/api/commands/session

The first time `login` with a given name is called
the steps described in the login function are performed
and cookies and localstorage are cached.

The next time `login` is called with the same name
cookies and localStorage are restored and used again.

This allows us to keep fast test runs
while still separating the tests more cleanly.

The old logout command was broken because of the way
we used `Cypress.Cookies.defaults({ preserve })` before:

Cypress runs all the `cy.*` commands during initialization
and builds a list of commands that are then executed during the tests.
However `Cypress.Cookies.defaults` is evaluated when preparing the list
not while performing the actual steps.

Signed-off-by: Azul <azul@riseup.net>
Open the test.md file once and then check all the things.

Signed-off-by: Azul <azul@riseup.net>
@azul azul force-pushed the backport/2039/stable22 branch from 27119a0 to ef037fb Compare January 5, 2022 13:07
Copy link
Contributor

@azul azul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to push cypress/integration/share.spec.js by hand because the file had changed. Should be fine now though.

@azul azul merged commit 339d191 into stable22 Jan 5, 2022
@delete-merged-branch delete-merged-branch bot deleted the backport/2039/stable22 branch January 5, 2022 13:52
@skjnldsv skjnldsv mentioned this pull request Jan 7, 2022
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests If you write them we ♥ you

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants