Skip to content

Commit

Permalink
move playwright server config into individual test files to support t…
Browse files Browse the repository at this point in the history
…esting both the store admin and store front
  • Loading branch information
smurawski committed Feb 9, 2024
1 parent 5832c81 commit 092ff87
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/e2e/add_product.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';

test.use({ baseURL: process.env.STORE_ADMIN_URL });

test('can add product ', async ({ page }) => {
await page.goto('/');
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { test, expect } from '@playwright/test';

test.use({ baseURL: process.env.STORE_ADMIN_URL });

test('has title', async ({ page }) => {
await page.goto('/');

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/products.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { test, expect } from '@playwright/test';

test.use({ baseURL: process.env.STORE_ADMIN_URL });

test('renders functionally', async ({ page }) => {
await page.goto('/');
Expand Down
3 changes: 0 additions & 3 deletions tests/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export default defineConfig({
reporter: 'html',
/* 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: process.env.STORE_ADMIN_URL,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
Expand Down

0 comments on commit 092ff87

Please sign in to comment.