-
Notifications
You must be signed in to change notification settings - Fork 390
test: [M3-10051] - Add Cypress tests for QEMU Upgrade Notice #12564
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
Cloud Manager UI test results🎉 692 passing tests on test run #2 ↗︎
|
| const mockLinodes = new Array(5) | ||
| .fill(null) | ||
| .map((item: null, index: number): Linode => { | ||
| return linodeFactory.build({ | ||
| label: `Linode ${index}`, | ||
| region: chooseRegion({ | ||
| capabilities: ['Linodes', 'Vlans'], | ||
| }).id, | ||
| }); | ||
| }); |
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.
Optional: We may be able to use linodeFactory.buildList here
| const mockLinodes = new Array(5) | |
| .fill(null) | |
| .map((item: null, index: number): Linode => { | |
| return linodeFactory.build({ | |
| label: `Linode ${index}`, | |
| region: chooseRegion({ | |
| capabilities: ['Linodes', 'Vlans'], | |
| }).id, | |
| }); | |
| }); | |
| const mockLinodes = linodeFactory.buildList(5, { | |
| region: chooseRegion({ | |
| capabilities: ['Linodes', 'Vlans'], | |
| }).id, | |
| }); |
| * - Check that user gets notified and the notification is present in the notifications dropdown. | ||
| * - Check that a maintenance help button is displayed near the status of impacted Linodes. | ||
| */ | ||
| it(`should display maintenance banner in 'Linnode' landing page when one or more Linodes get impacted.`, () => { |
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.
Typo
| it(`should display maintenance banner in 'Linnode' landing page when one or more Linodes get impacted.`, () => { | |
| it(`should display maintenance banner in 'Linode' landing page when one or more Linodes get impacted.`, () => { |
| cy.get('[data-testid="notice-warning"]') | ||
| .first() |
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.
Do we need to worry about this causing test flake if there is a maintenance banner up or some other global notification?
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 this could become an issue, good call @bnussman-akamai
@cliu-akamai a lot of times do get around this risk, we'll select by the text first and then if we need to we can get the notification banner from there (although a lot of times asserting that the text is visible is good enough), e.g.:
cy.findByText(NOTIFICATION_BANNER_TEXT)
.should('be.visible')
.closest('[data-testid="notice-warning"]')
.within(() => { /* ... */ });
// or cy.contains(NOTIFICATION_BANNER_TEXT).[...]
jdamore-linode
left a comment
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 @cliu-akamai! +1 to all of @bnussman-akamai's suggestions but overall this is looking good 👍
| * - Check that user gets notified and the notification is present in the notifications dropdown. | ||
| * - Check that a maintenance help button is displayed near the status of impacted Linodes. | ||
| */ | ||
| it(`should display maintenance banner in 'Linnode' landing page when one or more Linodes get impacted.`, () => { |
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.
| it(`should display maintenance banner in 'Linnode' landing page when one or more Linodes get impacted.`, () => { | |
| it(`should display maintenance banner in 'Linode' landing page when one or more Linodes get impacted.`, () => { |
| cy.get('[data-testid="notice-warning"]') | ||
| .first() |
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 this could become an issue, good call @bnussman-akamai
@cliu-akamai a lot of times do get around this risk, we'll select by the text first and then if we need to we can get the notification banner from there (although a lot of times asserting that the text is visible is good enough), e.g.:
cy.findByText(NOTIFICATION_BANNER_TEXT)
.should('be.visible')
.closest('[data-testid="notice-warning"]')
.within(() => { /* ... */ });
// or cy.contains(NOTIFICATION_BANNER_TEXT).[...]34056f2 to
b7cd43d
Compare
Description 📝
Add new Cypress tests for QEMU Upgrade Notice
Changes 🔄
List any change(s) relevant to the reviewer.
QEMU reboot upgrade notification.Linodelanding page,Linode Detailspage, andAccount Maintenancepage.How to test 🧪