Page MenuHomeSoftware Heritage

cypress: Fix "use UI to login" anti-pattern
ClosedPublic

Authored by anlambert on Jun 22 2020, 1:55 PM.

Details

Summary

Keep a single test using the UI to login and add a Cypress command to login
programatically because UI login is slow, cumbersome, and unnecessary.

https://docs.cypress.io/guides/getting-started/testing-your-app.html#Logging-in

Diff Detail

Repository
rDWAPPS Web applications
Branch
cypress-login-request
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13004
Build 19819: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 19818: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D3331 (id=11792)

Rebasing onto 8e0fa87b22...

Current branch diff-target is up to date.
Changes applied before test
commit dc860b2a38b0b1ffd08b28e6a7250493122bd98b
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jun 22 13:54:22 2020 +0200

    cypress: Fix "use UI to login" anti-pattern
    
    Keep a single test using the UI to login and add a Cypress command to login
    programatically because UI login is slow, cumbersome, and unnecessary.
    
    https://docs.cypress.io/guides/getting-started/testing-your-app.html#Logging-in

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/210/ for more details.

olasd added a subscriber: olasd.

Thanks! I remember looking at that page the last time I ran the cypress tests ;)

This revision is now accepted and ready to land.Jun 22 2020, 2:10 PM