Revert "Pk missing fix (#2094)" (#2099)

This reverts commit af0a890516.
This commit is contained in:
sunghyunkang1111
2025-04-09 13:04:44 -05:00
committed by GitHub
parent 0666e11d89
commit a3bfc89318
8 changed files with 21 additions and 259 deletions

View File

@@ -1,45 +0,0 @@
import { expect, test } from "@playwright/test";
import { DataExplorer, DocumentsTab, TestAccount } from "../fx";
import { documentTestCases } from "./testCases";
let explorer: DataExplorer = null!;
let documentsTab: DocumentsTab = null!;
for (const { name, databaseId, containerId, expectedDocumentIds } of documentTestCases) {
test.describe(`Test Documents with ${name}`, () => {
test.beforeEach("Open documents tab", async ({ page }) => {
explorer = await DataExplorer.open(page, TestAccount.SQLReadOnly);
const containerNode = await explorer.waitForContainerNode(databaseId, containerId);
await containerNode.expand();
const containerMenuNode = await explorer.waitForContainerItemsNode(databaseId, containerId);
await containerMenuNode.element.click();
documentsTab = explorer.documentsTab("tab0");
await documentsTab.documentsFilter.waitFor();
await documentsTab.documentsListPane.waitFor();
await expect(documentsTab.resultsEditor.locator).toBeAttached({ timeout: 60 * 1000 });
});
for (const docId of expectedDocumentIds) {
test.describe(`Document ID: ${docId}`, () => {
test(`should load and view document ${docId}`, async () => {
const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0);
await span.waitFor();
await expect(span).toBeVisible();
await span.click();
await expect(documentsTab.resultsEditor.locator).toBeAttached({ timeout: 60 * 1000 });
const resultText = await documentsTab.resultsEditor.text();
const resultData = JSON.parse(resultText!);
expect(resultText).not.toBeNull();
expect(resultData?.id).toEqual(docId);
});
});
}
});
}