Merged in chore/remove-cypress (pull request #3066)
chore: remove unused dependencies * chore: remove cypress * remove unused deps * update yarn.lock after removing unused deps Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -12,7 +12,6 @@ CURITY_CLIENT_ID_USER=""
|
||||
CURITY_CLIENT_SECRET_USER=""
|
||||
CURITY_ISSUER_USER="https://testlogin.scandichotels.com"
|
||||
CURITY_ISSUER_SERVICE="https://testlogin.scandichotels.com"
|
||||
CYPRESS_BASE_URL="http://localhost:3000"
|
||||
# See next.config.js for info
|
||||
DEPLOY_PRIME_URL="http://localhost:3000"
|
||||
NEXTAUTH_REDIRECT_PROXY_URL="http://localhost:3000/api/web/auth"
|
||||
|
||||
@@ -13,10 +13,6 @@ CURITY_CLIENT_ID_USER="test"
|
||||
CURITY_CLIENT_SECRET_USER="test"
|
||||
CURITY_ISSUER_USER="test"
|
||||
CURITY_ISSUER_SERVICE="test"
|
||||
CYPRESS_API_BASEURL="test"
|
||||
CYPRESS_CURITY_USERNAME="test"
|
||||
CYPRESS_CURITY_PASSWORD="test"
|
||||
CYPRESS_BASE_URL="test"
|
||||
DEPLOY_PRIME_URL="test"
|
||||
NEXTAUTH_SECRET="test"
|
||||
NEXT_PUBLIC_PUBLIC_URL="test"
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
import { defineConfig } from "cypress"
|
||||
import { config } from "dotenv"
|
||||
|
||||
config({ path: "./.env.local" })
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
baseUrl: process.env.CYPRESS_BASE_URL,
|
||||
setupNodeEvents(on, config) {},
|
||||
},
|
||||
|
||||
component: {
|
||||
devServer: {
|
||||
bundler: "webpack",
|
||||
framework: "next",
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -1,32 +0,0 @@
|
||||
describe("About page", () => {
|
||||
it("should load in Danish", () => {
|
||||
cy.visit("/da/kundeservice/sporgsmal-og-svar/om-scandics-website")
|
||||
cy.get("h1").contains("SCANDICS WEBSITE – SPØRGSMÅL OG SVAR")
|
||||
})
|
||||
it("should load in German", () => {
|
||||
cy.visit(
|
||||
"/de/kundenbetreuung/haufig-gestellte-fragen/nutzung-der-internetseite"
|
||||
)
|
||||
cy.get("h1").contains("SCANDICS WEBSEITE – FRAGEN UND ANTWORTEN")
|
||||
})
|
||||
it("should load in English", () => {
|
||||
cy.visit(
|
||||
"/en/customer-service/frequently-asked-questions/using-the-website"
|
||||
)
|
||||
cy.get("h1").contains("SCANDIC WEBSITE – QUESTIONS AND ANSWERS")
|
||||
})
|
||||
it("should load in Finnish", () => {
|
||||
cy.visit(
|
||||
"/fi/asiakaspalvelu/usein-kysytyt-kysymykset/tietoja-internetsivuista"
|
||||
)
|
||||
cy.get("h1").contains("SCANDIC-VERKKOSIVUT – KYSYMYKSIÄ JA VASTAUKSIA")
|
||||
})
|
||||
it("should load in Norwegian", () => {
|
||||
cy.visit("/no/kundeservice/sporsmal-og-svar/bruk-av-nettsiden")
|
||||
cy.get("h1").contains("SCANDIC-NETTSTEDET – SPØRSMÅL OG SVAR")
|
||||
})
|
||||
it("should load in Swedish", () => {
|
||||
cy.visit("/sv/kundservice/fragor-och-svar/om-scandics-webbplats")
|
||||
cy.get("h1").contains("SCANDICS WEBBPLATS - FRÅGOR OCH SVAR")
|
||||
})
|
||||
})
|
||||
@@ -1,26 +0,0 @@
|
||||
describe("Sponsoring page", () => {
|
||||
it("should load in Danish", () => {
|
||||
cy.visit("/da/sponsorering")
|
||||
cy.get("h1").contains("SCANDICS SYN PÅ SPONSORATER")
|
||||
})
|
||||
it("should load in German", () => {
|
||||
cy.visit("/de/sponsoring")
|
||||
cy.get("h1").contains("SPONSORING BEI SCANDIC")
|
||||
})
|
||||
it("should load in English", () => {
|
||||
cy.visit("/en/sponsoring")
|
||||
cy.get("h1").contains("SCANDIC'S TAKE ON SPONSORSHIP")
|
||||
})
|
||||
it("should load in Finnish", () => {
|
||||
cy.visit("/fi/sponsorointi")
|
||||
cy.get("h1").contains("SCANDIC JA SPONSOROINTI")
|
||||
})
|
||||
it("should load in Norwegian", () => {
|
||||
cy.visit("/no/vi-sponser")
|
||||
cy.get("h1").contains("SCANDICS SYN PÅ SPONSING")
|
||||
})
|
||||
it("should load in Swedish", () => {
|
||||
cy.visit("/sv/vi-sponsrar")
|
||||
cy.get("h1").contains("SÅ SER SCANDIC PÅ SPONSRING")
|
||||
})
|
||||
})
|
||||
@@ -1,26 +0,0 @@
|
||||
describe("Wifi page", () => {
|
||||
it("should load in Danish", () => {
|
||||
cy.visit("/da/oplev-scandic/wifi")
|
||||
cy.get("h1").contains("FRI WIFI ER EN SELVFØLGE")
|
||||
})
|
||||
it("should load in German", () => {
|
||||
cy.visit("/de/scandic-entdecken/wlan")
|
||||
cy.get("h1").contains("GRATIS WLAN IST EINE SELBSTVERSTÄNDLICHKEIT")
|
||||
})
|
||||
it("should load in English", () => {
|
||||
cy.visit("/en/explore-scandic/wifi")
|
||||
cy.get("h1").contains("FREE WI-FI GOES WITHOUT SAYING")
|
||||
})
|
||||
it("should load in Finnish", () => {
|
||||
cy.visit("/fi/koe-scandic/maksuton-internetyhteys")
|
||||
cy.get("h1").contains("MAKSUTON WI-FI")
|
||||
})
|
||||
it("should load in Norwegian", () => {
|
||||
cy.visit("/no/utforsk-scandic/wifi")
|
||||
cy.get("h1").contains("SELVFØLGELIG HAR VI GRATIS WIFI")
|
||||
})
|
||||
it("should load in Swedish", () => {
|
||||
cy.visit("/sv/utforska-scandic/wi-fi")
|
||||
cy.get("h1").contains("FRITT WIFI, SÅ KLART")
|
||||
})
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "Using fixtures to represent data",
|
||||
"email": "hello@cypress.io",
|
||||
"body": "Fixtures are a great way to mock data for responses to routes"
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/// <reference types="cypress" />
|
||||
// ***********************************************
|
||||
// This example commands.ts shows you how to
|
||||
// create various custom commands and overwrite
|
||||
// existing commands.
|
||||
//
|
||||
// For more comprehensive examples of custom
|
||||
// commands please read more here:
|
||||
// https://on.cypress.io/custom-commands
|
||||
// ***********************************************
|
||||
//
|
||||
//
|
||||
// -- This is a parent command --
|
||||
// Cypress.Commands.add('login', (email, password) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a child command --
|
||||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This is a dual command --
|
||||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
//
|
||||
//
|
||||
// -- This will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
||||
//
|
||||
// declare global {
|
||||
// namespace Cypress {
|
||||
// interface Chainable {
|
||||
// login(email: string, password: string): Chainable<void>
|
||||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
||||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -1,14 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
||||
<title>Components App</title>
|
||||
<!-- Used by Next.js to inject CSS. -->
|
||||
<div id="__next_css__DO_NOT_USE__"></div>
|
||||
</head>
|
||||
<body>
|
||||
<div data-cy-root></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,38 +0,0 @@
|
||||
// ***********************************************************
|
||||
// This example support/component.ts is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands"
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
import { mount } from "cypress/react"
|
||||
|
||||
// Augment the Cypress namespace to include type definitions for
|
||||
// your custom command.
|
||||
// Alternatively, can be defined in cypress/support/component.d.ts
|
||||
// with a <reference path="./component" /> at the top of your spec.
|
||||
declare global {
|
||||
namespace Cypress {
|
||||
interface Chainable {
|
||||
mount: typeof mount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Cypress.Commands.add("mount", mount)
|
||||
|
||||
// Example use:
|
||||
// cy.mount(<MyComponent />)
|
||||
@@ -1,30 +0,0 @@
|
||||
// ***********************************************************
|
||||
// This example support/e2e.ts is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands"
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
Cypress.on("uncaught:exception", (err) => {
|
||||
// https://github.com/cypress-io/cypress/issues/27204
|
||||
// Cypress and React Hydrating the document don't get along
|
||||
// for some unknown reason. Hopefully, we figure out why eventually
|
||||
// so we can remove this.
|
||||
// Maybe React 19 (that has changes to hydration logic) might solve this.
|
||||
if (/hydration|hydrating/i.test(err.message)) {
|
||||
return false
|
||||
}
|
||||
})
|
||||
2
apps/scandic-web/env/server.ts
vendored
2
apps/scandic-web/env/server.ts
vendored
@@ -29,7 +29,6 @@ export const env = createEnv({
|
||||
CURITY_CLIENT_SECRET_USER: z.string(),
|
||||
CURITY_ISSUER_USER: z.string(),
|
||||
CURITY_ISSUER_SERVICE: z.string(),
|
||||
CYPRESS_BASE_URL: z.string().default("http://127.0.0.1:3000"),
|
||||
ENVTEST: z.string().optional(),
|
||||
// https://env.t3.gg/docs/recipes#booleans
|
||||
NEXTAUTH_DEBUG: z
|
||||
@@ -173,7 +172,6 @@ export const env = createEnv({
|
||||
CURITY_CLIENT_SECRET_USER: process.env.CURITY_CLIENT_SECRET_USER,
|
||||
CURITY_ISSUER_USER: process.env.CURITY_ISSUER_USER,
|
||||
CURITY_ISSUER_SERVICE: process.env.CURITY_ISSUER_SERVICE,
|
||||
CYPRESS_BASE_URL: process.env.CYPRESS_TEST_URL,
|
||||
ENVTEST: process.env.ENVTEST,
|
||||
NEXTAUTH_DEBUG: process.env.NEXTAUTH_DEBUG,
|
||||
NEXTAUTH_REDIRECT_PROXY_URL: process.env.NEXTAUTH_REDIRECT_PROXY_URL,
|
||||
|
||||
@@ -10,23 +10,6 @@ command = "yarn test --filter=@scandic-hotels/scandic-web && yarn build:web"
|
||||
[context.deploy-preview]
|
||||
command = "yarn test --filter=@scandic-hotels/scandic-web && yarn build:web"
|
||||
|
||||
# [[plugins]]
|
||||
# package = "netlify-plugin-cypress"
|
||||
# [plugins.inputs]
|
||||
# configFile = "cypress.config.ts"
|
||||
# [plugins.inputs.postBuild]
|
||||
# enable = true
|
||||
# start = "npm start"
|
||||
# wait-on = "http://127.0.0.1:3000/en/sponsoring"
|
||||
# wait-on-timeout = "30" # seconds
|
||||
|
||||
[build.environment]
|
||||
# cache Cypress binary in local "node_modules" folder
|
||||
# so Netlify caches it
|
||||
CYPRESS_CACHE_FOLDER = "./node_modules/CypressBinary"
|
||||
# set TERM variable for terminal output
|
||||
TERM = "xterm"
|
||||
|
||||
[[plugins]]
|
||||
package = "@netlify/plugin-nextjs"
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
"lint": "yarn clean && next lint --max-warnings 0 && tsc",
|
||||
"lint:fix": "yarn clean && next lint --fix --max-warnings 0 && tsc",
|
||||
"start": "node .next/standalone/server.js",
|
||||
"test:component": "cypress open --component",
|
||||
"test:component:headless": "cypress run --component",
|
||||
"test:e2e": "start-server-and-test test:setup http://127.0.0.1:3000/en/sponsoring \"cypress open --e2e\"",
|
||||
"test:e2e:headless": "start-server-and-test test:setup http://127.0.0.1:3000/en/sponsoring \"cypress run --e2e\"",
|
||||
"test:setup": "yarn build && yarn start",
|
||||
"preinstall": "/bin/sh -c \"export $(cat .env.local | grep -v '^#' | xargs)\"",
|
||||
"test": "vitest run",
|
||||
@@ -116,7 +112,6 @@
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"adm-zip": "^0.5.16",
|
||||
"babel-plugin-formatjs": "^10.5.39",
|
||||
"cypress": "^14.3.3",
|
||||
"dotenv": "^16.5.0",
|
||||
"eslint": "^9",
|
||||
"eslint-config-next": "15.3.2",
|
||||
@@ -125,13 +120,8 @@
|
||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||
"jiti": "^1.21.0",
|
||||
"jsdom": "^26.1.0",
|
||||
"json-sort-cli": "^4.0.9",
|
||||
"lint-staged": "^15.5.2",
|
||||
"netlify-plugin-cypress": "^2.2.1",
|
||||
"schema-dts": "^1.1.5",
|
||||
"start-server-and-test": "^2.0.11",
|
||||
"ts-morph": "^25.0.1",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "5.8.3",
|
||||
"vite-tsconfig-paths": "^5.1.4",
|
||||
"vitest": "^3.2.4"
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
"jiti": "^1.21.0",
|
||||
"lint-staged": "^15.2.2",
|
||||
"prettier": "^3.6.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"turbo": "^2.5.2"
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
Reference in New Issue
Block a user