loculus-project / loculus

An open-source software package to power microbial genomic databases
https://loculus.org
GNU Affero General Public License v3.0
34 stars 1 forks source link

feat(e2e): Add tests that data submitted as restricted stays restricted state #2716

Closed anna-parker closed 1 week ago

anna-parker commented 2 weeks ago

resolves https://github.com/loculus-project/loculus/issues/2718, https://github.com/loculus-project/loculus/issues/702

preview URL: https://restricted-data-consisten.loculus.org/

Summary

  1. Adds a test that if data is submitted to the frontend with restricted status it will stay in this restricted status. In order to do this I add the option for the mocked prepro pipeline to process restricted data. Disclaimer: With our current e2e set up we cannot test this entire process. So I am actually just testing that if the prepro pipeline sends us restricted data we keep it restricted. The user sets a sequence to state restricted before we send it to the prepro pipeline and the e2e tests mock the entire interaction with the prepro pipeline. So in theory the prepro pipeline could just remove the restricted label and send us back open data and this test would not detect it.
  2. Fix error that was flagged when running tests locally: Warning: Each child in a list should have a unique "key" prop" is a valid error by adding a key to a map function.
  3. The e2e tests do not actually include the preprocessing pipeline, I will create a new issue to address this.

Screenshot

PR Checklist