-
Notifications
You must be signed in to change notification settings - Fork 367
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-7053] - Add Cypress integration test for VPC create flow #9730
test: [M3-7053] - Add Cypress integration test for VPC create flow #9730
Conversation
.click() | ||
.type(`${vpcRegion.label}{enter}`); | ||
|
||
cy.findByText('VPC label').should('be.visible').click().type(mockVpc.label); |
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.
Should "VPC label" be "VPC Label" to be more consistent with other resource create flows? (This question also applies to "Subnet label" vs "Subnet Label" later in the flow)
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.
Makes sense to me
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.
+1 makes sense to me too -- I'll ask UX to double check :D
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.
confirmed that label should be capitalized :D
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 confirming @coliu-akamai! I'll make those changes in this PR if that works for everyone 👍
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.
thank you!
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.
Ran the tests locally and they passed 🎉
const totalSubnetUniqueLinodes = mockSubnets.reduce( | ||
(acc: number, cur: Subnet) => acc + cur.linodes.length, | ||
0 | ||
); |
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.
There's a function to calculate this called getUniqueLinodesFromSubnets
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 @hana-linode! I'll take a look at that and see if I can use it from the test
.click() | ||
.type(`${vpcRegion.label}{enter}`); | ||
|
||
cy.findByText('VPC label').should('be.visible').click().type(mockVpc.label); |
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.
Makes sense to me
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.
✅ confirmed tests pass. Thanks Joe!
.click() | ||
.type(`${vpcRegion.label}{enter}`); | ||
|
||
cy.findByText('VPC label').should('be.visible').click().type(mockVpc.label); |
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.
+1 makes sense to me too -- I'll ask UX to double check :D
Hey @jdamore-linode! Just wanted to give a heads-up that the VPC Create flow will be changed a from this PR/ticket: The changes are:
|
Thanks @coliu-akamai and @hana-linode for the heads up! I'll review #9751 later today, and my plan is to wait for that work to be reviewed and merged, and then I'll circle back here and update this PR to account for these changes and add additional coverage where necessary (being able to delete the first subnet specifically comes to mind) |
@coliu-akamai @hana-linode Just letting you know I pushed some changes to account for the recent improvements made to the VPC create page:
I don't know if this warrants a re-review but wanted to give you both a heads up in case you wanted to put some eyes on it! |
Thanks @jdamore-linode! Will take a quick look/rerun the tests 👍 |
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.
Other than missing a new Tests changeset and the minor issue I commented about, this looks good + the cypress tests passed. Reapproving on those being resolved -- thanks Joe!!
@@ -63,15 +63,15 @@ export const SubnetNode = (props: Props) => { | |||
disabled={disabled} | |||
errorText={subnet.labelError} | |||
inputId={`subnet-label-${idx}`} | |||
label="Subnet label" | |||
label="Subnet Label" |
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.
sorry I forgot to mention -- this change will affect a bunch of tests in the VPCs/VPCCreate
folder and the SubnetCreateDrawer.test.tsx
file too. It should be a super quick fix (just updating everything to 'Subnet Label' in those tests, but lmk if you've questions!
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.
sorry I forgot to mention -- this change will affect a bunch of tests in the
VPCs/VPCCreate
folder and theSubnetCreateDrawer.test.tsx
file too. It should be a super quick fix (just updating everything to 'Subnet Label' in those tests, but lmk if you've questions!
Ah, thank you for the heads up! I'll take care of that soon. Shame on me for not considering the unit tests 😅
Edit: Done! Also replaced "Subnet label" with "Subnet Label" in the Subnet delete dialog. Thanks again for the catch, @coliu-akamai!
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.
awesome thanks!
@jdamore-linode Oh one quick thing, I saw that you changed the Subnet delete dialog to be 'Subnet Label' instead of 'Subnet label' too -- this will affect some of the cypress tests too 😅 (vpc-details-page.spec.ts, line 174, line 241 I think) |
Classic. 😅 Thanks Connie! |
Going to merge this despite the E2E failure. The failing tests are caused by a gateway timeout when attempting to create LKE clusters, so it's not related to the work in this PR. |
Description 📝
Adds a Cypress integration test for the VPC create flow.
Major Changes 🔄
How to test 🧪
We can refer to the automated test run, but to run the tests locally you can use this command: