@@ -2,6 +2,7 @@ import { testIds } from '$lib/constants/test-ids.constants';
22import { InternetIdentityPage } from '@dfinity/internet-identity-playwright' ;
33import { expect } from '@playwright/test' ;
44import type { Page } from 'playwright-core' ;
5+ import { TIMEOUT_AVERAGE , TIMEOUT_LONG , TIMEOUT_SHORT } from '../constants/e2e.constants' ;
56import { IdentityPage , type IdentityPageParams } from './identity.page' ;
67
78export class ConsolePage extends IdentityPage {
@@ -46,9 +47,9 @@ export class ConsolePage extends IdentityPage {
4647
4748 await this . page . getByTestId ( testIds . createSatellite . create ) . click ( ) ;
4849
49- await expect ( this . page . getByTestId ( testIds . createSatellite . continue ) ) . toBeVisible ( {
50- timeout : 30000
51- } ) ;
50+ await expect ( this . page . getByTestId ( testIds . createSatellite . continue ) ) . toBeVisible (
51+ TIMEOUT_AVERAGE
52+ ) ;
5253
5354 await this . page . getByTestId ( testIds . createSatellite . continue ) . click ( ) ;
5455 }
@@ -70,17 +71,15 @@ export class ConsolePage extends IdentityPage {
7071 async createAnalytics ( ) : Promise < void > {
7172 await this . page . goto ( '/analytics' ) ;
7273
73- await expect ( this . page . getByTestId ( testIds . createAnalytics . launch ) ) . toBeVisible ( ) ;
74+ await expect ( this . page . getByTestId ( testIds . createAnalytics . launch ) ) . toBeVisible ( TIMEOUT_SHORT ) ;
7475
7576 await this . page . getByTestId ( testIds . createAnalytics . launch ) . click ( ) ;
7677
7778 await expect ( this . page . getByTestId ( testIds . createAnalytics . create ) ) . toBeVisible ( ) ;
7879
7980 await this . page . getByTestId ( testIds . createAnalytics . create ) . click ( ) ;
8081
81- await expect ( this . page . getByTestId ( testIds . createAnalytics . close ) ) . toBeVisible ( {
82- timeout : 30000
83- } ) ;
82+ await expect ( this . page . getByTestId ( testIds . createAnalytics . close ) ) . toBeVisible ( TIMEOUT_AVERAGE ) ;
8483
8584 await this . page . getByTestId ( testIds . createAnalytics . close ) . click ( ) ;
8685
@@ -94,6 +93,6 @@ export class ConsolePage extends IdentityPage {
9493
9594 await this . page . getByTestId ( testIds . navbar . getIcp ) . click ( ) ;
9695
97- await expect ( this . page . getByRole ( 'menu' ) ) . toContainText ( expected . balance , { timeout : 60000 } ) ;
96+ await expect ( this . page . getByRole ( 'menu' ) ) . toContainText ( expected . balance , TIMEOUT_LONG ) ;
9897 }
9998}
0 commit comments