From dbbe52e444c747b645905c56e0d3fbc67d3e9f01 Mon Sep 17 00:00:00 2001 From: SPT-dev Date: Thu, 2 Mar 2023 21:12:45 -0500 Subject: [PATCH] test: Add cypress script --- items/frontend/package.json | 2 +- items/frontend/{ => src}/cypress/fixtures/condensed_milk.json | 0 items/frontend/src/cypress/integration/search.spec.tsx | 2 +- items/frontend/src/cypress/integration/url-check.spec.tsx | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename items/frontend/{ => src}/cypress/fixtures/condensed_milk.json (100%) diff --git a/items/frontend/package.json b/items/frontend/package.json index 766b10d..460cf14 100644 --- a/items/frontend/package.json +++ b/items/frontend/package.json @@ -41,7 +41,7 @@ "cy:start:wait": "start-server-and-test cy:start:app http://localhost:3000", "cy:install": "cypress install", "cy:verify": "cypress verify", - "cy:run:ci": "cross-env CYPRESS_BASE_URL=http://frontend:3000 cypress run", + "cy:run:ci": "cross-env CYPRESS_BASE_URL=http://frontend:3000 cypress run --browser chrome", "cy:open": "yarn run cy:start:wait -- \"cypress open\"", "cy:run": "yarn run wait-on http-get://frontend:3000 && yarn run cy:install && yarn run cy:verify && yarn run cy:run:ci", "eject": "react-scripts eject" diff --git a/items/frontend/cypress/fixtures/condensed_milk.json b/items/frontend/src/cypress/fixtures/condensed_milk.json similarity index 100% rename from items/frontend/cypress/fixtures/condensed_milk.json rename to items/frontend/src/cypress/fixtures/condensed_milk.json diff --git a/items/frontend/src/cypress/integration/search.spec.tsx b/items/frontend/src/cypress/integration/search.spec.tsx index 19851a0..51ee3be 100644 --- a/items/frontend/src/cypress/integration/search.spec.tsx +++ b/items/frontend/src/cypress/integration/search.spec.tsx @@ -1,4 +1,4 @@ -import condensedMilk from "../../../cypress/fixtures/condensed_milk.json"; +import condensedMilk from "../fixtures/condensed_milk.json"; export {}; diff --git a/items/frontend/src/cypress/integration/url-check.spec.tsx b/items/frontend/src/cypress/integration/url-check.spec.tsx index 116d644..802a7dd 100644 --- a/items/frontend/src/cypress/integration/url-check.spec.tsx +++ b/items/frontend/src/cypress/integration/url-check.spec.tsx @@ -1,6 +1,6 @@ export {}; -import condensedMilk from '../../../cypress/fixtures/condensed_milk.json' +import condensedMilk from '../fixtures/condensed_milk.json' describe('Url check', () => { beforeEach(() => {