feature/IO-3181-Test-Framework-Selection - Skeletons complete
This commit is contained in:
@@ -12,3 +12,5 @@ VITE_APP_AXIOS_BASE_API_URL=/api/
|
|||||||
VITE_APP_REPORTS_SERVER_URL=https://reports.test.imex.online
|
VITE_APP_REPORTS_SERVER_URL=https://reports.test.imex.online
|
||||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||||
VITE_APP_INSTANCE=IMEX
|
VITE_APP_INSTANCE=IMEX
|
||||||
|
TEST_USERNAME="test@imex.dev"
|
||||||
|
TEST_PASSWORD="test123"
|
||||||
|
|||||||
@@ -14,3 +14,5 @@ VITE_APP_REPORTS_SERVER_URL=https://reports.test.romeonline.io
|
|||||||
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
VITE_APP_SPLIT_API=ts615lqgnmk84thn72uk18uu5pgce6e0l4rc
|
||||||
VITE_APP_COUNTRY=USA
|
VITE_APP_COUNTRY=USA
|
||||||
VITE_APP_INSTANCE=ROME
|
VITE_APP_INSTANCE=ROME
|
||||||
|
TEST_USERNAME="test@imex.dev"
|
||||||
|
TEST_PASSWORD="test123"
|
||||||
|
|||||||
@@ -102,7 +102,11 @@
|
|||||||
"eulaize": "node src/utils/eulaize.js",
|
"eulaize": "node src/utils/eulaize.js",
|
||||||
"test:unit": "vitest run",
|
"test:unit": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"test:e2e": "playwright test"
|
"test:e2e:imex": "playwright test --config playwright.config.js",
|
||||||
|
"test:e2e:rome": "playwright test --config playwright.rome.config.js",
|
||||||
|
"test:e2e:imex:headed": "playwright test --config playwright.config.js --headed",
|
||||||
|
"test:e2e:rome:headed": "playwright test --config playwright.rome.config.js --headed",
|
||||||
|
"test:e2e:report": "playwright show-report"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"production": [
|
"production": [
|
||||||
|
|||||||
@@ -1,8 +1,16 @@
|
|||||||
import { defineConfig } from "@playwright/test";
|
import { defineConfig } from "@playwright/test";
|
||||||
|
import dotenv from "dotenv";
|
||||||
|
|
||||||
|
dotenv.config({
|
||||||
|
path: "./.env.development.imex",
|
||||||
|
prefix: "TEST_"
|
||||||
|
});
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: "./tests/e2e",
|
testDir: "./tests/e2e",
|
||||||
testMatch: "*.e2e.js",
|
testMatch: "*.e2e.js",
|
||||||
|
timeout: 60 * 1000,
|
||||||
|
reporter: [["list"], ["html"]],
|
||||||
use: {
|
use: {
|
||||||
baseURL: "https://localhost:3000",
|
baseURL: "https://localhost:3000",
|
||||||
browser: "chromium",
|
browser: "chromium",
|
||||||
@@ -10,7 +18,8 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "npm run start:imex",
|
command: "npm run start:imex",
|
||||||
port: 3000,
|
ignoreHTTPSErrors: true,
|
||||||
|
url: "https://localhost:3000/health", // Health check endpoint will tell us when the server is ready
|
||||||
reuseExistingServer: !process.env.CI // Reuse server locally, not in CI
|
reuseExistingServer: !process.env.CI // Reuse server locally, not in CI
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
25
client/playwright.rome.config.js
Normal file
25
client/playwright.rome.config.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { defineConfig } from "@playwright/test";
|
||||||
|
import dotenv from "dotenv";
|
||||||
|
|
||||||
|
dotenv.config({
|
||||||
|
path: "./.env.development.rome",
|
||||||
|
prefix: "TEST_"
|
||||||
|
});
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
testDir: "./tests/e2e",
|
||||||
|
testMatch: "*.e2e.js",
|
||||||
|
timeout: 60 * 1000,
|
||||||
|
reporter: [["list"], ["html"]],
|
||||||
|
use: {
|
||||||
|
baseURL: "https://localhost:3000",
|
||||||
|
browser: "chromium",
|
||||||
|
ignoreHTTPSErrors: true
|
||||||
|
},
|
||||||
|
webServer: {
|
||||||
|
command: "npm run start:rome",
|
||||||
|
ignoreHTTPSErrors: true,
|
||||||
|
url: "https://localhost:3000/health", // Health check endpoint will tell us when the server is ready
|
||||||
|
reuseExistingServer: !process.env.CI // Reuse server locally, not in CI
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -3,8 +3,8 @@ import { login } from "./utils/login";
|
|||||||
|
|
||||||
test.describe("SignInComponent", () => {
|
test.describe("SignInComponent", () => {
|
||||||
test("successfully logs in with valid credentials", async ({ page }) => {
|
test("successfully logs in with valid credentials", async ({ page }) => {
|
||||||
const email = "dave@imex.dev";
|
const email = process.env.TEST_USERNAME;
|
||||||
const password = "dave123";
|
const password = process.env.TEST_PASSWORD;
|
||||||
|
|
||||||
await login(page, { email, password });
|
await login(page, { email, password });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user