Closed cldellow closed 1 year ago
Open question - can we integrate Cypress tests with codecov? Would be nice to get a blended picture of coverage
Rough idea: add e2e_test_host.py
that looks like:
import sys
from datasette.cli import cli
sys.exit(cli())
Have a pre-canned cooking.db
that we can fetch from the web. It should be duxed already so we don't have to wait for the indexers to run.
Then as a Cypress setup step do:
coverage run -m e2e_test_host
Then do the Cypress stuff.
Then Ctrl+C the coverage process (how?)
Then we should have an accurate capture of the backend stuff.
This will have exercised the JS, but the JS is not instrumented, so we won't have coverage data... that's probably OK for the moment, though it would be nice to have a more complete picture.
The April 2011 DIY meta dump is only 500kb as a SQLite db, let's prefer to use that for testing (vs cooking @ 35MB or superuser @ 435MB)
That also indexes basically immediately, it has like ~3,000 rows total. I think we could use it in non-duxed form as the starting point for the tests, which would be convenient for also testing indexing.
Fixed in https://github.com/cldellow/datasette-ui-extras/pull/91
The tests are very smokey, but I think that's a reasonable balance for the moment
I think the big picture architecture is stable now. It'd be good to add at least smoke tests that validate that monkey patches haven't broken when Datasette releases new versions.