-
Notifications
You must be signed in to change notification settings - Fork 332
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-8105] - Clean up cy.intercept calls in resize-linode #10476
test: [M3-8105] - Clean up cy.intercept calls in resize-linode #10476
Conversation
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.
π§Ό
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.
Couple small things, but I think it raises a more interesting question: if the test seems to run just fine without the intercepts for the resize requests, would it be better to just get rid of them altogether? Any thoughts?
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.
Seeing one call to cy.intercept()
that slipped through the cracks!
ln 40
cy.intercept(
'POST',
apiMatcher(`linode/instances/${linode.id}/resize`)
).as('linodeResize');
(GitHub wouldn't let me comment on those specific lines for some reason π )
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'll update this one, thank you!
'POST', | ||
apiMatcher(`linode/instances/${linode.id}/resize`) | ||
).as('linodeResize'); | ||
mockGetFeatureFlagClientstream().as('linodeResize'); |
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.
mockGetFeatureFlagClientstream().as('linodeResize'); | |
interceptLinodeResize().as('linodeResize'); |
(This also applies to the replacements later in the file)
Interestingly the tests still run and pass just fine -- it calls into question whether the intercepts are even really necessary in these 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.
Looks like there are some copy-paste errors :(
I'll correct them!
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.
Haha we've all been there π
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.
Great work @AzureLatte!
Description π
Clean up cy.intercept calls in resize-linode
Changes π
List any change relevant to the reviewer.
How to test π§ͺ
We can rely on CI to confirm that this test has not been broken by these changes, but to run the test locally you can use this command:
As an Author I have considered π€
Check all that apply