Issue1476: cypress tests for vocab home page tempate statistics#1564
Issue1476: cypress tests for vocab home page tempate statistics#1564miguelvaara wants to merge 6 commits intomainfrom
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1564 +/- ##
=========================================
Coverage 70.54% 70.54%
Complexity 1644 1644
=========================================
Files 32 32
Lines 4315 4315
=========================================
Hits 3044 3044
Misses 1271 1271 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
osma
left a comment
There was a problem hiding this comment.
Looks good in general, I gave a few minor suggestions for improvements. After considering those, this can be merged.
|
|
||
| // click on the second letter (C) | ||
| cy.get('#tab-alphabetical .pagination :nth-child(2) > .page-link').click() | ||
| // Click on the second letter (D) |
There was a problem hiding this comment.
Shouldn't this be "fourth letter"?
| describe('Vocabulary home page', () => { | ||
| it('contains vocabulary title', () => { | ||
| cy.visit('/test/en') // go to the "Test ontology" home page | ||
| cy.visit('/yso/en') // Go to the "YSO - General Finnish ontology (archaeology)" home page |
There was a problem hiding this comment.
The URL should be /yso/en/ with the final slash included. (This was also wrong in the previous version)
The URL without the final slash will work, but there is an extra redirect because it's not the "canonical" URL of the vocabulary home page.
| }) | ||
| it('shows alphabetical index letters', () => { | ||
| cy.visit('/test/en') // go to the "Test ontology" home page | ||
| cy.visit('/yso/en') // Go to the "YSO - General Finnish ontology (archaeology)" home page |
There was a problem hiding this comment.
Same URL issue here, and below a few more times








Reasons for creating this PR
The tests for the vocabulary homepage are part of making sure users have a good experience. Run the tests following the usual Cypress testing process
Link to relevant issue(s), if any
Description of the changes in this PR
In addition to the previously written tests, we are now testing both tables on the vocabulary homepage:
"Resource counts by type"
"Term counts by language"
Known problems or uncertainties in this PR
Due to the issues mentioned in this issue, the previously created tests regarding the alphabetical list are failing inconsistently
Checklist
.sr-onlyclass, color contrast)