Compare commits
No commits in common. "7ee4bac3fad3eecb34bda651645c78a488aab10f" and "89c295e6d20be9d92f79ae18df4a9061f49b744b" have entirely different histories.
7ee4bac3fa
...
89c295e6d2
5 changed files with 2 additions and 36 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
vendor/
|
vendor/
|
||||||
node_modules/
|
node_modules/
|
||||||
data/*.json
|
data/
|
||||||
.direnv/
|
.direnv/
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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));
|
|
||||||
}
|
|
||||||
|
|
@ -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));
|
|
||||||
}
|
|
||||||
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue