-
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
tests: [M3-8656] - Mock LKE creation flow + APL coverage #11347
Conversation
Coverage Report: ✅ |
👋🏼 Just created some merge conflicts here in the lke-create spec by merging in #11322. Hopefully they're easy to resolve - LKE-E test coverage is minimal and will be built out as we continue. Thanks for the clean up in this file; will follow suit going forward. |
packages/manager/cypress/e2e/core/kubernetes/lke-create.spec.ts
Outdated
Show resolved
Hide resolved
mockedLKEClusterPools, | ||
mockedLKEClusterTypes | ||
); | ||
|
||
it('can create an LKE cluster', () => { | ||
cy.tag('method:e2e', 'purpose:dcTesting'); |
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.
Now that we are mocking, do we need to update these tags?
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.
Good catch! @abailly-akamai I think in this case you can remove the cy.tag(...)
call altogether since it's not suitable for DC testing without real API requests 👍
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.
done! all feedback addressed - @jdamore-linode would be great to have a thorough review (feel free to commit!) to avoid any flake. It's prob the most complicated mocked test I have written so far, wanna make sure it's reliable.
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.
@jdamore-linode - another poke to get your attention on this one when you have a minute - thx!
packages/manager/cypress/e2e/core/kubernetes/lke-create.spec.ts
Outdated
Show resolved
Hide resolved
52474ee
to
a62335c
Compare
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.
Thanks for addressing feedback!
1032331
to
5c880d5
Compare
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 @abailly-akamai! Ran the tests on repeat and didn't observe any flake, and nothing in the code caught my eye. This is a great refactor! Thanks!
const labelInput = '[data-qa-textfield-label="Cluster Label"]'; | ||
cy.get(labelInput).should('be.visible'); | ||
cy.get(labelInput).click(); | ||
cy.get(labelInput).type(`${clusterLabel}{enter}`); |
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.
This is totally fine, but just wanted to share a couple alternative options when you've got a selector that you don't want to keep repeating:
// Using aliases
cy.get('[data-qa-textfield-label="Cluster Label"]').as('@labelInput');
cy.get('@labelInput').should('be.visible');
cy.get('@labelInput').click();
cy.get('@labelInput').type(`${clusterLabel}{enter}`);
// Using `cy.focused()` when performing multiple interactions on an element.
cy.get('[data-qa-textfield-label="Cluster Label"]').should('be.visible').click();
cy.focused().type(`${clusterLabel}{enter}`);
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.
nice, thank you!
5c880d5
to
05d5f74
Compare
Cloud Manager UI test results🔺 1 failing test on test run #13 ↗︎
Details
TroubleshootingUse this command to re-run the failing tests: yarn cy:run -s "cypress/e2e/core/billing/smoke-billing-activity.spec.ts" |
Cloud Manager E2E Run #6939
Run Properties:
|
Project |
Cloud Manager E2E
|
Branch Review |
develop
|
Run status |
Passed #6939
|
Run duration | 29m 45s |
Commit |
906e061da8: tests: [M3-8656] - Mock LKE creation flow + APL coverage (#11347)
|
Committer | Alban Bailly |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
4
|
Pending |
2
|
Skipped |
0
|
Passing |
467
|
View all changes introduced in this branch ↗︎ |
Description 📝
PR to remove any "real" entity creation during the create cluster flow and add APL coverage to the create specs.
Note
The reason for mocking the main create flow is to avoid creating real clusters in the CI for security reasons.
Changes 🔄
How to test 🧪
Prerequisites
Verification steps
yarn cy:debug
> selectlke-create
As an Author, to speed up the review process, I considered 🤔
As an Author, before moving this PR from Draft to Open, I confirmed ✅