Page MenuHomeSoftware Heritage

Add tests for sidebar, back-to-top
ClosedPublic

Authored by kalpitk on Jun 13 2019, 9:50 AM.

Details

Summary

Add tests for webapp functionalities - sidebar, back-to-top

Related T1768

Diff Detail

Repository
rDWAPPS Web applications
Branch
webappTest
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6181
Build 8524: tox-on-jenkinsJenkins
Build 8523: arc lint + arc unit

Event Timeline

vlorentz added a subscriber: vlorentz.

Nice! Could you also add a test checking the width of the collapsed sidebar is lower than of the open sidebar?

This revision now requires changes to proceed.Jun 13 2019, 1:55 PM

While working on the tests, I found that for non-lg devices (width<992), first time you press the push-menu, it doesn't toggle. Instead it adds 'sidebar-collapse' first time. I think there is some conflict between webapp-utils.js:5 and the bootstrap defaults. I couldn't find the exact cause to it.

This revision is now accepted and ready to land.Jun 14 2019, 2:14 PM

Could you rename the file to cypress/integration/sidebar.spec.js?

This revision now requires changes to proceed.Jun 14 2019, 2:15 PM

Could you rename the file to cypress/integration/sidebar.spec.js?

In that case should I move back-to-top tests to another file or keep it in the same sidebar.spec.js ?

anlambert added a subscriber: anlambert.

Nice! I agree with @vlorentz , you should split the tests into two spec files: sidebar.spec.js and back-to-top.spec.js. Once it is done, that diff can be landed.

  • Split tests into two files
  • Rebase with master
This revision is now accepted and ready to land.Jun 17 2019, 5:41 PM

Sidebar tests fail.

This is because, the cypress view is interpreted as sm by JS.
Cypress viewport is 1000px(width) by 660px(height). Apparently the window width is a bit smaller than the viewport. (around 985px)

I am updating the cypress config file (1920*1080) to ensure we are testing for lg devices by default.

This revision was automatically updated to reflect the committed changes.