@@ -55,7 +55,7 @@ export async function deleteContainer(page: Page, name: string): Promise<void> {
55
55
// wait for container to disappear
56
56
try {
57
57
console . log ( 'Waiting for container to get deleted ...' ) ;
58
- await playExpect . poll ( async ( ) => await containers . getContainerRowByName ( name ) , { timeout : 10000 } ) . toBeFalsy ( ) ;
58
+ await playExpect . poll ( async ( ) => await containers . getContainerRowByName ( name ) , { timeout : 10_000 } ) . toBeFalsy ( ) ;
59
59
} catch ( error ) {
60
60
if ( ! ( error as Error ) . message . includes ( 'Page is empty' ) ) {
61
61
throw Error ( `Error waiting for container '${ name } ' to get removed, ${ error } ` ) ;
@@ -77,7 +77,7 @@ export async function deleteImage(page: Page, name: string): Promise<void> {
77
77
console . log ( `image '${ name } ' does not exist, skipping...` ) ;
78
78
} else {
79
79
const deleteButton = row . getByRole ( 'button' , { name : 'Delete Image' } ) ;
80
- if ( await deleteButton . isEnabled ( { timeout : 2000 } ) ) {
80
+ if ( await deleteButton . isEnabled ( { timeout : 2_000 } ) ) {
81
81
await deleteButton . click ( ) ;
82
82
await handleConfirmationDialog ( page ) ;
83
83
} else {
@@ -92,7 +92,7 @@ export async function deleteImage(page: Page, name: string): Promise<void> {
92
92
const result = await images . getImageRowByName ( name ) ;
93
93
return ! ! result ;
94
94
} ,
95
- { timeout : 10000 , sendError : false } ,
95
+ { timeout : 10_000 , sendError : false } ,
96
96
) ;
97
97
} catch ( error ) {
98
98
if ( ! ( error as Error ) . message . includes ( 'Page is empty' ) ) {
@@ -138,7 +138,7 @@ export async function deletePod(page: Page, name: string): Promise<void> {
138
138
async ( ) => {
139
139
return ! ! ( await pods . getPodRowByName ( name ) ) ;
140
140
} ,
141
- { timeout : 20000 } ,
141
+ { timeout : 20_000 } ,
142
142
) ;
143
143
} catch ( error ) {
144
144
if ( ! ( error as Error ) . message . includes ( 'Page is empty' ) ) {
@@ -158,7 +158,7 @@ export async function handleConfirmationDialog(
158
158
) : Promise < void > {
159
159
// wait for dialog to appear using waitFor
160
160
const dialog = page . getByRole ( 'dialog' , { name : dialogTitle , exact : true } ) ;
161
- await dialog . waitFor ( { state : 'visible' , timeout : 3000 } ) ;
161
+ await dialog . waitFor ( { state : 'visible' , timeout : 3_000 } ) ;
162
162
const button = confirm
163
163
? dialog . getByRole ( 'button' , { name : confirmationButton } )
164
164
: dialog . getByRole ( 'button' , { name : cancelButton } ) ;
@@ -174,23 +174,23 @@ export async function deletePodmanMachine(page: Page, machineVisibleName: string
174
174
const RESOURCE_NAME : string = 'podman' ;
175
175
const navigationBar = new NavigationBar ( page ) ;
176
176
const dashboardPage = await navigationBar . openDashboard ( ) ;
177
- await playExpect ( dashboardPage . mainPage ) . toBeVisible ( { timeout : 3000 } ) ;
177
+ await playExpect ( dashboardPage . mainPage ) . toBeVisible ( { timeout : 3_000 } ) ;
178
178
const settingsBar = await navigationBar . openSettings ( ) ;
179
179
const resourcesPage = await settingsBar . openTabPage ( ResourcesPage ) ;
180
180
await playExpect
181
- . poll ( async ( ) => await resourcesPage . resourceCardIsVisible ( RESOURCE_NAME ) , { timeout : 10000 } )
181
+ . poll ( async ( ) => await resourcesPage . resourceCardIsVisible ( RESOURCE_NAME ) , { timeout : 10_000 } )
182
182
. toBeTruthy ( ) ;
183
183
const podmanResourceCard = new ResourceConnectionCardPage ( page , RESOURCE_NAME , machineVisibleName ) ;
184
184
await playExpect ( podmanResourceCard . providerConnections ) . toBeVisible ( { timeout : 10_000 } ) ;
185
185
await waitUntil (
186
186
async function machineExists ( ) {
187
187
return await podmanResourceCard . resourceElement . isVisible ( ) ;
188
188
} ,
189
- { timeout : 15000 , sendError : false } ,
189
+ { timeout : 15_000 , sendError : false } ,
190
190
) ;
191
191
if ( await podmanResourceCard . resourceElement . isVisible ( ) ) {
192
- await playExpect ( podmanResourceCard . resourceElementConnectionActions ) . toBeVisible ( { timeout : 3000 } ) ;
193
- await playExpect ( podmanResourceCard . resourceElementConnectionStatus ) . toBeVisible ( { timeout : 3000 } ) ;
192
+ await playExpect ( podmanResourceCard . resourceElementConnectionActions ) . toBeVisible ( { timeout : 3_000 } ) ;
193
+ await playExpect ( podmanResourceCard . resourceElementConnectionStatus ) . toBeVisible ( { timeout : 3_000 } ) ;
194
194
if ( ( await podmanResourceCard . resourceElementConnectionStatus . innerText ( ) ) === ResourceElementState . Starting ) {
195
195
console . log ( 'Podman machine is in starting currently, will send stop command via CLI' ) ;
196
196
execSync ( `podman machine stop ${ machineVisibleName } ` ) ;
@@ -202,12 +202,12 @@ export async function deletePodmanMachine(page: Page, machineVisibleName: string
202
202
if ( ( await podmanResourceCard . resourceElementConnectionStatus . innerText ( ) ) === ResourceElementState . Running ) {
203
203
await podmanResourceCard . performConnectionAction ( ResourceElementActions . Stop ) ;
204
204
await playExpect ( podmanResourceCard . resourceElementConnectionStatus ) . toHaveText ( ResourceElementState . Off , {
205
- timeout : 300_000 ,
205
+ timeout : 150_000 ,
206
206
} ) ;
207
207
}
208
208
await podmanResourceCard . performConnectionAction ( ResourceElementActions . Delete ) ;
209
209
await playExpect ( podmanResourceCard . resourceElement ) . toBeHidden ( { timeout : 30_000 } ) ;
210
- await page . waitForTimeout ( 30000 ) ;
210
+ await page . waitForTimeout ( 30_000 ) ;
211
211
await handleResetDefaultConnectionDialog ( page ) ;
212
212
} else {
213
213
console . log ( `Podman machine [${ machineVisibleName } ] not present, skipping deletion.` ) ;
0 commit comments