File tree Expand file tree Collapse file tree 7 files changed +59
-8
lines changed Expand file tree Collapse file tree 7 files changed +59
-8
lines changed Original file line number Diff line number Diff line change @@ -234,7 +234,29 @@ Update and Unchanged:
234
234
} )
235
235
expect ( resultOne . status ) . toBe ( 0 )
236
236
expect ( resultTwo . status ) . toBe ( 0 )
237
- expect ( resultOne . stdout ) . not . toEqual ( resultTwo . stdout )
237
+ expect ( resultOne . stdout ) . toContain (
238
+ `Create:
239
+ ApiCheck: api-check
240
+ ApiCheck: api-check-high-freq
241
+ HeartbeatCheck: heartbeat-check-1
242
+ BrowserCheck: homepage-browser-check
243
+ CheckGroup: my-group-1
244
+ Dashboard: dashboard-1
245
+ MaintenanceWindow: maintenance-window-1
246
+ PrivateLocation: private-location-1
247
+ ` )
248
+ expect ( resultTwo . stdout ) . toContain (
249
+ `Create:
250
+ ApiCheck: api-check
251
+ ApiCheck: api-check-high-freq
252
+ HeartbeatCheck: heartbeat-check-1
253
+ BrowserCheck: homepage-browser-check
254
+ BrowserCheck: snapshot-test.test.ts
255
+ CheckGroup: my-group-1
256
+ Dashboard: dashboard-1
257
+ MaintenanceWindow: maintenance-window-1
258
+ PrivateLocation: private-location-1
259
+ ` )
238
260
} )
239
261
240
262
it ( 'Should terminate when no resources are found' , async ( ) => {
Original file line number Diff line number Diff line change
1
+ import { expect , test } from '@playwright/test'
2
+
3
+ test . use ( { actionTimeout : 10000 } )
4
+
5
+ test ( 'Danube Snapshot Test' , async ( { page } ) => {
6
+ await page . goto ( 'https://danube-web.shop' )
7
+ await expect ( page ) . toHaveScreenshot ( { maxDiffPixels : 10000 } )
8
+ } )
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export function runChecklyCli (options: {
37
37
// Once 4.8.0 has been released, we can remove the 4.8.0 fallback here.
38
38
CHECKLY_CLI_VERSION : cliVersion ?? '4.8.0' ,
39
39
CHECKLY_E2E_PROMPTS_INJECTIONS : promptsInjection ?. length ? JSON . stringify ( promptsInjection ) : undefined ,
40
+ CHECKLY_E2E_DISABLE_FANCY_OUTPUT : '1' ,
40
41
...env ,
41
42
} ,
42
43
cwd : directory ?? process . cwd ( ) ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ export type BaseCommandClass = typeof Command & {
10
10
export abstract class BaseCommand extends Command {
11
11
static coreCommand = false
12
12
static hidden = true
13
+ fancy = true
13
14
14
15
protected async init ( ) : Promise < void > {
15
16
let version = process . env . CHECKLY_CLI_VERSION ?? this . config . version
@@ -35,6 +36,10 @@ export abstract class BaseCommand extends Command {
35
36
}
36
37
}
37
38
39
+ if ( process . env . CHECKLY_E2E_DISABLE_FANCY_OUTPUT ) {
40
+ this . fancy = false
41
+ }
42
+
38
43
return super . init ( )
39
44
}
40
45
Original file line number Diff line number Diff line change @@ -74,7 +74,9 @@ export default class Deploy extends AuthCommand {
74
74
}
75
75
76
76
async run ( ) : Promise < void > {
77
- ux . action . start ( 'Parsing your project' , undefined , { stdout : true } )
77
+ if ( this . fancy ) {
78
+ ux . action . start ( 'Parsing your project' , undefined , { stdout : true } )
79
+ }
78
80
const { flags } = await this . parse ( Deploy )
79
81
const {
80
82
force,
@@ -113,7 +115,10 @@ export default class Deploy extends AuthCommand {
113
115
checklyConfigConstructs,
114
116
} )
115
117
const repoInfo = getGitInformation ( project . repoUrl )
116
- ux . action . stop ( )
118
+
119
+ if ( this . fancy ) {
120
+ ux . action . stop ( )
121
+ }
117
122
118
123
if ( ! preview ) {
119
124
for ( const check of Object . values ( project . data . check ) ) {
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export default class SyncPlaywright extends BaseCommand {
12
12
static description = 'Copy Playwright config into the Checkly config file.'
13
13
14
14
async run ( ) : Promise < void > {
15
- ux . action . start ( 'Syncing Playwright config to the Checkly config file' , undefined , { stdout : true } )
15
+ if ( this . fancy ) {
16
+ ux . action . start ( 'Syncing Playwright config to the Checkly config file' , undefined , { stdout : true } )
17
+ }
16
18
17
19
const config = await loadPlaywrightConfig ( )
18
20
if ( ! config ) {
@@ -40,13 +42,17 @@ export default class SyncPlaywright extends BaseCommand {
40
42
const dir = path . resolve ( path . dirname ( configFile . fileName ) )
41
43
this . reWriteChecklyConfigFile ( checklyConfigData , configFile . fileName , dir )
42
44
43
- ux . action . stop ( '✅ ' )
45
+ if ( this . fancy ) {
46
+ ux . action . stop ( '✅ ' )
47
+ }
44
48
this . log ( 'Successfully updated Checkly config file' )
45
49
this . exit ( 0 )
46
50
}
47
51
48
52
private handleError ( message : string ) {
49
- ux . action . stop ( '❌' )
53
+ if ( this . fancy ) {
54
+ ux . action . stop ( '❌' )
55
+ }
50
56
this . log ( message )
51
57
this . exit ( 1 )
52
58
}
Original file line number Diff line number Diff line change @@ -124,7 +124,9 @@ export default class Test extends AuthCommand {
124
124
static strict = false
125
125
126
126
async run ( ) : Promise < void > {
127
- ux . action . start ( 'Parsing your project' , undefined , { stdout : true } )
127
+ if ( this . fancy ) {
128
+ ux . action . start ( 'Parsing your project' , undefined , { stdout : true } )
129
+ }
128
130
129
131
const { flags, argv } = await this . parse ( Test )
130
132
const {
@@ -228,7 +230,9 @@ export default class Test extends AuthCommand {
228
230
check . snapshots = await uploadSnapshots ( check . rawSnapshots )
229
231
}
230
232
231
- ux . action . stop ( )
233
+ if ( this . fancy ) {
234
+ ux . action . stop ( )
235
+ }
232
236
233
237
if ( ! checks . length ) {
234
238
this . log ( `Unable to find checks to run${ filePatterns [ 0 ] !== '.*' ? ' using [FILEARGS]=\'' + filePatterns + '\'' : '' } .` )
You can’t perform that action at this time.
0 commit comments