Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/e2e/setup/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,17 @@ export async function deployApp(
version?: string
message?: string
config?: string
force?: boolean
allowUpdates?: boolean
allowDeletes?: boolean
noBuild?: boolean
},
): Promise<ExecResult> {
const args = ['app', 'deploy']
if (ctx.version) args.push('--version', ctx.version)
if (ctx.message) args.push('--message', ctx.message)
if (ctx.config) args.push('--config', ctx.config)
if (ctx.force ?? true) args.push('--force')
if (ctx.allowUpdates ?? true) args.push('--allow-updates')
if (ctx.allowDeletes) args.push('--allow-deletes')
if (ctx.noBuild) args.push('--no-build')
args.push('--path', ctx.appDir)
return ctx.cli.exec(args, {timeout: CLI_TIMEOUT.long})
Expand Down
6 changes: 6 additions & 0 deletions packages/e2e/setup/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ export const envFixture = base.extend<{testSection: void}, {env: E2EEnv}>({
fs.mkdirSync(tmpBase, {recursive: true})

const {tempDir, xdgEnv} = createIsolatedEnv(tmpBase)
const cloudflaredPath = path.join(
tempDir,
'cloudflared',
process.platform === 'win32' ? 'cloudflared.exe' : 'cloudflared',
)

const processEnv: NodeJS.ProcessEnv = {
...process.env,
...xdgEnv,
SHOPIFY_CLI_CLOUDFLARED_PATH: cloudflaredPath,
SHOPIFY_RUN_AS_USER: '0',
NODE_OPTIONS: '',
CI: '1',
Expand Down
1 change: 0 additions & 1 deletion packages/e2e/tests/smoke-pty.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {expect} from '@playwright/test'
test.describe('PTY smoke test', () => {
test('shopify version runs via PTY', async ({cli}) => {
const proc = await cli.spawn(['version'])
await proc.waitForOutput('3.')
const code = await proc.waitForExit()
expect(code, `shopify version (PTY) failed. Output:\n${proc.getOutput()}`).toBe(0)
expect(proc.getOutput()).toMatch(/\d+\.\d+\.\d+/)
Expand Down
Loading