diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/EntityRenameConsolidation.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/EntityRenameConsolidation.spec.ts index 86314ae514b3..24c0f690f872 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/EntityRenameConsolidation.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/EntityRenameConsolidation.spec.ts @@ -643,8 +643,7 @@ test.describe( // DOMAIN TESTS // =================================================================== - // eslint-disable-next-line playwright/no-skipped-test -- domain rename consolidation not yet stable - test.skip('Domain - rename then update description should work', async ({ + test('Domain - rename then update description should work', async ({ page, browser, }) => { @@ -699,8 +698,7 @@ test.describe( } }); - // eslint-disable-next-line playwright/no-skipped-test -- domain rename consolidation not yet stable - test.skip('Domain - multiple rename + update cycles should work', async ({ + test('Domain - multiple rename + update cycles should work', async ({ page, browser, }) => { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryNavigation.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryNavigation.spec.ts index 3ef24dc9017b..9b1469150cb6 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryNavigation.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryNavigation.spec.ts @@ -228,9 +228,7 @@ test.describe('Glossary Navigation', () => { }); // UI-01: Empty glossary state (no terms) - // Skip: Test isolation issue - selectActiveGlossary not selecting the correct glossary - // eslint-disable-next-line playwright/no-skipped-test -- test isolation issue with selectActiveGlossary - test.skip('should show empty state when glossary has no terms', async ({ + test('should show empty state when glossary has no terms', async ({ page, }) => { const { apiContext, afterAction } = await getApiContext(page); @@ -243,8 +241,11 @@ test.describe('Glossary Navigation', () => { await sidebarClick(page, SidebarItem.GLOSSARY); await selectActiveGlossary(page, emptyGlossary.data.displayName); - // Verify empty state is shown (with default status filter active) - await expect(page.getByText('No Glossary Term found')).toBeVisible(); + // A glossary with zero terms renders the empty-glossary placeholder, not + // the "No Glossary Term found" row that a non-matching status filter shows. + await expect( + page.getByTestId('create-error-placeholder-Glossary Term') + ).toBeVisible(); // Verify add term button is available await expect(page.getByTestId('add-new-tag-button-header')).toBeVisible(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts index 7af6a4af58d0..1e0f0064fbc2 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/LandingPageWidgets/DomainDataProductsWidgets.spec.ts @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { expect, Page, test as base } from '@playwright/test'; +import { Page, test as base } from '@playwright/test'; import { SidebarItem } from '../../../constant/sidebar'; import { DataProduct } from '../../../support/domain/DataProduct'; import { Domain } from '../../../support/domain/Domain'; @@ -91,7 +91,7 @@ base.afterAll('Cleanup', async ({ browser }) => { await afterAction(); }); -test.describe.fixme('Domain and Data Product Asset Counts', () => { +test.describe.serial('Domain and Data Product Asset Counts', () => { test.slow(); // Slow Test test.beforeEach(async ({ page }, testInfo) => { await redirectToHomePage(page, false); @@ -265,46 +265,25 @@ test.describe.fixme('Domain and Data Product Asset Counts', () => { await page.getByTestId('assets').click(); await dataProductAssetsResponse; - let hasAssets = true; - while (hasAssets) { - const checkboxes = page.locator( - '[data-testid^="table-data-card_"] input[type="checkbox"]' - ); - const count = await checkboxes.count(); - - if (count === 0) { - hasAssets = false; - break; - } - - const selectAll = page.getByRole('checkbox', { name: 'Select All' }); - if (await selectAll.isVisible()) { - await selectAll.check(); - } else { - for (let i = 0; i < count; i++) { - await checkboxes.nth(i).check(); - } - } - - const previousCount = count; - const removeRes = page.waitForResponse('**/assets/remove'); - await page.getByTestId('delete-all-button').click(); - await removeRes; + // Remove every asset currently attached to the data product. The card + // list paints asynchronously after the assets response resolves, and + // count() does not auto-wait — so wait for the first card to render + // before counting, otherwise the loop reads 0 and removes nothing. + await waitForAllLoadersToDisappear(page); + const assetCard = page.locator('[data-testid^="table-data-card_"]'); + await assetCard.first().waitFor({ state: 'visible' }); - await expect - .poll( - async () => - page - .locator( - '[data-testid^="table-data-card_"] input[type="checkbox"]' - ) - .count(), - { timeout: 10_000 } - ) - .toBeLessThan(previousCount); + const attachedCount = await assetCard.count(); + for (let i = 0; i < attachedCount; i++) { + await assetCard.nth(i).locator('input[type="checkbox"]').check(); } + const removeRes = page.waitForResponse('**/assets/remove'); + await page.getByTestId('delete-all-button').click(); + await removeRes; + await page.reload(); + await waitForAllLoadersToDisappear(page); await checkAssetsCount(page, 0); await redirectToHomePage(page); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index cd332e3b91e9..162f5764fc1a 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -117,7 +117,7 @@ const test = base.extend<{ }, }); -test.describe.fixme('Domains', () => { +test.describe('Domains', () => { test.slow(true); test.beforeAll('Setup pre-requests', async ({ browser }) => { @@ -384,16 +384,17 @@ test.describe.fixme('Domains', () => { // Verify empty state message await expect(page.getByTestId('empty-placeholder')).toBeVisible(); - const addButton = page.getByTestId('data-assets-add-button'); + // `CreatePlaceholder` applies the action's `data-assets-add-button` as the + // button's DOM id, so this CTA has no testid to select it by. + const addButton = page.locator('#data-assets-add-button'); await expect(addButton).toBeVisible(); await addButton.click(); await waitForAllLoadersToDisappear(page); - // Verify Add Assets form is displayed - await expect(page.getByTestId('form-heading')).toContainText( - 'Add Assets' - ); + // Verify Add Assets modal is displayed (migrated to the core-ui Dialog + // `asset-selection-modal`; the old `form-heading` testid no longer applies) + await expect(page.getByTestId('asset-selection-modal')).toBeVisible(); await expect(page.getByTestId('cancel-btn')).toBeVisible(); await expect(page.getByTestId('save-btn')).toBeDisabled(); @@ -1698,7 +1699,7 @@ test.describe.fixme('Domains', () => { }); }); -test.describe.fixme('Domain Rename Comprehensive Tests', () => { +test.describe('Domain Rename Comprehensive Tests', () => { test.slow(true); test.beforeEach('Visit home page', async ({ page }) => { @@ -2721,7 +2722,7 @@ test.describe.fixme('Domain Rename Comprehensive Tests', () => { }); }); -test.describe.fixme('Domains Rbac', () => { +test.describe('Domains Rbac', () => { test.slow(true); let domain1: Domain; @@ -2877,7 +2878,7 @@ test.describe.fixme('Domains Rbac', () => { }); }); -test.describe.fixme('Data Consumer Domain Ownership', () => { +test.describe('Data Consumer Domain Ownership', () => { test.slow(true); let classification: ClassificationClass; @@ -2976,7 +2977,7 @@ test.describe.fixme('Data Consumer Domain Ownership', () => { }); }); -test.describe.fixme('Domain Access with hasDomain() Rule', () => { +test.describe('Domain Access with hasDomain() Rule', () => { test.slow(true); let testResources: { @@ -3045,7 +3046,7 @@ test.describe.fixme('Domain Access with hasDomain() Rule', () => { }); }); -test.describe.fixme('Domain Access with noDomain() Rule', () => { +test.describe('Domain Access with noDomain() Rule', () => { test.slow(true); let testResources: { @@ -3119,7 +3120,7 @@ test.describe.fixme('Domain Access with noDomain() Rule', () => { }); }); -test.describe.fixme('Domain Tree View Functionality', () => { +test.describe('Domain Tree View Functionality', () => { let subDomain: SubDomain; const domain = EntityDataClass.domain1; const domainDisplayName = domain.responseData.displayName; @@ -3149,7 +3150,7 @@ test.describe.fixme('Domain Tree View Functionality', () => { await sidebarClick(page, SidebarItem.DOMAIN); await waitForAllLoadersToDisappear(page); - const treeViewButton = page.getByRole('button', { name: 'tree' }); + const treeViewButton = page.getByRole('radio', { name: 'tree' }); await expect(treeViewButton).toBeVisible(); await treeViewButton.click(); @@ -3392,7 +3393,7 @@ test.describe.fixme('Domain Tree View Functionality', () => { }); }); -test.describe.fixme('Domain asset dryRun — add confirmation', () => { +test.describe('Domain asset dryRun — add confirmation', () => { test.slow(true); const openDomainAssetsAddModal = async (page: Page, domain: Domain) => { @@ -3653,78 +3654,75 @@ test.describe.fixme('Domain asset dryRun — add confirmation', () => { }); }); -test.describe.fixme( - 'Domain assets — glossary and inherited glossary term', - () => { - test.slow(true); +test.describe('Domain assets — glossary and inherited glossary term', () => { + test.slow(true); - let assetDomain: Domain; - let assetGlossary: Glossary; - let inheritedTerm: GlossaryTerm; + let assetDomain: Domain; + let assetGlossary: Glossary; + let inheritedTerm: GlossaryTerm; - test.beforeAll( - 'Setup domain with glossary and inherited term', - async ({ browser }) => { - const { apiContext, afterAction } = await performAdminLogin(browser); + test.beforeAll( + 'Setup domain with glossary and inherited term', + async ({ browser }) => { + const { apiContext, afterAction } = await performAdminLogin(browser); - assetDomain = new Domain(); - assetGlossary = new Glossary(); + assetDomain = new Domain(); + assetGlossary = new Glossary(); - await assetDomain.create(apiContext); - await assetGlossary.create(apiContext); + await assetDomain.create(apiContext); + await assetGlossary.create(apiContext); - await assetGlossary.patch(apiContext, [ - { - op: 'add', - path: '/domains/0', - value: { - id: assetDomain.responseData.id, - type: 'domain', - name: assetDomain.responseData.name, - displayName: assetDomain.responseData.displayName, - }, + await assetGlossary.patch(apiContext, [ + { + op: 'add', + path: '/domains/0', + value: { + id: assetDomain.responseData.id, + type: 'domain', + name: assetDomain.responseData.name, + displayName: assetDomain.responseData.displayName, }, - ]); - - inheritedTerm = new GlossaryTerm(assetGlossary); - await inheritedTerm.create(apiContext); + }, + ]); - await afterAction(); - } - ); + inheritedTerm = new GlossaryTerm(assetGlossary); + await inheritedTerm.create(apiContext); - test.afterAll('Cleanup', async ({ browser }) => { - const { apiContext, afterAction } = await performAdminLogin(browser); - await inheritedTerm.delete(apiContext); - await assetGlossary.delete(apiContext); - await assetDomain.delete(apiContext); await afterAction(); - }); + } + ); - test.beforeEach('Visit home page', async ({ page }) => { - await redirectToHomePage(page); - }); + test.afterAll('Cleanup', async ({ browser }) => { + const { apiContext, afterAction } = await performAdminLogin(browser); + await inheritedTerm.delete(apiContext); + await assetGlossary.delete(apiContext); + await assetDomain.delete(apiContext); + await afterAction(); + }); - test('Assets tab lists the assigned glossary and its inherited term', async ({ - page, - }) => { - await sidebarClick(page, SidebarItem.DOMAIN); - await waitForAllLoadersToDisappear(page); + test.beforeEach('Visit home page', async ({ page }) => { + await redirectToHomePage(page); + }); - await goToAssetsTab(page, assetDomain.data); + test('Assets tab lists the assigned glossary and its inherited term', async ({ + page, + }) => { + await sidebarClick(page, SidebarItem.DOMAIN); + await waitForAllLoadersToDisappear(page); - const glossaryCard = page.getByTestId( - `table-data-card_${assetGlossary.responseData.fullyQualifiedName}` - ); - const inheritedTermCard = page.getByTestId( - `table-data-card_${inheritedTerm.responseData.fullyQualifiedName}` - ); + await goToAssetsTab(page, assetDomain.data); - await expect(glossaryCard).toBeVisible({ timeout: 30_000 }); - await expect(inheritedTermCard).toBeVisible({ timeout: 30_000 }); - }); - } -); + const glossaryCard = page.getByTestId( + `table-data-card_${assetGlossary.responseData.fullyQualifiedName}` + ); + const inheritedTermCard = page.getByTestId( + `table-data-card_${inheritedTerm.responseData.fullyQualifiedName}` + ); + + await expect(glossaryCard).toBeVisible({ timeout: 30_000 }); + await expect(inheritedTermCard).toBeVisible({ timeout: 30_000 }); + }); +}); test.describe('Domain description editor popups', () => { const table = new TableClass(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts index 35b44809ed05..881b970dc0f4 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts @@ -1248,61 +1248,52 @@ test.describe('Glossary tests', () => { } }); - test.fixme( - 'Request description task for Glossary Term', - async ({ browser }) => { - const { page, afterAction, apiContext } = await performAdminLogin( - browser, - { navigate: true } - ); - const glossary1 = new Glossary(); - const user1 = new UserClass(); - const glossaryTerm1 = new GlossaryTerm(glossary1); - glossary1.data.terms = [glossaryTerm1]; - - try { - await user1.create(apiContext); - await glossary1.create(apiContext); - await glossaryTerm1.create(apiContext); - await sidebarClick(page, SidebarItem.GLOSSARY); - await selectActiveGlossary(page, glossary1.data.displayName); - await selectActiveGlossaryTerm(page, glossaryTerm1.data.displayName); + test('Request description task for Glossary Term', async ({ browser }) => { + const { page, afterAction, apiContext } = await performAdminLogin(browser, { + navigate: true, + }); + const glossary1 = new Glossary(); + const user1 = new UserClass(); + const glossaryTerm1 = new GlossaryTerm(glossary1); + glossary1.data.terms = [glossaryTerm1]; - const value: TaskDetails = { - term: glossaryTerm1.data.name, - assignee: user1.responseData.name, - }; + try { + await user1.create(apiContext); + await glossary1.create(apiContext); + await glossaryTerm1.create(apiContext); + await sidebarClick(page, SidebarItem.GLOSSARY); + await selectActiveGlossary(page, glossary1.data.displayName); + await selectActiveGlossaryTerm(page, glossaryTerm1.data.displayName); - await page.getByTestId('request-description').click(); + const value: TaskDetails = { + term: glossaryTerm1.data.name, + assignee: user1.responseData.name, + }; - await createDescriptionTaskForGlossary( - page, - value, - glossaryTerm1, - false - ); + await page.getByTestId('request-description').click(); - const taskResolve = waitForTaskResolveResponse(page); - await page.getByTestId('approve-button').first().click(); - await taskResolve; + await createDescriptionTaskForGlossary(page, value, glossaryTerm1, false); - await redirectToHomePage(page); - await sidebarClick(page, SidebarItem.GLOSSARY); - await selectActiveGlossary(page, glossary1.data.displayName); - await selectActiveGlossaryTerm(page, glossaryTerm1.data.displayName); + const taskResolve = waitForTaskResolveResponse(page); + await page.getByTestId('approve-button').first().click(); + await taskResolve; - const viewerContainerText = await page.textContent( - '[data-testid="viewer-container"]' - ); + await redirectToHomePage(page); + await sidebarClick(page, SidebarItem.GLOSSARY); + await selectActiveGlossary(page, glossary1.data.displayName); + await selectActiveGlossaryTerm(page, glossaryTerm1.data.displayName); - expect(viewerContainerText).toContain('Updated description'); - } finally { - await glossaryTerm1.delete(apiContext); - await glossary1.delete(apiContext); - await afterAction(); - } + // The description renders after the term page finishes loading, so assert + // on the locator rather than reading textContent once. + await expect( + page.locator('[data-testid="viewer-container"]') + ).toContainText('Updated description'); + } finally { + await glossaryTerm1.delete(apiContext); + await glossary1.delete(apiContext); + await afterAction(); } - ); + }); test('Request tags for Glossary', async ({ browser }) => { test.slow(true);