Page MenuHomeSoftware Heritage

Add frontend test for metadata search
Closed, MigratedEdits Locked

Description

Currently, the "search in metadata (instead of URL)" option of the archive search is not tested by frontend tests.

To fix this, we need to:

  1. Fill the indexer storage with some test metadata; either by inserting it directly or by calling a Metadata Indexer, see swh-web/swh/web/tests/data.py
  2. Write the test itself in cypress/integration/origin-search.spec.js that checks there's a result when searching for a subset of this metadata

Event Timeline

vlorentz triaged this task as Normal priority.Feb 14 2020, 3:57 PM
vlorentz created this task.

I tried this one and the build is failing because of adding 'metadata' in _TEST_ORIGINS entries. I will fix it soon but can someone suggest to me how to write better test cases for this one? I am new to testing and I didn't exactly understand what @vlorentz meant here by saying 'searching for a subset of this metadata'.

Thank you