diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts index 2cf6999c60df..c2ab30e9d10d 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Pagination.spec.ts @@ -109,7 +109,11 @@ test.describe('Database Schema Tables page pagination', () => { page, }) => { await page.goto(`/databaseSchema/${schemaFqn}?pageSize=15`); - await testPaginationNavigation(page, '/api/v1/tables', 'table'); + await testPaginationNavigation( + page, + '/api/v1/tables', + '[data-testid="databaseSchema-tables"]' + ); }); test('should test Database Schema Tables complete flow with search', async ({ @@ -124,7 +128,7 @@ test.describe('Database Schema Tables page pagination', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'schema', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="databaseSchema-tables"]', }); }); }); @@ -209,7 +213,11 @@ test.describe('Service Databases page pagination', () => { test('should test pagination on Service Databases page', async ({ page }) => { await page.goto(`/service/databaseServices/${databaseFqn}/databases`); - await testPaginationNavigation(page, '/api/v1/databases', 'table'); + await testPaginationNavigation( + page, + '/api/v1/databases', + '[data-testid="service-children-table"]' + ); const responsePromise = page.waitForResponse((response) => response @@ -252,7 +260,7 @@ test.describe('Service Databases page pagination', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'schema', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="service-children-table"]', }); }); }); @@ -413,7 +421,11 @@ test.describe('Pagination tests for API Collection Endpoints page', () => { test('should test API Collection normal pagination', async ({ page }) => { await page.goto(`/apiCollection/${apiCollectionFqn}?pageSize=15`); - await testPaginationNavigation(page, '/api/v1/apiEndpoints', 'table'); + await testPaginationNavigation( + page, + '/api/v1/apiEndpoints', + '[data-testid="databaseSchema-tables"]' + ); }); test('should test API Collection complete flow with search', async ({ @@ -427,7 +439,7 @@ test.describe('Pagination tests for API Collection Endpoints page', () => { normalApiPattern: '/api/v1/apiEndpoints', searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="databaseSchema-tables"]', }); }); }); @@ -462,7 +474,11 @@ test.describe('Pagination tests for Stored Procedures page', () => { await page.goto( `/databaseSchema/${schemaFqn}/stored_procedure?pageSize=15` ); - await testPaginationNavigation(page, '/api/v1/storedProcedures', 'table'); + await testPaginationNavigation( + page, + '/api/v1/storedProcedures', + '[data-testid="stored-procedure-table"]' + ); const responsePromise = page.waitForResponse((response) => response.url().includes('/api/v1/tables') ); @@ -491,7 +507,7 @@ test.describe('Pagination tests for Stored Procedures page', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'schema', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="stored-procedure-table"]', deleteBtnTestId: 'show-deleted-stored-procedure', }); }); @@ -522,7 +538,11 @@ test.describe('Pagination tests for Database Schemas page', () => { test('should test Database Schemas normal pagination', async ({ page }) => { await page.goto(`/database/${databaseFqn}?pageSize=15`); - await testPaginationNavigation(page, '/api/v1/databaseSchemas', 'table'); + await testPaginationNavigation( + page, + '/api/v1/databaseSchemas', + '[data-testid="database-databaseSchemas"]' + ); }); test('should test Database Schemas complete flow with search', async ({ @@ -537,7 +557,7 @@ test.describe('Pagination tests for Database Schemas page', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'schema', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="database-databaseSchemas"]', }); }); }); @@ -582,7 +602,7 @@ test.describe('Pagination tests for Dashboard Data Models page', () => { await testPaginationNavigation( page, '/api/v1/dashboard/datamodels', - 'table' + '[data-testid="data-models-table"]' ); const responsePromise = page.waitForResponse((response) => response.url().includes('/api/v1/dashboard/datamodels') @@ -612,7 +632,7 @@ test.describe('Pagination tests for Dashboard Data Models page', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'dataModel', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="data-models-table"]', }); }); }); @@ -644,7 +664,11 @@ test.describe('Pagination tests for Drive Service Directories page', () => { await page.goto( `/service/driveServices/${serviceFqn}/directories?pageSize=15` ); - await testPaginationNavigation(page, '/api/v1/drives/directories', 'table'); + await testPaginationNavigation( + page, + '/api/v1/drives/directories', + '[data-testid="service-children-table"]' + ); }); test('should test Directories complete flow with search', async ({ @@ -659,7 +683,7 @@ test.describe('Pagination tests for Drive Service Directories page', () => { searchApiPattern: '/api/v1/search/query', searchTestTerm: 'pw', searchParamName: 'schema', - waitForLoadSelector: 'table', + waitForLoadSelector: '[data-testid="service-children-table"]', }); }); });