Skip to content

Commit

Permalink
🔧 Update Playwright config for testing 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ad956 committed Jul 15, 2024
1 parent c8de1cf commit 58d2ace
Showing 1 changed file with 9 additions and 37 deletions.
46 changes: 9 additions & 37 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import { defineConfig, devices } from "@playwright/test";

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
Expand All @@ -24,11 +15,19 @@ export default defineConfig({
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: "https://patient-fitness-tracker.vercel.app",
baseURL: "http://127.0.0.1:3000",

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
},
webServer: {
command: "npm run dev",
url: "http://127.0.0.1:3000",
reuseExistingServer: !process.env.CI,
stdout: "ignore",
stderr: "pipe",
// timeout: 120 * 1000,
},

/* Configure projects for major browsers */
projects: [
Expand All @@ -46,32 +45,5 @@ export default defineConfig({
name: "webkit",
use: { ...devices["Desktop Safari"] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://127.0.0.1:3000',
// reuseExistingServer: !process.env.CI,
// },
});

0 comments on commit 58d2ace

Please sign in to comment.