add seed and wipe commands for e2e tests

This commit is contained in:
Yisroel Baum 2026-04-15 21:08:54 +03:00
parent 89c295e6d2
commit 7e674af40a
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
2 changed files with 7 additions and 1 deletions

View file

@ -1,7 +1,11 @@
describe('The admin page', () => {
beforeEach(() => {
cy.exec('npm run db:seed')
cy.visit('/admin')
})
afterEach(() => {
cy.exec('npm run db:wipe')
})
it('navigates to texts page', () => {
cy.get('#texts').click()

View file

@ -1,7 +1,9 @@
{
"scripts": {
"cypress:dev": "cypress open",
"cypress:run": "cypress run"
"cypress:run": "cypress run",
"db:seed": "php data/seedDb.php",
"db:wipe": "php data/wipeDb.php"
},
"devDependencies": {
"cypress": "^15.12.0"