feat: update E2E testing configuration to use ssl

This commit is contained in:
ramvignesh-b
2026-04-16 04:26:29 +05:30
parent cc8e3e4e4e
commit b08d505a5a
13 changed files with 249 additions and 36 deletions
+3
View File
@@ -34,6 +34,7 @@
"@types/node": "^25.6.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-basic-ssl": "^2.3.0",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.4",
"dotenv": "^17.4.2",
@@ -257,6 +258,8 @@
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
"@vitejs/plugin-basic-ssl": ["@vitejs/plugin-basic-ssl@2.3.0", "", { "peerDependencies": { "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-bdyo8rB3NnQbikdMpHaML9Z1OZPBu6fFOBo+OtxsBlvMJtysWskmBcnbIDhUqgC8tcxNv/a+BcV5U+2nQMm1OQ=="],
"@vitejs/plugin-react": ["@vitejs/plugin-react@6.0.1", "", { "dependencies": { "@rolldown/pluginutils": "1.0.0-rc.7" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler"] }, "sha512-l9X/E3cDb+xY3SWzlG1MOGt2usfEHGMNIaegaUGFsLkb3RCn/k8/TOXBcab+OndDI4TBtktT8/9BwwW8Vi9KUQ=="],
"@vitest/coverage-v8": ["@vitest/coverage-v8@4.1.4", "", { "dependencies": { "@bcoe/v8-coverage": "^1.0.2", "@vitest/utils": "4.1.4", "ast-v8-to-istanbul": "^1.0.0", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.2.0", "magicast": "^0.5.2", "obug": "^2.1.1", "std-env": "^4.0.0-rc.1", "tinyrainbow": "^3.1.0" }, "peerDependencies": { "@vitest/browser": "4.1.4", "vitest": "4.1.4" }, "optionalPeers": ["@vitest/browser"] }, "sha512-x7FptB5oDruxNPDNY2+S8tCh0pcq7ymCe1gTHcsp733jYjrJl8V1gMUlVysuCD9Kz46Xz9t1akkv08dPcYDs1w=="],
+1
View File
@@ -47,6 +47,7 @@
"@types/node": "^25.6.0",
"@types/react": "^19.2.14",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-basic-ssl": "^2.3.0",
"@vitejs/plugin-react": "^6.0.1",
"@vitest/coverage-v8": "^4.1.4",
"dotenv": "^17.4.2",
+5
View File
@@ -33,6 +33,10 @@ export default defineConfig({
trace: "on-first-retry",
/* Capture screenshot on failure */
screenshot: "only-on-failure",
/* Capture video on failure */
video: "retain-on-failure",
/* Ignore HTTPS errors */
ignoreHTTPSErrors: true,
},
/* Configure projects for major browsers */
@@ -52,5 +56,6 @@ export default defineConfig({
command: "bun run dev",
url: process.env.FRONTEND_URL,
reuseExistingServer: !process.env.CI,
ignoreHTTPSErrors: true,
},
});
+10
View File
@@ -1,3 +1,5 @@
import fs from "node:fs";
import path from "node:path";
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { defineConfig, loadEnv } from "vite";
@@ -11,6 +13,14 @@ export default defineConfig(({ mode }) => {
server: {
port: Number(env.FRONTEND_PORT),
host: env.FRONTEND_DOMAIN,
https: {
key: fs.readFileSync(
path.resolve(__dirname, "../certs/localhost-key.pem"),
),
cert: fs.readFileSync(
path.resolve(__dirname, "../certs/localhost.pem"),
),
},
},
};
});