From 26a9f39f5a9855a98fbcad945ee3dcb5e07e7e2d Mon Sep 17 00:00:00 2001 From: Vsevolod Kukol Date: Fri, 11 Sep 2026 23:18:35 +0200 Subject: [PATCH] Reduce SQL document test matrix --- playwright.config.ts | 3 +++ test/sql/document.spec.ts | 10 +++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index 3f22e48a9..e568d0806 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -28,6 +28,7 @@ export default defineConfig({ projects: [ { name: "firefox", + grepInvert: /@document-chrome-only/, use: { ...devices["Desktop Firefox"], launchOptions: { @@ -50,6 +51,7 @@ export default defineConfig({ }, { name: "webkit", + grepInvert: /@document-chrome-only/, use: { ...devices["Desktop Safari"], }, @@ -66,6 +68,7 @@ export default defineConfig({ }, { name: "Microsoft Edge", + grepInvert: /@document-chrome-only/, use: { ...devices["Desktop Edge"], channel: "msedge", diff --git a/test/sql/document.spec.ts b/test/sql/document.spec.ts index a093da376..2dc3b2e69 100644 --- a/test/sql/document.spec.ts +++ b/test/sql/document.spec.ts @@ -18,6 +18,9 @@ import { documentTestCases } from "./testCases"; let explorer: DataExplorer = null!; let documentsTab: DocumentsTab = null!; +const chromeOnlyDocumentTag = "@document-chrome-only"; +const crossBrowserSmokeDocumentId = "singlePartitionKey"; + for (const { name, databaseId, containerId, documents } of documentTestCases) { test.describe(`Test SQL Documents with ${name}`, () => { // test.skip(true, "Temporarily disabling all tests in this spec file"); @@ -39,8 +42,9 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) { for (const document of documents) { const { documentId: docId, partitionKeys, skipCreateDelete } = document; + const testDetails = { tag: docId === crossBrowserSmokeDocumentId ? [] : [chromeOnlyDocumentTag] }; test.describe(`Document ID: ${docId}`, () => { - test(`should load and view document ${docId}`, async () => { + test(`should load and view document ${docId}`, testDetails, async () => { const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); await span.waitFor(); await expect(span).toBeVisible(); @@ -55,14 +59,14 @@ for (const { name, databaseId, containerId, documents } of documentTestCases) { }); const testOrSkip = skipCreateDelete ? test.skip : test; - testOrSkip(`should be able to create and delete new document from ${docId}`, async ({ page }) => { + testOrSkip(`should be able to create and delete new document from ${docId}`, testDetails, async () => { const span = documentsTab.documentsListPane.getByText(docId, { exact: true }).nth(0); await span.waitFor(); await expect(span).toBeVisible(); await span.click(); let newDocumentId; - await page.waitForTimeout(5000); + await expect(documentsTab.resultsEditor.locator).toBeAttached({ timeout: 60 * 1000 }); await retry(async () => { const newDocumentButton = await explorer.waitForCommandBarButton("New Item", 5000); await expect(newDocumentButton).toBeVisible();