-
Notifications
You must be signed in to change notification settings - Fork 267
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
e2e test that creates GKE cluster with default settings #12934
base: master
Are you sure you want to change the base?
Conversation
cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts
Outdated
Show resolved
Hide resolved
@richard-cox could you please give an update on the review? Thanks |
let gkeVersion = ''; | ||
let clusterId = ''; | ||
let clusterDescription = ''; | ||
const gkeProjectId = JSON.parse(Cypress.env('gkeServiceAccount')).project_id; |
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 believe this is failing CI due to this line. We would need this new variable, GKE_SERVICE_ACCOUNT
, present in the environment for it to work correctly. I'm not personally sure how to do it, but maybe @richard-cox or @izaac can instruct us?
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.
error ref:
1) An uncaught error was detected outside of a test:
SyntaxError: The following error originated from your test code, not from Cypress.
> "undefined" is not valid JSON
When Cypress detects uncaught errors originating from your test code it will automatically fail the current test.
Cypress could not associate this error to any specific test.
We dynamically generated a new test to display this failure.
at JSON.parse (<anonymous>)
at Suite.eval (webpack:///./cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts:23:0)
at describeGrep (webpack:///./node_modules/@cypress/grep/src/support.js:183:0)
at ./cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts (webpack:///./cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts:15:0)
at __webpack_require__ (webpack:///webpack/bootstrap:19:0)
at 0 (https://127.0.0.1/__cypress/tests?p=cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts:8117:18)
at __webpack_require__ (webpack:///webpack/bootstrap:19:0)
at eval (webpack:///webpack/bootstrap:83:0)
at eval (https://127.0.0.1/__cypress/tests?p=cypress/e2e/tests/pages/manager/gke-cluster-provisioning.spec.ts:87:10)
at eval (<anonymous>)
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 wasn't expecting this to run in Github Actions with the @jenkins
tag. Only on Jenkins.
Edit: I am not sure how the grepTags
change the behavior of Cypress' describe
and it
blocks internally but I guess the code gets interpreted before the tag logic is applied.
I see other filtered specs still selected but then the greptags logic blocks the test from execution.
Catching the undefined
might shed some light to my theory.
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.
In the meantime we should catch the undefined
value before attempting to parse the variable.
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.
it seems like it's only an issue with @standardUser
tag. we can remove that tag to get unblocked and create a separate issue to investigate this
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.
scratch that idea, it didn't work (test is still picked up when @standardUser
tag removed). We should handle undefined or null values using try catch as Izaac suggested. Sent Isabela some pointers
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've created an issue to investigate the problem we're seeing with the grep tags rancher/qa-tasks#1663
Signed-off-by: Isabela Guimaraes <[email protected]>
Signed-off-by: Isabela Guimaraes <[email protected]>
…oud credentials Signed-off-by: Isabela Guimaraes <[email protected]>
Signed-off-by: Isabela Guimaraes <[email protected]>
Signed-off-by: Isabela Guimaraes <[email protected]>
Summary
Occurred changes and/or fixed issues
This PR addresses the issue rancher/qa-tasks#1571.
This is a single e2e test that creates a GKE cluster with the default settings and verifies that the cluster is created and that the GKE default version and zone are displayed in the UI elements as expected. To support the test, were created GKE-related page objects for the GKE Create cloud credentials page, the GKE authenticate page with Project ID, and the Create GKE Cluster Page.
Some methods and variables were created but are not being used in this single test. Still, they will be used for the upcoming tests.
Storing the GKE Cloud credentials will be addressed in another PR.
Areas or cases that should be tested
Create a GKE Cluster with default settings
Other cluster provisioning-related tests
Other cloud credentials creation related tests
Other pages that contain LabeledInput or LabeledSelect elements
Areas which could experience regressions
other cluster provisioning tests
Checklist