Page MenuHomeSoftware Heritage

cypress: Add tests for the vault features

Authored by kalpitk on Aug 9 2019, 3:15 PM.



That diff is a first draft of implementing end to end tests for the vault features
of the Software Heritage web application.

Some tests remain to be written and some code factorization should also be performed
to easily implement the revision cooking test.

I'm forwarding future work on this to @kalpitk as I will be in holidays during the
next two weeks but GSoC coding period is still active.

Related T1768

Diff Detail

rDWAPPS Web applications
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont added a subscriber: ardumont.

sounds nice

not sure i understand all the implications though ;)

This revision is now accepted and ready to land.Aug 9 2019, 5:01 PM

@ardumont, you can check the effect of that test through the cypress UI.

Execute $ make test-frontend-ui in the root folder of swh-web, a GUI fronted for cypress will be launched.

Then select any test in the displayed list, it will be executed in a Chromium based browser (using Electron as a default fallback)
and you can see the details of each test steps.

This make me think that I need to update the README to explain how to run the tests ;-)

kalpitk added a reviewer: anlambert.
  • Add assertions to directory vault cooking
  • Add tests for localStorage

Cypress test fails because of origin-search.spec.js(fails sometimes). Will try correcting in another diff

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.

These should have a comment explaining they are used to mock an API endpoint (and the name of the endpoint)


Rename this to sha1 or just id. object_id has a different meaning in other parts of SWH (it's an integer).


remove "indicating"


it should be named origin.revisions then.

This revision now requires changes to proceed.Aug 19 2019, 11:28 AM

And you'll need to squash your commits (but not with @anlambert's initial commit, to preserve ownership information)


Vault item object is as it is stored in local storage.


Meh. Ok then.

  • rebase
  • changes acc to requested changes
  • commit msgs updated
  • revision[0] -> revisions[0]
This revision is now accepted and ready to land.Aug 19 2019, 4:57 PM

Let's wait for the build result first

This revision now requires changes to proceed.Aug 19 2019, 4:58 PM
This revision is now accepted and ready to land.Aug 20 2019, 10:54 AM
This revision was automatically updated to reflect the committed changes.