Compare commits

..

No commits in common. "7ee4bac3fad3eecb34bda651645c78a488aab10f" and "89c295e6d20be9d92f79ae18df4a9061f49b744b" have entirely different histories.

5 changed files with 2 additions and 36 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
vendor/ vendor/
node_modules/ node_modules/
data/*.json data/
.direnv/ .direnv/

View file

@ -1,11 +1,7 @@
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()

View file

@ -1,17 +0,0 @@
<?php
$texts = [
[
'id' => 0,
'name' => 'test text'
],
];
$fileDataMap = [
'texts.json' => $texts,
];
foreach ($fileDataMap as $file => $data) {
$path = __DIR__."/$file";
file_put_contents($path, json_encode($data, JSON_PRETTY_PRINT));
}

View file

@ -1,11 +0,0 @@
<?php
$files = [
'texts.json',
];
foreach ($files as $file) {
echo __DIR__."/$file";
$path = __DIR__."/$file";
file_put_contents($path, json_encode([], JSON_PRETTY_PRINT));
}

View file

@ -1,9 +1,7 @@
{ {
"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"