Skip to content

Commit 20f0035

Browse files
Fix acceptance test
1 parent ab31dc1 commit 20f0035

File tree

3 files changed

+90
-91
lines changed

3 files changed

+90
-91
lines changed
Lines changed: 86 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,86 @@
1-
app build @shopify/cli
2-
app config link @shopify/cli
3-
app config use @shopify/cli
4-
app deploy @shopify/cli
5-
app dev @shopify/cli
6-
app env pull @shopify/cli
7-
app env show @shopify/cli
8-
app function build @shopify/cli
9-
app function replay @shopify/cli
10-
app function run @shopify/cli
11-
app function schema @shopify/cli
12-
app function typegen @shopify/cli
13-
app generate extension @shopify/cli
14-
app import-extensions @shopify/cli
15-
app info @shopify/cli
16-
app init @shopify/cli
17-
app logs @shopify/cli
18-
app logs sources @shopify/cli
19-
app release @shopify/cli
20-
app versions list @shopify/cli
21-
app webhook trigger @shopify/cli
22-
auth logout @shopify/cli
23-
commands @shopify/cli
24-
config autocorrect off @shopify/cli
25-
config autocorrect on @shopify/cli
26-
config autocorrect status @shopify/cli
27-
help @shopify/cli
28-
hydrogen build @shopify/cli
29-
hydrogen check @shopify/cli
30-
hydrogen codegen @shopify/cli
31-
hydrogen customer-account-push @shopify/cli
32-
hydrogen debug cpu @shopify/cli
33-
hydrogen deploy @shopify/cli
34-
hydrogen dev @shopify/cli
35-
hydrogen env list @shopify/cli
36-
hydrogen env pull @shopify/cli
37-
hydrogen env push @shopify/cli
38-
hydrogen generate route @shopify/cli
39-
hydrogen generate routes @shopify/cli
40-
hydrogen init @shopify/cli
41-
hydrogen link @shopify/cli
42-
hydrogen list @shopify/cli
43-
hydrogen login @shopify/cli
44-
hydrogen logout @shopify/cli
45-
hydrogen preview @shopify/cli
46-
hydrogen setup @shopify/cli
47-
hydrogen setup css @shopify/cli
48-
hydrogen setup markets @shopify/cli
49-
hydrogen setup vite @shopify/cli
50-
hydrogen shortcut @shopify/cli
51-
hydrogen unlink @shopify/cli
52-
hydrogen upgrade @shopify/cli
53-
plugins add @shopify/cli
54-
plugins inspect @shopify/cli
55-
plugins install @shopify/cli
56-
plugins link @shopify/cli
57-
plugins remove @shopify/cli
58-
plugins reset @shopify/cli
59-
plugins uninstall @shopify/cli
60-
plugins unlink @shopify/cli
61-
plugins update @shopify/cli
62-
search @shopify/cli
63-
theme check @shopify/cli
64-
theme console @shopify/cli
65-
theme delete @shopify/cli
66-
theme dev @shopify/cli
67-
theme info @shopify/cli
68-
theme init @shopify/cli
69-
theme language-server @shopify/cli
70-
theme list @shopify/cli
71-
theme open @shopify/cli
72-
theme package @shopify/cli
73-
theme publish @shopify/cli
74-
theme pull @shopify/cli
75-
theme push @shopify/cli
76-
theme rename @shopify/cli
77-
theme share @shopify/cli
78-
upgrade @shopify/cli
79-
version @shopify/cli
1+
┌────────────────────────────────┬──────────────┐
2+
│ Id │ Plugin │
3+
├────────────────────────────────┼──────────────┤
4+
│ app build │ @shopify/cli │
5+
│ app config link │ @shopify/cli │
6+
│ app config use │ @shopify/cli │
7+
│ app deploy │ @shopify/cli │
8+
│ app dev │ @shopify/cli │
9+
│ app env pull │ @shopify/cli │
10+
│ app env show │ @shopify/cli │
11+
│ app function build │ @shopify/cli │
12+
│ app function replay │ @shopify/cli │
13+
│ app function run │ @shopify/cli │
14+
│ app function schema │ @shopify/cli │
15+
│ app function typegen │ @shopify/cli │
16+
│ app generate extension │ @shopify/cli │
17+
│ app import-extensions │ @shopify/cli │
18+
│ app info │ @shopify/cli │
19+
│ app init │ @shopify/cli │
20+
│ app logs │ @shopify/cli │
21+
│ app logs sources │ @shopify/cli │
22+
│ app release │ @shopify/cli │
23+
│ app versions list │ @shopify/cli │
24+
│ app webhook trigger │ @shopify/cli │
25+
│ auth logout │ @shopify/cli │
26+
│ commands │ @shopify/cli │
27+
│ config autocorrect off │ @shopify/cli │
28+
│ config autocorrect on │ @shopify/cli │
29+
│ config autocorrect status │ @shopify/cli │
30+
│ help │ @shopify/cli │
31+
│ hydrogen build │ @shopify/cli │
32+
│ hydrogen check │ @shopify/cli │
33+
│ hydrogen codegen │ @shopify/cli │
34+
│ hydrogen customer-account-push │ @shopify/cli │
35+
│ hydrogen debug cpu │ @shopify/cli │
36+
│ hydrogen deploy │ @shopify/cli │
37+
│ hydrogen dev │ @shopify/cli │
38+
│ hydrogen env list │ @shopify/cli │
39+
│ hydrogen env pull │ @shopify/cli │
40+
│ hydrogen env push │ @shopify/cli │
41+
│ hydrogen generate route │ @shopify/cli │
42+
│ hydrogen generate routes │ @shopify/cli │
43+
│ hydrogen init │ @shopify/cli │
44+
│ hydrogen link │ @shopify/cli │
45+
│ hydrogen list │ @shopify/cli │
46+
│ hydrogen login │ @shopify/cli │
47+
│ hydrogen logout │ @shopify/cli │
48+
│ hydrogen preview │ @shopify/cli │
49+
│ hydrogen setup │ @shopify/cli │
50+
│ hydrogen setup css │ @shopify/cli │
51+
│ hydrogen setup markets │ @shopify/cli │
52+
│ hydrogen setup vite │ @shopify/cli │
53+
│ hydrogen shortcut │ @shopify/cli │
54+
│ hydrogen unlink │ @shopify/cli │
55+
│ hydrogen upgrade │ @shopify/cli │
56+
│ plugins add │ @shopify/cli │
57+
│ plugins inspect │ @shopify/cli │
58+
│ plugins install │ @shopify/cli │
59+
│ plugins link │ @shopify/cli │
60+
│ plugins remove │ @shopify/cli │
61+
│ plugins reset │ @shopify/cli │
62+
│ plugins uninstall │ @shopify/cli │
63+
│ plugins unlink │ @shopify/cli │
64+
│ plugins update │ @shopify/cli │
65+
│ search │ @shopify/cli │
66+
│ theme check │ @shopify/cli │
67+
│ theme console │ @shopify/cli │
68+
│ theme delete │ @shopify/cli │
69+
│ theme dev │ @shopify/cli │
70+
│ theme info │ @shopify/cli │
71+
│ theme init │ @shopify/cli │
72+
│ theme language-server │ @shopify/cli │
73+
│ theme list │ @shopify/cli │
74+
│ theme metafields pull │ @shopify/cli │
75+
│ theme open │ @shopify/cli │
76+
│ theme package │ @shopify/cli │
77+
│ theme profile │ @shopify/cli │
78+
│ theme publish │ @shopify/cli │
79+
│ theme pull │ @shopify/cli │
80+
│ theme push │ @shopify/cli │
81+
│ theme rename │ @shopify/cli │
82+
│ theme share │ @shopify/cli │
83+
│ upgrade │ @shopify/cli │
84+
│ version │ @shopify/cli │
85+
└────────────────────────────────┴──────────────┘
86+

packages/features/snapshots/regenerate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
cd "$(dirname "$0")"
77

88
# regenerate commands snapshot file
9-
../../cli/bin/dev.js commands --no-header --columns=Command,Plugin > commands.txt
9+
../../cli/bin/dev.js commands --columns=id,plugin > commands.txt

packages/features/steps/commands.steps.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {strict as assert} from 'assert'
55
const errorMessage = `
66
SNAPSHOT TEST FAILED!
77
8-
The result of 'yarn shopify commands' has changed! We run this to check that
8+
The result of 'shopify commands' has changed! We run this to check that
99
all commands can load successfully.
1010
1111
It's normal to see this test fail when you add or remove a command in the CLI.
@@ -20,21 +20,13 @@ the diff below and figure out what is broken.
2020
`
2121

2222
When(/I list the available commands/, async function () {
23-
const commandFlags = ['commands', '--no-header', '--columns=Command,Plugin']
23+
const commandFlags = ['commands', '--columns=id,plugin']
2424
this.commandResult = (await this.execCLI(commandFlags)).stdout
2525
})
2626

2727
Then(/I see all commands matching the snapshot/, async function () {
2828
const snapshot: string = await fs.readFile('snapshots/commands.txt', {encoding: 'utf8'})
29-
const normalize = (value: string) =>
30-
value
31-
.replace(/\r\n/g, '\n')
32-
.replace(/\s/g, '')
33-
.trimEnd()
34-
.split('\n')
35-
// temporary workaround while hydrogen is being bundled
36-
.filter((line) => !line.includes('hydrogen'))
37-
.join('\n')
29+
const normalize = (value: string) => value.replace(/\r\n/g, '\n').replace(/\s/g, '').trimEnd().split('\n').join('\n')
3830

3931
assert.equal(normalize(snapshot), normalize(this.commandResult), errorMessage)
4032
})

0 commit comments

Comments
 (0)