2023-06-20 12:49:48 +00:00
|
|
|
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
|
|
|
|
/**
|
|
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
|
*/
|
|
|
|
export default defineConfig({
|
|
|
|
testDir: "./test",
|
|
|
|
fullyParallel: true,
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
retries: process.env.CI ? 2 : 0,
|
2023-10-17 05:42:38 +00:00
|
|
|
workers: 1,
|
2023-10-25 15:24:26 +00:00
|
|
|
reporter: process.env.CI ? "github" : "list",
|
2023-06-20 12:49:48 +00:00
|
|
|
use: {
|
2023-08-14 14:41:58 +00:00
|
|
|
baseURL: process.env.CI
|
|
|
|
? "http://localhost:8080/realms/master/account/"
|
|
|
|
: "http://localhost:8080/",
|
2023-06-20 12:49:48 +00:00
|
|
|
trace: "on-first-retry",
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Configure projects for major browsers */
|
|
|
|
projects: [
|
2023-07-07 14:34:54 +00:00
|
|
|
{ name: "setup", testMatch: /.auth\.setup\.ts/ },
|
|
|
|
{
|
2023-08-31 09:32:39 +00:00
|
|
|
name: "import realms",
|
|
|
|
testMatch: /realm\.setup\.ts/,
|
|
|
|
teardown: "del realms",
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
|
|
|
{
|
2023-08-31 09:32:39 +00:00
|
|
|
name: "del realms",
|
|
|
|
testMatch: /realm\.teardown\.ts/,
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
2023-06-20 12:49:48 +00:00
|
|
|
{
|
|
|
|
name: "chromium",
|
|
|
|
use: {
|
|
|
|
...devices["Desktop Chrome"],
|
|
|
|
storageState: ".auth/user.json",
|
|
|
|
},
|
2023-08-31 09:32:39 +00:00
|
|
|
dependencies: ["setup", "import realms"],
|
2023-09-12 11:54:38 +00:00
|
|
|
testIgnore: ["**/personal-info.spec.ts"],
|
2023-06-20 12:49:48 +00:00
|
|
|
},
|
2023-09-12 11:54:38 +00:00
|
|
|
{
|
|
|
|
name: "personal-info",
|
|
|
|
use: {
|
|
|
|
...devices["Desktop Chrome"],
|
|
|
|
},
|
|
|
|
dependencies: ["import realms"],
|
|
|
|
testMatch: ["**/personal-info.spec.ts"],
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
2023-06-20 12:49:48 +00:00
|
|
|
],
|
|
|
|
});
|