mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
implement/init e2e tests (#135)
* init e2e * updated/moved vitest, finished merge * fix bun picking up e2e tests * e2e: overwrite webserver config with env * e2e: added adapter configs * e2e: replaced image
This commit is contained in:
41
app/playwright.config.ts
Normal file
41
app/playwright.config.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { defineConfig, devices } from "@playwright/test";
|
||||
|
||||
const baseUrl = process.env.TEST_URL || "http://localhost:28623";
|
||||
const startCommand = process.env.TEST_START_COMMAND || "bun run dev";
|
||||
const autoStart = ["1", "true", undefined].includes(process.env.TEST_AUTO_START);
|
||||
|
||||
export default defineConfig({
|
||||
testMatch: "**/*.e2e-spec.ts",
|
||||
testDir: "./e2e",
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: "html",
|
||||
use: {
|
||||
baseURL: baseUrl,
|
||||
trace: "on-first-retry",
|
||||
video: "on-first-retry",
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: "chromium",
|
||||
use: { ...devices["Desktop Chrome"] },
|
||||
},
|
||||
/* {
|
||||
name: "firefox",
|
||||
use: { ...devices["Desktop Firefox"] },
|
||||
},
|
||||
{
|
||||
name: "webkit",
|
||||
use: { ...devices["Desktop Safari"] },
|
||||
}, */
|
||||
],
|
||||
webServer: autoStart
|
||||
? {
|
||||
command: startCommand,
|
||||
url: baseUrl,
|
||||
reuseExistingServer: !process.env.CI,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
Reference in New Issue
Block a user