-
Notifications
You must be signed in to change notification settings - Fork 4
E2E tests - run the tests suite on new PRs #93
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Francesco Torchia <[email protected]>
Signed-off-by: Francesco Torchia <[email protected]>
…Chat PO and commands Signed-off-by: Francesco Torchia <[email protected]>
ad1c7b9 to
18d41cd
Compare
Signed-off-by: Francesco Torchia <[email protected]>
da28781 to
107d3ca
Compare
Signed-off-by: Francesco Torchia <[email protected]>
baed4e2 to
c2965eb
Compare
Signed-off-by: Francesco Torchia <[email protected]>
Signed-off-by: Francesco Torchia <[email protected]>
Signed-off-by: Francesco Torchia <[email protected]>
1ca6264 to
f36c559
Compare
rak-phillip
left a comment
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 think that this looks good. I tried to rule out the imported POs and to focus on functionality. For the future, do we need to consider how we will keep cypress POs & commands in sync with Dashboard?
I'm able to run the tests, but the first fails with the following error:
Rancher setup
(Attempt 1 of 3) First login & Configure
(Attempt 2 of 3) First login & Configure
1) First login & Configure
cypress-terminal-report: Wrote html logs to /home/phillip/Development/rancher-ai-ui/browser-logs/out.html. (1ms)
0 passing (4s)
1 failing
1) Rancher setup
First login & Configure:
CypressError: `cy.type()` cannot accept an empty string. You need to actually type something.
https://on.cypress.io/type
at Context.type (https://localhost:8005/__cypress/runner/cypress_runner.js:137615:76)
at wrapped (https://localhost:8005/__cypress/runner/cypress_runner.js:157819:19)
From Your Spec Code:
at ./cypress/e2e/po/components/password.po.ts.PasswordPo.set (webpack:///./cypress/e2e/po/components/password.po.ts:35:0)
at ./cypress/e2e/po/pages/rancher-setup-login.po.ts.RancherSetupLoginPagePo.bootstrapLogin (webpack:///./cypress/e2e/po/pages/rancher-setup-login.po.ts:39:0)
at Context.eval (webpack:///./cypress/e2e/tests/rancher-setup.spec.ts:17:0)
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 3 │
│ Video: true │
│ Duration: 3 seconds │
│ Spec Ran: rancher-setup.spec.ts │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
README.md
Outdated
| # Launch Cypress dashboard | ||
| API=https://your-rancher VUE_APP_AGENT_MESSAGES_WS_PATH=ws://localhost:8000/ws/agent yarn dev | ||
| ``` |
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 think we're missing a step. This doesn't launch the cypress dashboard, it starts the dev server. I think we need a line for ➤ TEST_PASSWORD=${ rancher-password } yarn e2e.
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.
Fixed, thanks.
Signed-off-by: Francesco Torchia <[email protected]>
Signed-off-by: Francesco Torchia <[email protected]>
Definetely, this can also be useful for other extensions. |
@rak-phillip I also added a new e2e to test the sliding badges. |
d0c9b49 to
fa09ce0
Compare
Signed-off-by: Francesco Torchia <[email protected]>
92f03a8 to
b0d1131
Compare
Signed-off-by: Francesco Torchia <[email protected]>
32d022b to
f2008dc
Compare
Signed-off-by: Francesco Torchia <[email protected]>
e30e28f to
821729a
Compare
Contributes to #71
This covers point 1. of the issue, by adding the e2e tests suite to test the extension in dev mode.
cy.enqueueAIAgentResponserancher/dashboardcypress framework, excluding thetestsfolder.