@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.
@@ -1,8 +1,55 @@
1
1
  import { type Page } from "@playwright/test";
2
- import { PlaywrightPageObject } from "./PlaywrightPageObject";
3
- export declare class PwTableHeaderCell extends PlaywrightPageObject {
4
- private readonly cssSelector;
5
- constructor(page: Page, cssSelector: string);
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 { PwTable } from "./PwTable";
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";
@@ -0,0 +1,3 @@
1
+ export declare const cssAttributeValue: (value: string) => string;
2
+ export declare const byDataIcon: (iconName: string) => string;
3
+ export declare const byId: (id: string) => string;