diff --git a/cypress.config.ts b/cypress.config.ts index eaaf3ee1..5c07d6ad 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -7,7 +7,6 @@ export default defineConfig({ const port = process.env.PORT ?? (isDev ? "3000" : "8811"); const configOverrides: Partial = { baseUrl: `http://localhost:${port}`, - video: !process.env.CI, screenshotOnRunFailure: !process.env.CI, }; diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index e7751d1f..213fff2c 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -91,6 +91,8 @@ function visitAndCheck(url: string, waitTime = 1000) { cy.location("pathname").should("contain", url).wait(waitTime); } -Cypress.Commands.add("login", login); -Cypress.Commands.add("cleanupUser", cleanupUser); -Cypress.Commands.add("visitAndCheck", visitAndCheck); +export const registerCommands = () => { + Cypress.Commands.add("login", login); + Cypress.Commands.add("cleanupUser", cleanupUser); + Cypress.Commands.add("visitAndCheck", visitAndCheck); +}; diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index baa9411a..e2c28ef0 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -1,5 +1,7 @@ import "@testing-library/cypress/add-commands"; -import "./commands"; +import { registerCommands } from "./commands"; + +registerCommands(); Cypress.on("uncaught:exception", (err) => { // Cypress and React Hydrating the document don't get along diff --git a/package.json b/package.json index 6cf0d40e..85959f83 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "compression": "^1.7.4", "cross-env": "^7.0.3", "express": "^4.18.2", - "isbot": "^3.6.13", + "isbot": "^3.7.0", "morgan": "^1.10.0", "prom-client": "^14.2.0", "react": "^18.2.0", @@ -51,55 +51,55 @@ "tiny-invariant": "^1.3.1" }, "devDependencies": { - "@faker-js/faker": "^8.0.2", + "@faker-js/faker": "^8.2.0", "@remix-run/dev": "*", - "@testing-library/cypress": "^9.0.0", - "@testing-library/jest-dom": "^5.17.0", - "@types/bcryptjs": "^2.4.2", - "@types/compression": "^1.7.2", - "@types/eslint": "^8.44.2", - "@types/express": "^4.17.17", - "@types/morgan": "^1.9.4", - "@types/node": "^18.17.6", - "@types/react": "^18.2.20", - "@types/react-dom": "^18.2.7", - "@types/source-map-support": "^0.5.6", - "@typescript-eslint/eslint-plugin": "^6.7.4", - "@typescript-eslint/parser": "^6.7.4", - "@vitejs/plugin-react": "^4.0.4", - "@vitest/coverage-v8": "^0.34.2", - "autoprefixer": "^10.4.15", + "@testing-library/cypress": "^10.0.1", + "@testing-library/jest-dom": "^6.1.4", + "@types/bcryptjs": "^2.4.5", + "@types/compression": "^1.7.4", + "@types/eslint": "^8.44.6", + "@types/express": "^4.17.20", + "@types/morgan": "^1.9.7", + "@types/node": "^18.18.6", + "@types/react": "^18.2.31", + "@types/react-dom": "^18.2.14", + "@types/source-map-support": "^0.5.9", + "@typescript-eslint/eslint-plugin": "^6.8.0", + "@typescript-eslint/parser": "^6.8.0", + "@vitejs/plugin-react": "^4.1.0", + "@vitest/coverage-v8": "^0.34.6", + "autoprefixer": "^10.4.16", "cookie": "^0.5.0", - "cypress": "12.17.3", + "cypress": "^13.3.2", "dotenv": "^16.3.1", - "esbuild": "^0.19.2", - "eslint": "^8.50.0", + "esbuild": "^0.19.5", + "eslint": "^8.52.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-cypress": "^2.15.1", "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jest": "^27.4.2", + "eslint-plugin-jest": "^27.4.3", "eslint-plugin-jest-dom": "^5.1.0", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-markdown": "^3.0.1", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-testing-library": "^6.0.2", - "happy-dom": "^10.10.4", - "msw": "^1.2.3", + "eslint-plugin-testing-library": "^6.1.0", + "happy-dom": "^12.9.1", + "msw": "^1.3.2", "npm-run-all": "^4.1.5", - "postcss": "^8.4.28", - "prettier": "3.0.2", - "prettier-plugin-tailwindcss": "^0.5.3", + "postcss": "^8.4.31", + "prettier": "3.0.3", + "prettier-plugin-tailwindcss": "^0.5.6", "prisma": "^4.16.2", - "start-server-and-test": "^2.0.0", + "start-server-and-test": "^2.0.1", "tailwindcss": "^3.3.3", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", - "typescript": "^5.1.6", - "vite": "^4.4.9", - "vite-tsconfig-paths": "^3.6.0", - "vitest": "^0.34.2" + "typescript": "^5.2.2", + "vite": "^4.5.0", + "vite-tsconfig-paths": "^4.2.1", + "vitest": "^0.34.6" }, "engines": { "node": ">=18.0.0" diff --git a/test/setup-test-env.ts b/test/setup-test-env.ts index 48fcc431..8f910daf 100644 --- a/test/setup-test-env.ts +++ b/test/setup-test-env.ts @@ -1,4 +1,4 @@ import { installGlobals } from "@remix-run/node"; -import "@testing-library/jest-dom/extend-expect"; +import "@testing-library/jest-dom/vitest"; installGlobals();