Skip to content

Commit a4af128

Browse files
committed
polish
1 parent 9a1893f commit a4af128

4 files changed

Lines changed: 19 additions & 10 deletions

File tree

packages/e2e/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@playwright/test": "^1.50.0",
33-
"@shopify/cli-kit": "3.92.0",
34-
"@types/node": "18.19.70",
33+
"@types/node": "18.19.70",
3534
"execa": "^7.2.0",
3635
"node-pty": "^1.0.0",
3736
"strip-ansi": "^7.1.0",

packages/e2e/setup/cli.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,15 @@ export const cliFixture = envFixture.extend<{cli: CLIProcess}>({
4949
async exec(args, opts = {}) {
5050
// 3 min default
5151
const timeout = opts.timeout ?? 3 * 60 * 1000
52+
const execEnv: {[key: string]: string} = {}
53+
for (const [key, value] of Object.entries({...env.processEnv, ...opts.env})) {
54+
if (value !== undefined) {
55+
execEnv[key] = value
56+
}
57+
}
5258
const execaOpts: ExecaOptions = {
5359
cwd: opts.cwd,
54-
env: {...env.processEnv, ...opts.env},
60+
env: execEnv,
5561
extendEnv: false,
5662
timeout,
5763
reject: false,
@@ -73,9 +79,15 @@ export const cliFixture = envFixture.extend<{cli: CLIProcess}>({
7379
async execCreateApp(args, opts = {}) {
7480
// 5 min default for scaffolding
7581
const timeout = opts.timeout ?? 5 * 60 * 1000
82+
const execEnv: {[key: string]: string} = {}
83+
for (const [key, value] of Object.entries({...env.processEnv, ...opts.env})) {
84+
if (value !== undefined) {
85+
execEnv[key] = value
86+
}
87+
}
7688
const execaOpts: ExecaOptions = {
7789
cwd: opts.cwd,
78-
env: {...env.processEnv, ...opts.env},
90+
env: execEnv,
7991
extendEnv: false,
8092
timeout,
8193
reject: false,

packages/e2e/tests/app-basic.spec.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
/* eslint-disable no-restricted-imports */
12
import {appScaffoldFixture as test} from '../setup/app.js'
23
import {requireEnv} from '../setup/env.js'
34
import {expect} from '@playwright/test'
4-
import {joinPath} from '@shopify/cli-kit/node/path'
55
import * as fs from 'fs'
6+
import * as path from 'path'
67

78
test.describe('App basic flow (no extensions)', () => {
89
test('init, dev, execute, quit, clean, deploy, versions, config link, deploy to secondary', async ({
@@ -58,7 +59,7 @@ test.describe('App basic flow (no extensions)', () => {
5859
}
5960

6061
// Step 6: Deploy the primary app
61-
const versionTag = `e2e-v-${Date.now()}`
62+
const versionTag = `QA-E2E-1st-${Date.now()}`
6263
const deployResult = await cli.exec(
6364
[
6465
'app',
@@ -91,7 +92,7 @@ test.describe('App basic flow (no extensions)', () => {
9192
// that file already exists → overwrite confirmation prompt hangs.
9293
// (--config and --client-id are mutually exclusive flags, so we can't pass both directly.)
9394
fs.writeFileSync(
94-
joinPath(appScaffold.appDir, 'shopify.app.secondary.toml'),
95+
path.join(appScaffold.appDir, 'shopify.app.secondary.toml'),
9596
`client_id = "${env.secondaryClientId}"\n`,
9697
)
9798

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)