File tree Expand file tree Collapse file tree
openmetadata-ui/src/main/resources/ui/playwright/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,8 +60,12 @@ export const redirectToHomePage = async (
6060 page : Page ,
6161 _waitForLoaders = true
6262) => {
63- await page . goto ( '/' ) ;
64- await page . waitForURL ( '**/my-data' ) ;
63+ await page . goto ( '/' , {
64+ waitUntil : 'domcontentloaded' ,
65+ } ) ;
66+ await page . waitForURL ( '**/my-data' , {
67+ waitUntil : 'domcontentloaded' ,
68+ } ) ;
6569
6670 if ( _waitForLoaders ) {
6771 await waitForAllLoadersToDisappear ( page ) ;
@@ -176,12 +180,11 @@ export const toastNotification = async (
176180 message : string | RegExp ,
177181 timeout ?: number
178182) => {
179- await page . getByTestId ( 'alert-bar' ) . waitFor ( {
183+ await page . getByTestId ( 'alert-bar' ) . getByText ( message ) . waitFor ( {
180184 state : 'visible' ,
185+ timeout,
181186 } ) ;
182187
183- await expect ( page . getByTestId ( 'alert-bar' ) ) . toHaveText ( message , { timeout } ) ;
184-
185188 await expect ( page . getByTestId ( 'alert-icon' ) ) . toBeVisible ( ) ;
186189} ;
187190
You can’t perform that action at this time.
0 commit comments