-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
fix(cypress): Use visit instead of reload to avoid cypress error #52524
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
Conversation
Not 100% clear why the reload makes it flaky, but it seems related. My only guess is that with reload the details panel is already opened maybe? Signed-off-by: Côme Chilliet <[email protected]>
/backport to stable31 |
/backport to stable30 |
/backport to stable29 |
@@ -72,7 +72,7 @@ describe('files_sharing: Note to recipient', { testIsolation: true }, () => { | |||
createShare('folder', sharee.userId, { read: true, download: true, note: 'Hello, this is the note.' }) | |||
|
|||
// reload just to be sure | |||
cy.reload() | |||
cy.visit('/apps/files') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure as in the past Cypress did not do anything if it was already on that page.
Meaning it would not reload the page and in that case the following test is useless as it will always succeed.
Because we need a full reload to verify the UI is loaded correctly again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum.
Then should I leave both reload and then visit?
Or do I add a logout/login?
It seems to be more a problem of the file utils:
I guess the root cause is
|
Locally the error was it could not find the role "menu". So that matches the race condition you describe. Any idea how to fix it? |
Summary
cypress test
cypress/e2e/files_sharing/note-to-recipient.cy.ts
was failing a lot in CI. This is an attempt to fix that.Not 100% clear why the reload makes it flaky, but it seems related. My only guess is that with reload the details panel is already opened maybe?
Checklist