File tree Expand file tree Collapse file tree
openmetadata-ui/src/main/resources/ui/playwright Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ test.describe(
216216
217217 await waitForAllLoadersToDisappear ( page ) ;
218218
219- await hardDeleteTeam ( page ) ;
219+ await hardDeleteTeam ( page , teamName ) ;
220220
221221 // Validate the deleted team
222222 await expect (
Original file line number Diff line number Diff line change @@ -387,7 +387,7 @@ test.describe('Teams Page', () => {
387387 teamDetails ?. updatedName ?? ''
388388 ) ;
389389
390- await hardDeleteTeam ( page ) ;
390+ await hardDeleteTeam ( page , teamDetails ?. updatedName ?? teamDetails . name ) ;
391391 } ) ;
392392 } ) ;
393393
@@ -501,7 +501,10 @@ test.describe('Teams Page', () => {
501501 team . responseData ?. [ 'displayName' ]
502502 ) ;
503503
504- await hardDeleteTeam ( page ) ;
504+ await hardDeleteTeam (
505+ page ,
506+ team . responseData ?. [ 'displayName' ] ?? team . data . name
507+ ) ;
505508 await afterAction ( ) ;
506509 } ) ;
507510
@@ -765,7 +768,7 @@ test.describe('Teams Page', () => {
765768 page . getByTestId ( 'team-hierarchy-table' ) . getByRole ( 'link' )
766769 ) . toContainText ( team2Details . displayName ) ;
767770
768- await hardDeleteTeam ( page ) ;
771+ await hardDeleteTeam ( page , team1Details . name ) ;
769772 } ) ;
770773
771774 test ( 'Total User Count should be rendered' , async ( { page } ) => {
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import {
2121 assignDomain ,
2222 descriptionBox ,
2323 redirectToHomePage ,
24- toastNotification ,
2524 uuid ,
2625} from './common' ;
2726import {
@@ -133,12 +132,11 @@ export const softDeleteTeam = async (page: Page) => {
133132
134133 await page . click ( '[data-testid="confirm-button"]' ) ;
135134
136- await deleteResponse ;
137-
138- await toastNotification ( page , / d e l e t e d s u c c e s s f u l l y ! / ) ;
135+ const response = await deleteResponse ;
136+ expect ( response . status ( ) ) . toBe ( 200 ) ;
139137} ;
140138
141- export const hardDeleteTeam = async ( page : Page ) => {
139+ export const hardDeleteTeam = async ( page : Page , teamName : string ) => {
142140 await page
143141 . getByTestId ( 'team-details-collapse' )
144142 . getByTestId ( 'manage-button' )
@@ -159,9 +157,10 @@ export const hardDeleteTeam = async (page: Page) => {
159157
160158 await page . click ( '[data-testid="confirm-button"]' ) ;
161159
162- await deleteResponse ;
160+ const response = await deleteResponse ;
161+ expect ( response . status ( ) ) . toBe ( 200 ) ;
163162
164- await toastNotification ( page , / d e l e t e d s u c c e s s f u l l y ! / ) ;
163+ await searchTeam ( page , teamName , { expectEmptyResults : true } ) ;
165164} ;
166165
167166export const getNewTeamDetails = ( teamName : string ) => {
You can’t perform that action at this time.
0 commit comments