-
Notifications
You must be signed in to change notification settings - Fork 361
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: [M3-6609] - Add Linode details page assertion for LISH via SSH Info #10513
Conversation
Checking conflicts now. Will move to "ready for review" after conflicts resolved |
Coverage Report: ✅ |
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.
create-linode.spec.ts
passes ✅
Code review ✅
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.
Looks great @AzureLatte, posted a small suggestion but it's not a big deal! This addition looks really good as-is 👍
cy.contains('LISH Console via SSH') | ||
.should('be.visible') | ||
.next() // Navigate to the next element which should be the value | ||
.invoke('text') // Get the text of the next element | ||
.then((text) => { | ||
// Example assertion (ssh -t <Linode account username>@lish-<Linode region>.linode.com <Linode label>) | ||
expect(text).equal( | ||
`ssh -t ${username}@lish-${linodeRegion.id}.linode.com ${linodeLabel}` | ||
); | ||
}); |
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.
cy.contains('LISH Console via SSH') | |
.should('be.visible') | |
.next() // Navigate to the next element which should be the value | |
.invoke('text') // Get the text of the next element | |
.then((text) => { | |
// Example assertion (ssh -t <Linode account username>@lish-<Linode region>.linode.com <Linode label>) | |
expect(text).equal( | |
`ssh -t ${username}@lish-${linodeRegion.id}.linode.com ${linodeLabel}` | |
); | |
}); | |
cy.contains('LISH Console via SSH') | |
.should('be.visible') | |
.closest('tr') | |
.within(() => { | |
cy.contains(`ssh -t ${username}@lish-${linodeRegion.id}.linode.com ${linodeLabel}`).should('be.visible'); | |
}); |
Very minor suggestion: here's a slightly more straightforward way to assert the SSH command is shown, with two minor benefits: it's slightly less dependent on the DOM structure, and it confirms that the SSH command is visible in addition to being present in the DOM
Description 📝
Add Cypress assertions to confirm that the information displayed in the "LISH Console via SSH" section on Linode details pages is correct.
Changes 🔄
List any change relevant to the reviewer.
How to test 🧪
As an Author I have considered 🤔
Check all that apply