-
Notifications
You must be signed in to change notification settings - Fork 446
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
test(e2e): add discard action test #8196
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Jan 6, 2025 1:38 PM (UTC) ❌ Failed Tests (1) -- expand for details
|
⚡️ Editor Performance ReportUpdated Mon, 06 Jan 2025 13:48:22 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
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.
Thanks for adding this Rita
Not blocking, but added a suggestion, would love your thoughts on this.
// Focus the publish button to trigger the tooltip showing the keyboard shortcut | ||
page.getByTestId('action-publish').focus() | ||
|
||
// There is a delay before the tooltip opens, let's explicitly wait for it | ||
await page.waitForTimeout(300) |
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.
Is it necessary to focus on the publish action? Not sure why we need to wait for the tooltip to open.
If we need the timeout to wait until the change has been saved, I think it will be a good idea to validate that the Saved shows in the footer.
Or maybe we could we just depend on the following step page.getByTestId('action-publish').click()
?
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.
That is a good question, I added this as a copy paste straight of the publish test (since I needed the document to be published) so I didn't even pass my eyes over it 🤔
That being said, let me have a look, I'll change the publish test too. good catch!
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.
(I think it wiser to not rely on the following step just by itself simply because I don't want to add more areas of potential flakiness which we know sometimes can happen in steps like those)
Actually, closing this since I just now realised (when looking through the feedback given by Pedro) that we already have some discard (DiscardChanges) tests. It just wasn't where I expected. One of the tests there already tests this use case, so I'm closing this 🙏 |
Description
Add e2e test for the discard document action
What to review
Does the test make sense, should we implement it in a different way?
Notes for release
N/A, it's internal testing