Skip to content

Commit 814a3b9

Browse files
Merge pull request #7147 from Shopify/psyw-0331-E2E-infra-refactor
E2E: infra refactor + app tests update
2 parents a66b1c7 + 8e05272 commit 814a3b9

File tree

12 files changed

+636
-262
lines changed

12 files changed

+636
-262
lines changed

.github/workflows/tests-pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ jobs:
246246
E2E_ACCOUNT_PASSWORD: ${{ secrets.E2E_ACCOUNT_PASSWORD }}
247247
E2E_STORE_FQDN: ${{ secrets.E2E_STORE_FQDN }}
248248
E2E_SECONDARY_CLIENT_ID: ${{ secrets.E2E_SECONDARY_CLIENT_ID }}
249+
E2E_ORG_ID: ${{ secrets.E2E_ORG_ID }}
249250
run: npx playwright test
250251
- name: Upload Playwright report
251252
uses: actions/upload-artifact@v4

packages/e2e/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"devDependencies": {
3232
"@playwright/test": "^1.50.0",
3333
"@types/node": "18.19.70",
34+
"dotenv": "16.4.7",
3435
"execa": "^7.2.0",
3536
"node-pty": "^1.0.0",
3637
"strip-ansi": "^7.1.0"

packages/e2e/playwright.config.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,8 @@
11
/* eslint-disable line-comment-position */
2-
/* eslint-disable no-restricted-imports */
2+
import {config} from 'dotenv'
33
import {defineConfig} from '@playwright/test'
4-
import * as fs from 'fs'
5-
import * as path from 'path'
6-
import {fileURLToPath} from 'url'
74

8-
const __dirname = path.dirname(fileURLToPath(import.meta.url))
9-
10-
// Load .env file if present (CI provides env vars directly)
11-
const envPath = path.join(__dirname, '.env')
12-
if (fs.existsSync(envPath)) {
13-
for (const line of fs.readFileSync(envPath, 'utf-8').split('\n')) {
14-
const trimmed = line.trim()
15-
if (!trimmed || trimmed.startsWith('#')) continue
16-
const eqIdx = trimmed.indexOf('=')
17-
if (eqIdx === -1) continue
18-
const key = trimmed.slice(0, eqIdx).trim()
19-
const value = trimmed.slice(eqIdx + 1).trim()
20-
process.env[key] ??= value
21-
}
22-
}
5+
config()
236

247
const isCI = Boolean(process.env.CI)
258

0 commit comments

Comments
 (0)