add seed and wipe commands for e2e tests
This commit is contained in:
parent
89c295e6d2
commit
7e674af40a
2 changed files with 7 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue