Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
"count": 1
},
"om-playwright/no-positional-locator": {
"count": 6
"count": 4
}
},
"playwright/e2e/Features/CuratedAssets.spec.ts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ test.describe(
).toContainText('Glossary');

await expect(
glossaryEntry.first().locator('.description-content')
glossaryEntry.first().getByTestId('description-content')
).toContainText(glossaryName);

await expect(
Expand Down
Loading