[Testing:System] Cypress component testing for vue#12836
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12836 +/- ##
=========================================
Coverage 21.67% 21.67%
Complexity 9802 9802
=========================================
Files 268 268
Lines 36724 36723 -1
Branches 489 489
=========================================
Hits 7960 7960
+ Misses 28279 28278 -1
Partials 485 485
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@jndlansh Please see failing CI. |
|
Fixed CI checks that were failing |
|
@jndlansh Please see failing CI |
williamjallen
left a comment
There was a problem hiding this comment.
Please also add this as a new CI job.
|
I have added the cypress component testing as a new CI job. Also changes the title's to submission from vue. I think that should work. |
williamjallen
left a comment
There was a problem hiding this comment.
Seems reasonable to me. @IDzyre, would you mind taking a brief look at this?
|
The rest of the Cypress CI jobs are failing for unrelated reasons. |
|
Thank you @williamjallen, when this PR gets merged, I will be able to add Cypress CT to other vue components as well. Meanwhile I will be looking as potential testcases for the same. |
|
Question: Is there a reason this is using cypress in TS not JS like the rest of the codebase? If we could, I think we should be consistent. If there is another reason, I can be convinced otherwise. |
|
Hey @IDzyre! I can use JS for CT if that is required and makes the codebase consistent |
|
@williamjallen Do you have a preference here? I'd be partial to making it javascript if that is possible, to keep all cypress testing in the same language. If typescript is easier/more efficient/has a significant reason to lean that way, we can go that way. |
|
I agree with @IDzyre here, let's switch this to JS. In the future, we may want to switch everything to TS, but for now we should remain consistent. |
…er needed in JS implemented CT
|
Rest I have now shifted CT to JS. The |
There was a problem hiding this comment.
I noticed this error when running the test in the CLI:
<<<CYPRESS.STDERR.START>>>Files in the public directory are served at the root path.
Instead of /public/css/colors.css, use /css/colors.css.
Files in the public directory are served at the root path.
Instead of /public/css/bootstrap.css, use /css/bootstrap.css.
Files in the public directory are served at the root path.
Instead of /public/css/server.css, use /css/server.css.
<<<CYPRESS.STDERR.END>>>
Can we adjust these paths?
|
It works when I use CSS link It passes the test both ways, I did not get this error either way. Shall I use the later method suggested @JManion32 ? |
Yes. |
…in component-index.html
Why is this Change Important & Necessary?
Closes #10786
This PR introduces cypress component testing in the Submitty Codebase. This is particularly important to test the multiple vue components that have been introduced in the repo recently and for the ongoing migration process to VueJS.
First Component Test –
Popup.vue:Added 6 tests covering:
What is the New Behavior?
cypress.popup.mp4
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
cypress/component/Popup.cy.tsserves as reusable templateOther information
Breaking Changes: None. This PR is purely additive with no changes to existing components, tests and build processes.