-
Notifications
You must be signed in to change notification settings - Fork 266
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
Create E2E tests for cluster CRUD operations #6284
Conversation
d3ca1c0
to
c31e62d
Compare
3f589cb
to
f128d45
Compare
f3fb5e1
to
e2829a6
Compare
4b8dafc
to
f6e70b3
Compare
f3b89ff
to
ab31a7b
Compare
I've executed the tests 3 times after rebasing master and it seems to work fine now. |
cfd8d11
to
a64c2c8
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.
- I made some suggestions on test names to clarify the type of clusters (
imported generic cluster
andRKE2 custom cluster
). This makes it easier to know which other types we'll need to cover in the future, and clearer if we need to reproduce failing tests locally. - This PR would be a perfect time to create basic POs for common components that will enable everyone to start creating e2e tests quickly (and without everyone trying to create the same components at the same time). There's a number that should be created, such as
- Cluster page PO
- includes selecting clusters and rke toggle
- Cluster create page POs for the two cluster types
- NameNsDescription PO
- convenience getters for name, ns, description labelled input POs
- Action menu PO
- get options, click on an option
- lists (column values, action menu PO for a row)
- get rows with their column values
- convenience method to get a row's action menu
- convenience method to get row count
- Cluster page PO
- I tried running
yarn run e2e:dev
but got the error below. It looks like we can't now tell e2e to run off of an existing dashboard or run the tests without having to make a build first. Being able to update the core dashboard code is incredibly helpful when writing tests. I then tried to make a manual-
FATAL No build files found in /home/richard/dev/github/rancher/dashboard-giu/.nuxt/dist/server. 14:46:29 Use either `nuxt build` or `builder.build()` or start nuxt in development mode.
-
- After manually building the dashboard i tried again with
yarn run e2e:dev
but got the below error. How does the sorry cypress dashboard work, does it need to run locally... or do local tests go to the remote instance? How can i disable recording when running tests locally?-
[cy2] Running cypress with API URL: http://139.59.134.103:1234 You passed the --record flag but this project has not been setup to record.
-
As defined in the documentation:
Then you just browse the tests. |
@richard-cox I rather prefer create a separated issue were we identify the PO for the cluster, as the scope of this issue is just to have reliable tests. #6627 |
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 spoken with Neil and this PR can go in (with a squash merge and once 2.6.7 is out). I've created #6675 that adds the POs and fixes any remaining issues from this PR.
The current structure of the tests is breaking as it's not anymore in the right order. I'll may have to revert the last change or shift all the tests under the same hood. |
Suddenly it seems like there's some errors which prevent to actually create clusters. It seems caused by the |
3271e0a
to
b16ac10
Compare
I'm re-running trice the tests, to have a bit more chances to avoid flaky tests (as we may have already now). |
Summary
Fixes #5990
Write E2E tests for cluster CRUD operations through cluster manager page.
Note: This excludes registration and provisioning.
Occurred changes and/or fixed issues
New issues
Technical notes summary
Important! Update packages with
yarn
due new changes to Cypress 10.find()
related Cypress commandfindId()
andgetId()
Cypress to accept optional argument for matching CSS selection symboldata-testid
attributescomponentTestId
prop on several component to override attribute in duplicated casesClusterProvider
if nomgmt
is providedTests executed locally may actually fail as the user preferences may not match, which is why I've been created another issue for that.
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
Please refer to the check and logs.
Example run from the dashboard: http://139.59.134.103:8080/instance/8db3cf97-6d46-45de-9c14-2cdab137f69f