File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed
app/gui/integration-test/dashboard Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,24 @@ export function mockAll({ page, setupAPI }: MockParams) {
156
156
} )
157
157
}
158
158
159
+ export interface MockAllAndLoginParams extends MockParams {
160
+ readonly hideStartModal ?: boolean | undefined
161
+ }
162
+
159
163
/** Set up all mocks, and log in with dummy credentials. */
160
- export function mockAllAndLogin ( { page, setupAPI } : MockParams ) {
164
+ export function mockAllAndLogin ( { page, setupAPI, hideStartModal = true } : MockAllAndLoginParams ) {
161
165
const actions = mockAll ( { page, setupAPI } )
166
+
162
167
return actions
163
168
. step ( 'Login' , ( page ) => login ( { page } ) )
164
169
. step ( 'Wait for dashboard to load' , waitForDashboardToLoad )
165
170
. step ( 'Check if start modal is shown' , async ( page ) => {
166
- // @ts -expect-error This is the only place in which the private member `.context`
167
- // should be accessed.
168
- const context = actions . context
169
- await new StartModalActions ( page , context ) . close ( )
171
+ if ( hideStartModal ) {
172
+ // @ts -expect-error This is the only place in which the private member `.context`
173
+ // should be accessed.
174
+ const context = actions . context
175
+ await new StartModalActions ( page , context ) . close ( )
176
+ }
170
177
} )
171
178
. into ( DrivePageActions < Context > )
172
179
}
Original file line number Diff line number Diff line change 2
2
import { expect , test , type Page } from '@playwright/test'
3
3
4
4
import { mockAllAndLogin } from './actions'
5
+ import StartModalActions from './actions/StartModalActions'
5
6
6
7
/** Find an editor container. */
7
8
function locateEditor ( page : Page ) {
@@ -22,8 +23,12 @@ function locateSamples(page: Page) {
22
23
}
23
24
24
25
test ( 'create project from template' , ( { page } ) =>
25
- mockAllAndLogin ( { page, setupAPI : ( api ) => api . setFeatureFlags ( { enableCloudExecution : true } ) } )
26
- . openStartModal ( )
26
+ mockAllAndLogin ( {
27
+ page,
28
+ setupAPI : ( api ) => api . setFeatureFlags ( { enableCloudExecution : true } ) ,
29
+ hideStartModal : false ,
30
+ } )
31
+ . into ( StartModalActions )
27
32
. createProjectFromTemplate ( 0 )
28
33
. do ( async ( thePage ) => {
29
34
await expect ( locateEditor ( thePage ) ) . toBeAttached ( )
You can’t perform that action at this time.
0 commit comments