feat: add video tour functionality with helpers, configuration, and homepage walkthrough

This commit is contained in:
2026-02-26 02:42:16 +00:00
parent 20eaa50935
commit e8fd38e98a
8 changed files with 295 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
import { defineConfig, devices } from "@playwright/test"
/**
* Playwright config for video tours (demos, not tests).
*
* Usage:
* yarn tour # run all tours (desktop)
* yarn tour:mobile # run all tours (mobile)
*
* Videos are saved to video-tours/output/
*/
export default defineConfig({
testDir: "./tours",
testMatch: "**/*.tour.ts",
outputDir: "./output",
fullyParallel: false,
retries: 0,
workers: 1,
reporter: "list",
/* No global setup/teardown tours are self-contained */
use: {
baseURL: process.env.CODING_URL || "https://localhost:3000",
headless: true,
ignoreHTTPSErrors: true,
video: { mode: "on", size: { width: 1280, height: 720 } },
navigationTimeout: 30000,
launchOptions: {
args: ["--no-sandbox"],
},
},
projects: [
{
name: "tour-desktop",
use: { ...devices["Desktop Chrome"] },
},
{
name: "tour-mobile",
use: {
...devices["iPhone 12"],
defaultBrowserType: "chromium",
},
},
],
})