722b1e78ed
- Introduced Playwright configuration for e2e testing. - Implemented authentication tests to validate login functionality. - Created tests for GRN (Goods Receipt Note) to ensure proper stock handling. - Developed production run tests to verify lifecycle and stock posting. - Added stock transfer tests to check movement between warehouses. - Implemented stock adjustment tests for positive and negative adjustments. - Established API seeder for test data setup and verification. - Enhanced utility functions for UI interactions and response handling.
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test"
|
|
import { env, AUTH_STORAGE_STATE } from "./support/env"
|
|
|
|
export default defineConfig({
|
|
testDir: "./specs",
|
|
fullyParallel: false, // specs share warehouse/item reference data via the ledger - keep runs serial per file
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 1 : 0,
|
|
// Multiple workers hit the local dev backend concurrently across spec files and it can't
|
|
// take it: confirmed reference-data GETs (e.g. /warehouses) intermittently 500 under 2+
|
|
// workers against a plain `dotnet run` + local Postgres, and pass every time at workers: 1.
|
|
// Bump this only against a backend that can actually take concurrent load (a real CI service
|
|
// container, not a single dev-mode process).
|
|
workers: 1,
|
|
reporter: [["html", { open: "never" }], ["list"]],
|
|
timeout: 45_000,
|
|
expect: { timeout: 10_000 },
|
|
use: {
|
|
baseURL: env.baseUrl,
|
|
trace: "on-first-retry",
|
|
screenshot: "only-on-failure",
|
|
video: "retain-on-failure",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "setup",
|
|
testMatch: /global\.setup\.ts/,
|
|
},
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"], storageState: AUTH_STORAGE_STATE },
|
|
dependencies: ["setup"],
|
|
},
|
|
],
|
|
})
|