@@ -306,8 +306,10 @@ test.describe('Audit Logs Page', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => {
306306 . getByText ( 'admin' , { exact : true } ) ;
307307 await expect ( adminOption ) . toBeVisible ( ) ;
308308
309- const auditLogResponse = page . waitForResponse ( ( response ) =>
310- response . url ( ) . includes ( '/api/v1/audit' )
309+ const auditLogResponse = page . waitForResponse (
310+ ( response ) =>
311+ response . url ( ) . includes ( '/api/v1/audit/logs' ) &&
312+ response . url ( ) . includes ( 'userName=admin' )
311313 ) ;
312314
313315 await adminOption . click ( ) ;
@@ -343,14 +345,17 @@ test.describe('Audit Logs Page', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => {
343345 const entityOption = page . locator ( '.ant-dropdown-menu-item' ) . first ( ) ;
344346 await expect ( entityOption ) . toBeVisible ( ) ;
345347
346- const auditLogResponse = page . waitForResponse ( ( response ) =>
347- response . url ( ) . includes ( '/api/v1/audit' )
348+ const auditLogResponse = page . waitForResponse (
349+ ( response ) =>
350+ response . url ( ) . includes ( '/api/v1/audit/logs' ) &&
351+ response . url ( ) . includes ( 'entityType=' )
348352 ) ;
349353
350354 await entityOption . click ( ) ;
351355 await page . getByTestId ( 'update-btn' ) . click ( ) ;
352356 const response = await auditLogResponse ;
353357 expect ( response . status ( ) ) . toBe ( 200 ) ;
358+
354359 const entityFilterTag = page . getByTestId ( 'filter-chip-entityType' ) ;
355360 await expect ( entityFilterTag ) . toBeVisible ( ) ;
356361 await expect ( entityFilterTag ) . toContainText ( entityType ) ;
@@ -777,9 +782,9 @@ test.describe(
777782 state : 'visible' ,
778783 } ) ;
779784
780- const todayCell = page . locator (
781- '.ant-picker-dropdown:visible .ant-picker-cell-today'
782- ) ;
785+ const todayCell = page
786+ . locator ( '.ant-picker-dropdown:visible .ant-picker-cell-today' )
787+ . first ( ) ;
783788 await todayCell . click ( ) ;
784789 await todayCell . click ( ) ;
785790 } ) ;
@@ -858,9 +863,9 @@ test.describe(
858863 state : 'visible' ,
859864 } ) ;
860865
861- const todayCell = page . locator (
862- '.ant-picker-dropdown:visible .ant-picker-cell-today'
863- ) ;
866+ const todayCell = page
867+ . locator ( '.ant-picker-dropdown:visible .ant-picker-cell-today' )
868+ . first ( ) ;
864869 await todayCell . click ( ) ;
865870 await todayCell . click ( ) ;
866871
@@ -904,9 +909,9 @@ test.describe(
904909 state : 'visible' ,
905910 } ) ;
906911
907- const todayCell = page . locator (
908- '.ant-picker-dropdown:visible .ant-picker-cell-today'
909- ) ;
912+ const todayCell = page
913+ . locator ( '.ant-picker-dropdown:visible .ant-picker-cell-today' )
914+ . first ( ) ;
910915 await todayCell . click ( ) ;
911916 await todayCell . click ( ) ;
912917 } ) ;
0 commit comments