diff --git a/openmetadata-ui/src/main/resources/ui/eslint-suppressions.json b/openmetadata-ui/src/main/resources/ui/eslint-suppressions.json index 8fc31ec19ab0..2feb7685dbe8 100644 --- a/openmetadata-ui/src/main/resources/ui/eslint-suppressions.json +++ b/openmetadata-ui/src/main/resources/ui/eslint-suppressions.json @@ -161,7 +161,7 @@ "count": 1 }, "om-playwright/no-positional-locator": { - "count": 6 + "count": 4 } }, "playwright/e2e/Features/CuratedAssets.spec.ts": { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts index edf45b881d43..5dc572f43c7b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterPermission.spec.ts @@ -192,10 +192,16 @@ test.describe('Context Center Permissions', () => { browser ); - articleEntity = new KnowledgeCenterClass({ - displayName: `CC Permission Article ${uuid()}`, - name: `cc_permission_article_${uuid()}`, - }); + // An article with no owner lets anyone set one (OrganizationPolicy-NoOwner-Rule), + // so own it to check that a user without EditOwners cannot change its owners. + const admin = await getLoggedInUser(apiContext); + articleEntity = new KnowledgeCenterClass( + { + displayName: `CC Permission Article ${uuid()}`, + name: `cc_permission_article_${uuid()}`, + }, + [{ id: admin.id, type: 'user' }] + ); await articleEntity.create(apiContext); await apiContext.post('/api/v1/contextCenter/drive/folders', { @@ -2237,19 +2243,9 @@ test.describe('Context Center Permissions', () => { viewOnlyPage.getByTestId('create-knowledge-page-btn') ).not.toBeVisible(); - const articleResponse = viewOnlyPage.waitForResponse( - (response) => - response.url().includes('/api/v1/contextCenter/pages/') && - response.request().method() === 'GET' + await viewOnlyPage.goto( + `/context-center/articles/${articleEntity.responseData.fullyQualifiedName}` ); - - await viewOnlyPage - .getByTestId('knowledge-pages-hierarchy') - .getByRole('link') - .first() - .click(); - - await articleResponse; await waitForAllLoadersToDisappear(viewOnlyPage); await expect( @@ -2292,19 +2288,9 @@ test.describe('Context Center Permissions', () => { dataConsumerPage.getByTestId('create-knowledge-page-btn') ).not.toBeVisible(); - const articleResponse = dataConsumerPage.waitForResponse( - (response) => - response.url().includes('/api/v1/contextCenter/pages/') && - response.request().method() === 'GET' + await dataConsumerPage.goto( + `/context-center/articles/${articleEntity.responseData.fullyQualifiedName}` ); - - await dataConsumerPage - .getByTestId('knowledge-pages-hierarchy') - .getByRole('link') - .first() - .click(); - - await articleResponse; await waitForAllLoadersToDisappear(dataConsumerPage); await expect( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AuditLogs.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AuditLogs.spec.ts index ccb572b00b00..66a3255de3ea 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AuditLogs.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/AuditLogs.spec.ts @@ -1580,7 +1580,7 @@ test.describe( ).toContainText('Glossary'); await expect( - glossaryEntry.first().locator('.description-content') + glossaryEntry.first().getByTestId('description-content') ).toContainText(glossaryName); await expect(