-
Notifications
You must be signed in to change notification settings - Fork 95
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
Issue1476: cypress tests for vocab home page tempate statistics #1564
base: main
Are you sure you want to change the base?
Issue1476: cypress tests for vocab home page tempate statistics #1564
Conversation
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## skosmos-3 #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. |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be "fourth letter"?
@@ -1,42 +1,134 @@ | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-only
class, color contrast)