Skip to content

Commit

Permalink
FIX: playwrght test about sorting order
Browse files Browse the repository at this point in the history
  • Loading branch information
neo-garaix authored and github-actions[bot] committed Oct 30, 2024
1 parent e343e21 commit 142c62a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/end2end/playwright/lizmap-features-table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@ 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();
await expect(lizmapFeaturesTable.locator('div.lizmap-features-table')).toHaveClass(/popup-displayed/);
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');
Expand Down

0 comments on commit 142c62a

Please sign in to comment.