diff --git a/tests/table-multiselect.spec.ts b/tests/table-multiselect.spec.ts index 88791fc004..e7e71a98da 100644 --- a/tests/table-multiselect.spec.ts +++ b/tests/table-multiselect.spec.ts @@ -2,7 +2,8 @@ import { test, expect, Page } from '@playwright/test'; import { pasteInMonaco } from './utils'; const rowHeight = 19; -const columnHeaderHeight = 60; +const columnHeight = 30; +const filterHeight = 30; async function waitForLoadingDone(page: Page) { await expect( @@ -17,7 +18,7 @@ async function getGridLocation(page: Page) { return gridLocation; } -async function createTable(page: Page, cmd: string) { +async function createSingleColumnTable(page: Page, cmd: string) { const consoleInput = page.locator('.console-input'); await pasteInMonaco(consoleInput, cmd); await page.keyboard.press('Enter'); @@ -44,17 +45,17 @@ async function filterAndScreenshot( // select the first 3 rows await page.mouse.move( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight + gridLocation.y + 1 + columnHeight + filterHeight ); await page.mouse.down(); await page.mouse.move( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight + rowHeight * 2 + gridLocation.y + 1 + columnHeight + filterHeight + rowHeight * 2 ); await page.mouse.up(); await page.mouse.click( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight + rowHeight * 2, + gridLocation.y + 1 + columnHeight + filterHeight + rowHeight * 2, { button: 'right' } ); // apply filter @@ -80,7 +81,7 @@ function runMultiselectFilter( ) { test(testName, async ({ page }) => { await page.goto(''); - await createTable(page, cmd); + await createSingleColumnTable(page, cmd); const gridLocation = await getGridLocation(page); if (gridLocation === null) return; @@ -103,6 +104,7 @@ function runMultiselectFilter( }); } +// these are select filters that do not do multiselect function runSpecialSelectFilter( testName: string, cmd: string, @@ -110,14 +112,14 @@ function runSpecialSelectFilter( ) { test(testName, async ({ page }) => { await page.goto(''); - await createTable(page, cmd); + await createSingleColumnTable(page, cmd); const gridLocation = await getGridLocation(page); if (gridLocation === null) return; await page.mouse.click( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight / 2, + gridLocation.y + 1 + columnHeight, { button: 'right' } ); @@ -235,7 +237,7 @@ test('char formatting, non selected right click, preview formatting', async ({ page, }) => { await page.goto(''); - await createTable( + await createSingleColumnTable( page, ` from deephaven.column import char_col @@ -252,17 +254,17 @@ my_table = new_table([ await page.keyboard.down('Control'); await page.mouse.click( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight / 2 + rowHeight + gridLocation.y + 1 + columnHeight + rowHeight ); await page.mouse.click( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight / 2 + rowHeight * 3 + gridLocation.y + 1 + columnHeight + rowHeight * 3 ); await page.keyboard.up('Control'); await page.mouse.click( gridLocation.x + 1, - gridLocation.y + 1 + columnHeaderHeight / 2, + gridLocation.y + 1 + columnHeight, { button: 'right' } ); await page.getByRole('button', { name: 'Filter by Value' }).hover(); diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-chromium-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-chromium-linux.png index f0e44354fc..bc19a04dd4 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-chromium-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-chromium-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-firefox-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-firefox-linux.png index dcac8ffb87..6c09bf84d4 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-firefox-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-firefox-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-webkit-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-webkit-linux.png index bb84f9f4dd..1b5fbfb5ff 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-webkit-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-3-contains-webkit-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-chromium-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-chromium-linux.png index 6c3fc42b79..38ddd13bd4 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-chromium-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-chromium-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-firefox-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-firefox-linux.png index 66d09c7d9a..ac0ee24d63 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-firefox-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-firefox-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-webkit-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-webkit-linux.png index 7b2e780c5f..eeb749c453 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-webkit-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-4-not-contains-webkit-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-chromium-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-chromium-linux.png index c12d8564c7..618149ad59 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-chromium-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-chromium-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-firefox-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-firefox-linux.png index a1cb2daaa9..830488c02b 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-firefox-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-firefox-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-webkit-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-webkit-linux.png index 0a1a9a6a5d..85e722c110 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-webkit-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-5-starts-webkit-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-chromium-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-chromium-linux.png index 84111db6a5..d3e057555b 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-chromium-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-chromium-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-firefox-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-firefox-linux.png index a05698f58b..8819ed9c15 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-firefox-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-firefox-linux.png differ diff --git a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-webkit-linux.png b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-webkit-linux.png index 32f762de84..c23e642857 100644 Binary files a/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-webkit-linux.png and b/tests/table-multiselect.spec.ts-snapshots/multi-string-6-ends-webkit-linux.png differ