Repository navigation
test: [M3-7465] - Add Cypress test coverage for Firewall renaming - #10384
Conversation
|
Coverage Report: ✅ |
jdamore-linode
left a comment
There was a problem hiding this comment.
Nice work @cliu-akamai! Approved pending changesets. Also posted a couple really minor suggestions but this is great as-is. Thanks!
|
|
||
| cy.visitWithLogin(`/firewalls/${firewall.id}`); | ||
|
|
||
| cy.get(`[aria-label="Edit ${firewall.label}"]`).click(); |
There was a problem hiding this comment.
| cy.get(`[aria-label="Edit ${firewall.label}"]`).click(); | |
| cy.findByLabelText(`Edit ${firewall.label}`).click(); |
Slightly more clear this way!
| cy.reload(); | ||
|
|
||
| // Confirm firewall label is updated on details page. | ||
| cy.findByText(newFirewallLabel).should('be.visible'); | ||
|
|
||
| cy.visitWithLogin('/firewalls'); | ||
|
|
||
| // Confirm firewall label is updated on landing page. | ||
| cy.findByText(newFirewallLabel).closest('tr').should('be.visible'); |
There was a problem hiding this comment.
| cy.reload(); | |
| // Confirm firewall label is updated on details page. | |
| cy.findByText(newFirewallLabel).should('be.visible'); | |
| cy.visitWithLogin('/firewalls'); | |
| // Confirm firewall label is updated on landing page. | |
| cy.findByText(newFirewallLabel).closest('tr').should('be.visible'); | |
| // Confirm Firewall label updates in breadcrumbs. | |
| ui.entityHeader | |
| .find() | |
| .within(() => { | |
| cy.findByText(newFirewallLabel).should('be.visible'); | |
| cy.findByText('firewalls').click(); | |
| }); | |
| // Confirm firewall label is updated on landing page without refresh. | |
| cy.findByText(newFirewallLabel).should('be.visible'); | |
| // Confirm firewall label is updated on landing page after refresh. | |
| cy.reload(); | |
| cy.findByText(newFirewallLabel).should('be.visible'); |
Just a really minor suggestion to slightly improve the coverage by confirming that the label update takes effect without a page refresh (i.e. the React Query cache was successfully updated) and then refreshes the page and confirms the label again (confirming that the label has been updated successfully on the backend, too).
dwiley-akamai
left a comment
There was a problem hiding this comment.
Test passes locally & remotely ✅
| }); | ||
|
|
||
| /* | ||
| * - Confirms that firewall's label can be updated on landing page'. |
There was a problem hiding this comment.
| * - Confirms that firewall's label can be updated on landing page'. | |
| * - Confirms that firewall's label can be updated on landing page. |
Description 📝
Add regression tests to rename firewall label on landing page.
Major Changes 🔄
How to test 🧪