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 @@ -245,9 +245,16 @@ export const assignDomain = async (
245245 await waitForAllLoadersToDisappear ( page ) ;
246246
247247 if ( checkSelectedDomain ) {
248- await expect ( page . getByTestId ( 'domain-link' ) ) . toContainText (
249- domain . displayName
250- ) ;
248+ const hasMultipleDomains = await page
249+ . getByTestId ( 'domain-count-button' )
250+ . isVisible ( ) ;
251+ if ( hasMultipleDomains ) {
252+ await expect ( page . getByTestId ( 'domain-count-button' ) ) . toBeVisible ( ) ;
253+ } else {
254+ await expect ( page . getByTestId ( 'domain-link' ) ) . toContainText (
255+ domain . displayName
256+ ) ;
257+ }
251258 }
252259} ;
253260
@@ -422,9 +429,17 @@ export const assignDataProduct = async (
422429 action : 'Add' | 'Edit' = 'Add' ,
423430 parentId = 'KnowledgePanel.DataProducts'
424431) => {
425- await expect ( page . getByTestId ( 'domain-link' ) ) . toContainText (
426- domain . displayName
427- ) ;
432+ const hasMultipleDomains = await page
433+ . getByTestId ( 'domain-count-button' )
434+ . isVisible ( ) ;
435+ if ( hasMultipleDomains ) {
436+ await expect ( page . getByTestId ( 'domain-count-button' ) ) . toBeVisible ( ) ;
437+ } else {
438+ await expect ( page . getByTestId ( 'domain-link' ) ) . toContainText (
439+ domain . displayName
440+ ) ;
441+ }
442+
428443 await page
429444 . getByTestId ( parentId )
430445 . getByTestId ( 'data-products-container' )
You can’t perform that action at this time.
0 commit comments