digitallinguistics / data-explorer

The DLx portal for viewing, searching, and aggregating data
https://data.digitallinguistics.io
MIT License
3 stars 0 forks source link

simplify integration tests #452

Closed dwhieb closed 1 year ago

dwhieb commented 1 year ago

Right now there are dozens of separate tests for the Lexeme Details page, because the tests use real data, which only ever exhibit one or two of the properties that need to be tested at a time.

You should seed the database before each test, and only use data relevant for that test.

You could also make generic test lexeme/language, and duplicate/modify that as needed.

Create one (or as few as possible) lexemes designed to test all of the fields in the Lexeme Details.

You'll still need other lexemes to test things on the Lexemes page and in other places, but for the purpose of the Lexeme Details you should have just a few.

Also include one very blank lexeme, to test the fallbacks that display when there's no data.