-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add cypress tests for web UI #1269
Conversation
✅ Deploy Preview for kairos-io canceled.
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #1269 +/- ##
==========================================
- Coverage 22.79% 21.10% -1.69%
==========================================
Files 22 16 -6
Lines 1610 1284 -326
==========================================
- Hits 367 271 -96
+ Misses 1179 962 -217
+ Partials 64 51 -13
📣 We’re building smart automated test selection to slash your CI/CD build times. 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.
Noiiice! 👏
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.
Lovely!!!
@@ -105,21 +105,21 @@ <h1>Welcome to the Installer!</h1> | |||
|
|||
codeMirrorEditor.on('change', () => content = codeMirrorEditor.getValue()) | |||
" | |||
x-on:keydown="validateYAML" | |||
x-on:keydown.debounce="validateYAML" |
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 so there is a delay after keys of 250ms. Otherwise, this keeps firing while you write and can send a lot of data to the validation endpoint which is not nice. Having this means that after the last keydown has been sent and no other one key has been pressed in 250ms then event fires. This was causing a lot of calls to the validate endpoint while writing (one per key!)
cy.get("#validator-alert").invoke("text").should("match", /Failed validating syntax/) | ||
|
||
}) | ||
it('should install', function () { |
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 doesnt really work, it fails to find the agent but we should probably hijack the call and check that all data was passed correctly.
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
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.
Doesn't have to be in this PR, but I think it might make sense to somehow keep track of the report. So we can give an idea of how much the coverage went up/down
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.
Super!
that is a really good point! Gonna have a look to see if we can also use codecov for this or it will get confused and break :D |
What this PR does / why we need it:
This adds basic webUI tests to our workflows based of cypress.
Currently the deployment and test is simplified, as it runs a local webui agent inside earthly and tests several parts on the UI and some of the functionality (validation)
Hopefully in the near future this is expanded to use a full qemu VM with the webui running and we can trigger the full install from there although its a bit nastey as it would be earthly -> ginkgo -> qemu -> cypress
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #