redash/cypress/seed-data.js
Gabriel Dutra cfe12c5a5d Add DB Seed to Cypress and setup Percy (#3155)
* Update Cypress element selectors

* Add seed data function to Cypress

* Change Cypress setup to be part of db-seed

* Add DatabaseSource selector to Create Data Source spec

* Add getElement command to Cypress

* Fix eslint issues

* Change Cypress getElement to getByTestId

* Add Percy and test it with the CI

* Change Percy dependency for CI to Cypress' Dockerfile

* Change Percy's execution to the docker container
- add --no-save to avoid errors on Dockerfile.cypress
 - pass PERCY_TOKEN from the CI to docker container

* Fix missed char on CircleCI config file

* Move Percy execution back to host on the CI

* Test adding PERCY_TOKEN to frontend-e2e-tests on CI config

* Undo add PERCY_TOKEN to config.yml

* Add Percy token and .git folder to Cypress

* Remove Percy install from config.yml

* Ignore .git folder again and use Percy env vars instead

* Update PERCY_PULL_REQUEST to be CIRCLE_PR_NUMBER

* Update cypress-server.js to handle other cypress commands
- cypress-server.js -> cypress.js
- new commands added to cypress.js
- CircleCI config updated accordingly
- added a Homepage screenshot

* Remove trailing spaces

* Add Create Query spec

* Disable Cypress videos

* Update run browser to Chrome

* Add missing --browser chrome
2018-12-10 22:29:36 +02:00

36 lines
613 B
JavaScript

exports.seedData = [
{
route: '/setup',
type: 'form',
data: {
name: 'Example Admin',
email: 'admin@redash.io',
password: 'password',
org_name: 'Redash',
},
},
{
route: '/login',
type: 'form',
data: {
email: 'admin@redash.io',
password: 'password',
},
},
{
route: '/api/data_sources',
type: 'json',
data: {
name: 'Test PostgreSQL',
options: {
dbname: 'postgres',
host: 'postgres',
port: 5432,
sslmode: 'prefer',
user: 'postgres',
},
type: 'pg',
},
},
];