Details
- Reviewers
anlambert - Group Reviewers
Reviewers - Commits
- rDWAPPS8aea5d0adeb8: cypress: Test revision-diff
Diff Detail
- Repository
- rDWAPPS Web applications
- Branch
- testDiff
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 7124 Build 10046: Cypress tests for swh-web diffs Jenkins Build 10045: tox-on-jenkins Jenkins Build 10044: arc lint + arc unit
Event Timeline
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/639/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/235/ for more details.
cypress/integration/origin-diff.spec.js | ||
---|---|---|
47 ↗ | (On Diff #6053) | This test crashes the server with segmentation fault sometimes. |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/641/ for more details.
cypress/integration/origin-diff.spec.js | ||
---|---|---|
47 ↗ | (On Diff #6053) | (happens most of the times , when this spec file is run alone) |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/237/ for more details.
Thanks for working on this!
Sorry for the delay about the segfault issue, it took me some time to understand what the real problem was and I had to implement
a proper fix while maintaining backward compatibility with our production environment.
I added some inline comments to improve the implementation of some tests.
Also can you rename the test file to revision-diff.spec.js.
cypress/integration/origin-diff.spec.js | ||
---|---|---|
30 ↗ | (On Diff #6053) | You can chain the calls to the cypress API here |
36–37 ↗ | (On Diff #6053) | Here I would put all paths in a Set first to avoid running some tests twice (from_path and to_path are equal when a file is modified) |
47 ↗ | (On Diff #6053) | I managed to reproduce the issue from my side but it took me some time to analyze it and fix it properly. The segfault was due to the use of the file-magic package in swh-web. I have just committed 0721db0ce7e8 and cd747b23ec7f properly fixing the issue. While maintaining backward compatibility |
48–59 ↗ | (On Diff #6053) | Here I would rather use the implementation below as it is easier to understand: it('should load diffs when scrolled down', function() { cy.wait(500) .get('#swh-revision-changes-list a') .each(elt => { cy.get(elt.attr('href')) .scrollIntoView() .wait(500) .find('.swh-content') .should('be.visible'); }); }); |
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/646/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/242/ for more details.
Nice work, thanks !
You will have to rebase before landing this as I have added the generation of HTML reports after the cypress tests have been executed:
- test results nicely displayed by mochawesome (6694c17fc939 )
- javascript code coverage generated by istanbul (a01295397a91)
Those reports will be made available to browse on Jenkins cypress jobs web interface (see D1804)
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/tox/648/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DWAPPS/job/cypress-diff/244/ for more details.