diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts index c258445b625a..d8fcb17bf145 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts @@ -14,13 +14,13 @@ import { expect, test } from '@playwright/test'; import { DELETE_TERM } from '../../constant/common'; import { PLAYWRIGHT_BASIC_TEST_TAG_OBJ } from '../../constant/config'; import { GlobalSettingOptions } from '../../constant/settings'; -import { - redirectToHomePage, - toastNotification, - uuid, -} from '../../utils/common'; +import { redirectToHomePage, uuid } from '../../utils/common'; import { settingClick } from '../../utils/sidebar'; -import { addTeamHierarchy, getNewTeamDetails } from '../../utils/team'; +import { + addTeamHierarchy, + getNewTeamDetails, + searchTeam, +} from '../../utils/team'; // use the admin user to login test.use({ storageState: 'playwright/.auth/admin.json' }); @@ -144,10 +144,9 @@ test.describe( await page.click('[data-testid="confirm-button"]'); await deleteResponse; - await toastNotification( - page, - `"${businessTeamName}" deleted successfully!` - ); + await test.step('Deleted team is no longer searchable', async () => { + await searchTeam(page, businessTeamName, { expectEmptyResults: true }); + }); }); } );