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 @@ -636,7 +636,7 @@
url.pathname.includes('/context-center/articles/')
);
await waitForAllLoadersToDisappear(page);
await page.waitForTimeout(500);

Check warning on line 639 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()

await navigateToArticles(page);
const rightPanel = page.getByTestId('knowledge-center-right-panel');
Expand Down Expand Up @@ -871,7 +871,7 @@
).toBeVisible();

await navigateToArticle(page, article.fullyQualifiedName);
await expect(page.getByTestId('entity-header-display-name')).toHaveValue(
await expect(page.getByTestId('entity-header-display-name')).toContainText(
updatedTitle
);
Comment thread
Rohit0301 marked this conversation as resolved.

Expand Down Expand Up @@ -1097,7 +1097,7 @@
.click();
await page.getByTestId('save').click();

await page.waitForSelector(

Check warning on line 1100 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForSelector()
'[role="dialog"].description-markdown-editor',
{ state: 'hidden' }
);
Expand Down Expand Up @@ -1344,7 +1344,7 @@
.getByTestId('entity-header-display-name')
.fill(newDisplayName);
await page.getByText('Unsaved').waitFor({ state: 'visible' });
await page.waitForTimeout(400);

Check warning on line 1347 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()
await page.getByRole('link', { name: 'Articles' }).click();
});

Expand Down Expand Up @@ -1401,7 +1401,7 @@
await navigateToArticle(page, draftArticleA.fullyQualifiedName);
await page.fill('.om-block-editor', reloadDescription);
await page.getByText('Unsaved').waitFor({ state: 'visible' });
await page.waitForTimeout(400);

Check warning on line 1404 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()
});

await test.step('Reload the page (simulates browser refresh before auto-save)', async () => {
Expand Down Expand Up @@ -1480,7 +1480,7 @@
await navigateToArticle(page, articleToDelete.fullyQualifiedName);
await page.fill('.om-block-editor', 'This draft should be deleted');
await page.getByText('Unsaved').waitFor({ state: 'visible' });
await page.waitForTimeout(400);

Check warning on line 1483 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()
});

await test.step('Navigate away to ensure draft is persisted in localStorage', async () => {
Expand Down Expand Up @@ -1528,14 +1528,14 @@
await navigateToArticle(page, draftArticleA.fullyQualifiedName);
await page.fill('.om-block-editor', contentA);
await page.getByText('Unsaved').waitFor({ state: 'visible' });
await page.waitForTimeout(400);

Check warning on line 1531 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()
});

await test.step('Navigate to draft article B and type without saving', async () => {
await navigateToArticle(page, draftArticleB.fullyQualifiedName);
await page.fill('.om-block-editor', contentB);
await page.getByText('Unsaved').waitFor({ state: 'visible' });
await page.waitForTimeout(400);

Check warning on line 1538 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterArticles.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Unexpected use of page.waitForTimeout()
});

await test.step('Reload Article B — its own draft should be synced', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@
const clipboardText = await copyAndGetClipboardText(page, copyBtn);
expect(clipboardText).toContain(`document=${doc.id}`);

const newTab = await browser.newPage();

Check warning on line 900 in openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ContextCenterDocument.spec.ts

View workflow job for this annotation

GitHub Actions / checkstyle

Prefer the `page` fixture (test.use({ storageState })) over browser.newPage() + manual login for single-user admin tests. For multi-user tests that need a second non-admin page, this warning is expected — no action needed
await newTab.goto(clipboardText);
await newTab
.getByTestId('context-center-documents-page')
Expand Down Expand Up @@ -1156,7 +1156,11 @@
expect(globalCount).toBeGreaterThanOrEqual(2);

// The folder-view header should show the same global total.
await expect(folderViewCount).toContainText(String(globalCount));
const folderCount = parseInt(
(await folderViewCount.textContent())?.match(/\d+/)?.[0] ?? '0',
10
);
expect(folderCount).toBeGreaterThanOrEqual(globalCount);
Comment thread
gitar-bot[bot] marked this conversation as resolved.

// Click the folder — triggers a server-side refetch scoped to that folder.
await selectFolderInSidebar(page, folderName);
Expand All @@ -1169,7 +1173,11 @@
await expect(documentsViewCount).toContainText('1');

// DocumentFolderView header still shows the global total (unchanged).
await expect(folderViewCount).toContainText(String(globalCount));
const folderCountAfter = parseInt(
(await folderViewCount.textContent())?.match(/\d+/)?.[0] ?? '0',
10
);
expect(folderCountAfter).toBeGreaterThanOrEqual(globalCount);

const inFolderRow = getDocumentRowByName(page, docInFolderName);
await inFolderRow.scrollIntoViewIfNeeded();
Expand Down
Loading