-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49d362e
commit a2d4a22
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,8 +110,6 @@ jobs: | |
node-version-file: package.json | ||
- run: npm ci --include=dev | ||
- run: npm run migrate up | ||
- run: npm run fixtures:load-ci -- cypress/e2e/${{ matrix.e2e_test }}/fixtures.sql | ||
- run: npm run update-organization-info -- 500 | ||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
|
||
import { dirname } from "path"; | ||
|
||
// | ||
|
||
export function seed() { | ||
{ | ||
const command = "npm run delete-database"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command, { env: { ENABLE_DATABASE_DELETION: "True" } }).then( | ||
(result) => cy.task("log", result.stdout), | ||
); | ||
} | ||
{ | ||
const command = "npm run migrate up"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command).then((result) => cy.task("log", result.stdout)); | ||
} | ||
{ | ||
const scope = dirname(Cypress.spec.relative); | ||
const command = `npm run fixtures:load-ci -- ${scope}/fixtures.sql`; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command).then((result) => cy.task("log", result.stdout)); | ||
} | ||
{ | ||
const command = "npm run update-organization-info -- 2000"; | ||
cy.task("log", `$ ${command}`); | ||
cy.exec(command, { timeout: 10_000 }).then((result) => | ||
cy.task("log", result.stdout), | ||
); | ||
} | ||
|
||
return cy.wrap(undefined); | ||
} |