From fc239c68428074326f7cacb983f9fc4f1b50707e Mon Sep 17 00:00:00 2001 From: neo Date: Tue, 29 Oct 2024 15:44:55 +0100 Subject: [PATCH] FIX: playwrght test about sorting order --- tests/end2end/playwright/lizmap-features-table.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/end2end/playwright/lizmap-features-table.spec.js b/tests/end2end/playwright/lizmap-features-table.spec.js index e01e5c27eb..18ead79319 100644 --- a/tests/end2end/playwright/lizmap-features-table.spec.js +++ b/tests/end2end/playwright/lizmap-features-table.spec.js @@ -39,7 +39,7 @@ test.describe('Display lizmap-features-table component in popup from QGIS toolti // Get first item and check it let firstItem = lizmapFeaturesTable.locator("div.lizmap-features-table-container div.lizmap-features-table-item").first(); await expect(firstItem).toHaveAttribute('data-line-id', '1'); - await expect(firstItem).toHaveAttribute('data-feature-id', '10'); + await expect(firstItem).toHaveAttribute('data-feature-id', '17'); // Click on first item and check sub-popup firstItem.click(); @@ -47,13 +47,13 @@ test.describe('Display lizmap-features-table component in popup from QGIS toolti await expect(firstItem).toHaveClass(/popup-displayed/); let popupContainer = lizmapFeaturesTable.locator('div.lizmap-features-table-item-popup'); await expect(popupContainer).toBeVisible(); - await expect(popupContainer.locator('table.lizmapPopupTable tbody tr:first-child td')).toHaveText('10'); + await expect(popupContainer.locator('table.lizmapPopupTable tbody tr:first-child td')).toHaveText('17'); // Next item let nextItemButton = lizmapFeaturesTable.locator('div.lizmap-features-table-toolbar button.next-popup'); nextItemButton.click(); await expect(popupContainer).toBeVisible(); - await expect(popupContainer.locator('table.lizmapPopupTable tbody tr:first-child td')).toHaveText('8'); + await expect(popupContainer.locator('table.lizmapPopupTable tbody tr:first-child td')).toHaveText('9'); // Close Item let closeItemButton = lizmapFeaturesTable.locator('div.lizmap-features-table-toolbar button.close-popup');