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', () => {
|
describe('The admin page', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
cy.exec('npm run db:seed')
|
||||||
cy.visit('/admin')
|
cy.visit('/admin')
|
||||||
})
|
})
|
||||||
|
afterEach(() => {
|
||||||
|
cy.exec('npm run db:wipe')
|
||||||
|
})
|
||||||
|
|
||||||
it('navigates to texts page', () => {
|
it('navigates to texts page', () => {
|
||||||
cy.get('#texts').click()
|
cy.get('#texts').click()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"cypress:dev": "cypress open",
|
"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": {
|
"devDependencies": {
|
||||||
"cypress": "^15.12.0"
|
"cypress": "^15.12.0"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue