-
-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
take into account group opacity for printing
- Loading branch information
1 parent
cbac3e1
commit 4e874cc
Showing
8 changed files
with
2,807 additions
and
3 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
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,83 @@ | ||
// @ts-check | ||
import { expect } from '@playwright/test'; | ||
import { ProjectPage } from './project'; | ||
|
||
/** | ||
* Playwright Page | ||
* @typedef {import('@playwright/test').Page} Page | ||
*/ | ||
|
||
/** | ||
* Playwright Page | ||
* @typedef {import('@playwright/test').Locator} Locator | ||
*/ | ||
|
||
export class PrintPage extends ProjectPage { | ||
// Metadata | ||
/** | ||
* The print panel | ||
* @type {Locator} | ||
*/ | ||
printPanel; | ||
|
||
/** | ||
* The print button on menu | ||
* @type {Locator} | ||
*/ | ||
printSwitcherButton; | ||
|
||
/** | ||
* The print scale combobox | ||
* @type {Locator} | ||
*/ | ||
printScale; | ||
|
||
/** | ||
* The launch print button on print panel | ||
* @type {Locator} | ||
*/ | ||
launchPrintButton; | ||
|
||
/** | ||
* Constructor for a QGIS project page | ||
* @param {Page} page The playwright page | ||
* @param {string} project The project name | ||
* @param {string} repository The repository name, default to testsrepository | ||
*/ | ||
constructor(page, project, repository = 'testsrepository') { | ||
super(page, project, repository); | ||
|
||
this.printPanel = page.locator('#print'); | ||
this.printSwitcherButton = page.locator('#button-print'); | ||
this.launchPrintButton = page.locator('#print-launch'); | ||
this.printScaleCombobox = page.locator('#print-scale'); | ||
} | ||
|
||
/** | ||
* openPrintPanel function | ||
* opens the print mini-dock panel | ||
*/ | ||
async openPrintPanel() { | ||
await this.page.locator('#button-print').click(); | ||
} | ||
|
||
/** | ||
* setPrintScale function | ||
* Set the print scale | ||
* @param {string} scale The scale | ||
*/ | ||
async setPrintScale(scale) { | ||
await this.printScaleCombobox.selectOption(scale); | ||
} | ||
|
||
/** | ||
* launchPrint function | ||
* Launch print | ||
*/ | ||
async launchPrint() { | ||
// Launch print | ||
await this.launchPrintButton.click(); | ||
// check message | ||
await expect(this.page.locator('div.alert')).toHaveCount(1); | ||
} | ||
} |
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
Oops, something went wrong.