Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cypress workspace test by setting default language #5143

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented Dec 17, 2023

📝 Summary

Some tests modify it - so set it to en in beforeEach.

Following the recommendataion of preparing everything
in beforeEach hooks
rather then reverting the changes in after hooks
so the state of failing tests can be inspected.

Includes a seperate commit to make use of createTestFolder and visitTestFolder commands.

🖼️ Screenshots of failure

🌏 Browser 💻 Console
grafik grafik

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • fixes tests - so no new tests or docs.

Some tests modify it - so set it to `en` in `beforeEach`.

Following the recommendataion of preparing everything
in `beforeEach` hooks
rather then reverting the changes in `after` hooks
so the state of failing tests can be inspected.

Signed-off-by: Max <[email protected]>
@max-nextcloud max-nextcloud force-pushed the test/fix-cypress-workspace branch 2 times, most recently from 26706dc to 4a4e7e7 Compare December 17, 2023 17:23
* `cy.openWorkspace()` and `cy.createDescription()`
  use the currently opened path now.
  They don't need any argument anymore.
  This also avoids duplicate page loads.
* Use 'testFolder' alias and `this.testFolder`
  instead of `currentFolder` variable.

Signed-off-by: Max <[email protected]>
Otherwise `this.testFolder` is not available
as `this` cannot be reassigned with arrow functions.

Signed-off-by: Max <[email protected]>
@juliusknorr juliusknorr merged commit ad331b6 into main Dec 18, 2023
35 checks passed
@juliusknorr juliusknorr deleted the test/fix-cypress-workspace branch December 18, 2023 07:36
@max-nextcloud
Copy link
Collaborator Author

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants