@vuu-ui/vuu-playwright-helpers 4.0.0-beta.6 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -2
- package/package.json +2 -2
- package/src/PwChart.js +77 -0
- package/src/PwChartDataPoint.js +61 -0
- package/src/PwColumnPicker.js +44 -0
- package/src/PwComponent.js +29 -0
- package/src/PwContextMenu.js +53 -0
- package/src/PwMenuItem.js +58 -0
- package/src/PwTable.js +105 -34
- package/src/PwTableFooter.js +16 -0
- package/src/PwTableHeaderCell.js +15 -7
- package/src/index.js +7 -0
- package/src/selector-utils.js +7 -0
- package/types/PwChart.d.ts +124 -0
- package/types/PwChartDataPoint.d.ts +116 -0
- package/types/PwColumnPicker.d.ts +116 -0
- package/types/PwComponent.d.ts +88 -0
- package/types/PwContextMenu.d.ts +173 -0
- package/types/PwMenuItem.d.ts +196 -0
- package/types/PwTable.d.ts +374 -15
- package/types/PwTableFooter.d.ts +40 -0
- package/types/PwTableHeaderCell.d.ts +51 -4
- package/types/index.d.ts +8 -1
- package/types/selector-utils.d.ts +3 -0
|
@@ -1,8 +1,55 @@
|
|
|
1
1
|
import { type Page } from "@playwright/test";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { PwComponent, type PwComponentTarget } from "./PwComponent";
|
|
3
|
+
import { PwContextMenu } from "./PwContextMenu";
|
|
4
|
+
/**
|
|
5
|
+
* A Table column header cell. Usually obtained from PwTable.headerCell.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* test("currency header", async ({ page }) => {
|
|
9
|
+
* const header = new PwTable(page).headerCell("currency");
|
|
10
|
+
* await expect(header.locator).toHaveText("Currency");
|
|
11
|
+
* });
|
|
12
|
+
*/
|
|
13
|
+
export declare class PwTableHeaderCell extends PwComponent {
|
|
14
|
+
protected readonly defaultCssSelector = ".vuuTableHeaderCell";
|
|
15
|
+
/**
|
|
16
|
+
* @param page the Playwright page
|
|
17
|
+
* @param target css selector or Locator for the header cell
|
|
18
|
+
*/
|
|
19
|
+
constructor(page: Page, target: PwComponentTarget);
|
|
20
|
+
/**
|
|
21
|
+
* Does the header cell have the selected class. Does not wait or retry,
|
|
22
|
+
* use assertSelected after an action that selects the column.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* test("no column initially selected", async ({ page }) => {
|
|
26
|
+
* const table = new PwTable(page);
|
|
27
|
+
* expect(await table.headerCell("currency").isSelected).toBe(false);
|
|
28
|
+
* });
|
|
29
|
+
*/
|
|
6
30
|
get isSelected(): Promise<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* Assert the header cell is selected, retrying until the expect timeout.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* test("column is selected", async ({ page }) => {
|
|
36
|
+
* const table = new PwTable(page);
|
|
37
|
+
* // ...select the currency column
|
|
38
|
+
* await table.headerCell("currency").assertSelected();
|
|
39
|
+
* });
|
|
40
|
+
*/
|
|
7
41
|
assertSelected(): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Click the column menu button in the header cell. Resolves with the column
|
|
44
|
+
* menu once it is visible.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* test("remove column from column menu", async ({ page }) => {
|
|
48
|
+
* const table = new PwTable(page);
|
|
49
|
+
* const menu = await table.headerCell("exchange").showColumnMenu();
|
|
50
|
+
* await menu.menuItem("Remove exchange column").click();
|
|
51
|
+
* await table.assertColumns(["bbg", "currency"]);
|
|
52
|
+
* });
|
|
53
|
+
*/
|
|
54
|
+
showColumnMenu(): Promise<PwContextMenu>;
|
|
8
55
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
export { PlaywrightPageObject } from "./PlaywrightPageObject";
|
|
2
|
-
export {
|
|
2
|
+
export { PwChart } from "./PwChart";
|
|
3
|
+
export { type ChartDataPointInfo, PwChartDataPoint } from "./PwChartDataPoint";
|
|
4
|
+
export { PwColumnPicker } from "./PwColumnPicker";
|
|
5
|
+
export { PwComponent, type PwComponentTarget } from "./PwComponent";
|
|
6
|
+
export { PwContextMenu } from "./PwContextMenu";
|
|
7
|
+
export { PwMenuItem } from "./PwMenuItem";
|
|
8
|
+
export { PwTable, type ScrollDistance, type ScrollPosition, type VerticalScrollDistance, } from "./PwTable";
|
|
9
|
+
export { PwTableFooter } from "./PwTableFooter";
|
|
3
10
|
export { PwTableHeaderCell } from "./PwTableHeaderCell";
|