test: [M3-7069] - Add Cypress integration tests for Linode Create DC-specific pricing#9701
Conversation
There was a problem hiding this comment.
Looks good! couple comments:
- I would consider naming the file
create-linode-dynamic-pricing.spec.tsso it's clear what the focus of the test is at first sight - I am getting "The selected region does not have any availability for the requested service plan." when runnign locally. Should we consider getting a much lower plan to run this test to avoid this kind of issue?
@abailly-akamai For DC pricing, we're keeping these tests side-by-side with the existing tests because when the feature launches and we clean up the feature flag, all of the new tests will be removed, and the DC-pricing-specific assertions will be refactored into the existing tests. |
jdamore-linode
left a comment
There was a problem hiding this comment.
Nice work @cliu-akamai! Everything looks good to me, just a quick suggestion for a couple of your getClick() calls!
| authenticate(); | ||
| describe('create linode', () => { | ||
| before(() => { | ||
| cleanUp('linodes'); |
| // Confirm that the checkout summary at the bottom of the page reflects the correct price. | ||
| containsClick(selectRegionString).type(`${initialRegion.label} {enter}`); | ||
| fbtClick('Shared CPU'); | ||
| getClick('[id="g6-standard-8"]'); |
There was a problem hiding this comment.
| getClick('[id="g6-standard-8"]'); | |
| getClick(`[id="${dcPricingMockLinodeTypes[0].id}"]`); |
Coincidentally, I just posted an explanation on another PR about this and why hardcoding the ID here might make the tests fragile in unexpected ways!
| // Confirms that the summary updates to reflect price changes if the user changes their region and plan selection. | ||
| containsClick(initialRegion.label).type(`${newRegion.label} {enter}`); | ||
| fbtClick('Shared CPU'); | ||
| getClick('[id="g6-standard-8"]'); |
There was a problem hiding this comment.
| getClick('[id="g6-standard-8"]'); | |
| getClick(`[id="${dcPricingMockLinodeTypes[0].id}"]`); |
@abailly-akamai, are you seeing this message when the test attempts to create the Linode or at another point during the create flow? Haven't been able to reproduce this and can't think of why this might be happening off the top of my head, but I'd like to get to the bottom of it before merging if possible |
bnussman-akamai
left a comment
There was a problem hiding this comment.
Test passed and looked solid 👍🏼
|
@cliu-akamai Just circling back here to thank you for those additions! Took a look at those and confirmed they're passing locally. I think you should be able to fix the automated test failures by merging in the latest changes from |
|
@jdamore-linode sorry for the delay in answering. It happened to me when running the test locally - could it be because my regions list (locally) contains regions the production build CY test against wouldn't, and those regions have no availability (I have a bunch of flags on my account to that effect, ie: |
|
@cliu-akamai I merged in the latest Edit: @jdamore-linode - Are we still concerned about the issue that Alban was seeing locally? I also can't reproduce. |
|
I'm going to merge this now since only one of us seemed to have an issue with local runs, but make a note of this to revisit if it causes more problems with the tests in the future. |
Description 📝
Add new cypress tests for Linode creation tiered pricing.
Major Changes 🔄
How to test 🧪