-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4183 from rldhont/fix-display-in-legend-printing
[Bugfix] JS: for layer not displayd in legend the visibility is equal to checked
- Loading branch information
Showing
7 changed files
with
4,826 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// @ts-check | ||
const { test, expect } = require('@playwright/test'); | ||
|
||
test.describe('Display in layer tree', () => { | ||
|
||
test.beforeEach(async ({ page }) => { | ||
const url = '/index.php/view/map?repository=testsrepository&project=display_in_legend'; | ||
await page.goto(url, { waitUntil: 'networkidle' }); | ||
}); | ||
|
||
test('display in layer tree unchecked => layer not visible in layer tree and layer in print request', async ({ page }) => { | ||
// layer not visible in layer tree | ||
await expect(page.getByTestId('polygons')).toHaveCount(0); | ||
|
||
// layer in print request | ||
const getPrintRequest = request => { | ||
const postData = request.postData(); | ||
expect(postData).toContain('SERVICE=WMS') | ||
expect(postData).toContain('REQUEST=GetPrint') | ||
expect(postData).toContain('map0%3ALAYERS=project-background-color%2Cpolygons') | ||
}; | ||
|
||
await page.locator('#button-print').click(); | ||
|
||
page.once('request', getPrintRequest); | ||
await page.locator('#print-launch').click(); | ||
|
||
await page.getByTestId('Shapefiles').locator('input').first().uncheck(); | ||
page.once('request', getPrintRequest); | ||
await page.locator('#print-launch').click(); | ||
|
||
await page.getByTestId('townhalls_EPSG2154').locator('input').first().check(); | ||
page.once('request', getPrintRequest); | ||
await page.locator('#print-launch').click(); | ||
|
||
await page.getByTestId('Shapefiles').locator('input').first().uncheck(); | ||
page.once('request', getPrintRequest); | ||
await page.locator('#print-launch').click(); | ||
}); | ||
}) |
Oops, something went wrong.
986838d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest weekly run of end2end "playwright" tests failed with this latest commit on the branch release_3_6 😣
CC @nboisteault and @Gustry, please have a look to the logs. Maybe it's a false positive ?
Visit https://github.com/3liz/lizmap-web-client/actions/runs/7866868314