@fkui/vue-labs 6.34.0 → 6.35.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/dist/cjs/cypress.cjs.js +8 -5
- package/dist/cjs/cypress.cjs.js.map +1 -1
- package/dist/cjs/index.cjs.js +683 -420
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/esm/cypress.esm.js +8 -5
- package/dist/esm/cypress.esm.js.map +1 -1
- package/dist/esm/index.esm.js +686 -423
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/types/index.d.ts +36 -4
- package/package.json +6 -6
package/dist/cjs/cypress.cjs.js
CHANGED
|
@@ -27,6 +27,8 @@ module.exports = __toCommonJS(index_exports);
|
|
|
27
27
|
|
|
28
28
|
// src/cypress/XDummy.pageobject.ts
|
|
29
29
|
var XDummyPageObject = class {
|
|
30
|
+
selector;
|
|
31
|
+
el;
|
|
30
32
|
/**
|
|
31
33
|
* @param selector - the root of the dummy, usually `<dummy class="dummy">...</dummy>`.
|
|
32
34
|
*/
|
|
@@ -44,15 +46,16 @@ var XDummyPageObject = class {
|
|
|
44
46
|
|
|
45
47
|
// src/cypress/FTable.pageobject.ts
|
|
46
48
|
var FTablePageObject = class {
|
|
49
|
+
selector;
|
|
50
|
+
selectHeader = ".table-ng__column--selectable";
|
|
51
|
+
columnTitle = ".table-ng__column__title";
|
|
52
|
+
columnDescription = ".table-ng__column__description";
|
|
53
|
+
expandCell = ".table-ng__cell--expand";
|
|
54
|
+
selectCell = ".table-ng__cell--selectable";
|
|
47
55
|
/**
|
|
48
56
|
* @param selector - root element selector for `FTable`, usually `.table-ng`.
|
|
49
57
|
*/
|
|
50
58
|
constructor(selector = ".table-ng") {
|
|
51
|
-
this.selectHeader = ".table-ng__column--selectable";
|
|
52
|
-
this.columnTitle = ".table-ng__column__title";
|
|
53
|
-
this.columnDescription = ".table-ng__column__description";
|
|
54
|
-
this.expandCell = ".table-ng__cell--expand";
|
|
55
|
-
this.selectCell = ".table-ng__cell--selectable";
|
|
56
59
|
this.selector = selector;
|
|
57
60
|
}
|
|
58
61
|
/**
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/cypress/index.ts", "../../src/cypress/XDummy.pageobject.ts", "../../src/cypress/FTable.pageobject.ts"],
|
|
4
4
|
"sourcesContent": ["export { XDummyPageObject } from \"./XDummy.pageobject\";\nexport { FTablePageObject } from \"./FTable.pageobject\";\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n */\nexport class XDummyPageObject implements BasePageObject {\n public selector: string;\n public el: () => DefaultCypressChainable;\n\n /**\n * @param selector - the root of the dummy, usually `<dummy class=\"dummy\">...</dummy>`.\n */\n public constructor(selector: string) {\n this.selector = selector;\n this.el = () => cy.get(this.selector);\n }\n\n /**\n * Heading\n */\n public heading(): DefaultCypressChainable {\n return cy.get(`${this.selector} h1`);\n }\n}\n", "import { type BasePageObject, type DefaultCypressChainable } from \"./common\";\n\n/**\n * @public\n * @since v6.24.0\n */\nexport class FTablePageObject implements BasePageObject {\n public selector: string;\n\n private readonly selectHeader = \".table-ng__column--selectable\";\n private readonly columnTitle = \".table-ng__column__title\";\n private readonly columnDescription = \".table-ng__column__description\";\n private readonly expandCell = \".table-ng__cell--expand\";\n private readonly selectCell = \".table-ng__cell--selectable\";\n\n /**\n * @param selector - root element selector for `FTable`, usually `.table-ng`.\n */\n public constructor(selector: string = \".table-ng\") {\n this.selector = selector;\n }\n\n /**\n * Get root element.\n *\n * @public\n */\n public el(): DefaultCypressChainable {\n return cy.get(this.selector);\n }\n\n /**\n * Get table header cell (`<th>` in `<thead>`).\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns The header cell element (`<th>`).\n */\n public header(\n col: number,\n ): Cypress.Chainable<JQuery<HTMLTableCellElement>> {\n const colIndex = String(col - 1);\n return cy.get([this.thead, `th:nth(${colIndex})`].join(\" \"));\n }\n\n /**\n * Get column title from table header.\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns Column description in header.\n */\n public headerTitle(col: number): DefaultCypressChainable {\n const colIndex = String(col - 1);\n return cy.get(\n [this.thead, `th:nth(${colIndex})`, this.columnTitle].join(\" \"),\n );\n }\n\n /**\n * Get column description from table header.\n *\n * The headers for expandable buttons and selectable checkboxes are included.\n *\n * @public\n * @param col - Column number of header (1-indexed).\n * @returns Column description in header.\n */\n public headerDescription(col: number): DefaultCypressChainable {\n const colIndex = String(col - 1);\n return cy.get(\n [this.thead, `th:nth(${colIndex})`, this.columnDescription].join(\n \" \",\n ),\n );\n }\n\n /**\n * Get table cell (typically `<td>` but can be `<th>` if row headers are\n * present).\n *\n * Both row and column are 1-indexed, i.e. 1:1 selects the first cell in the\n * first row.\n *\n * The columns for expandable buttons and selectable checkboxes are included in column count.\n *\n * For expandable rows the row count depend on whenever a row is expanded or\n * not. If the first row is collapsed the second row refers to the next\n * parent row while if the first row is expanded the second row refers to\n * the first expanded row under the first row.\n *\n * @public\n * @param descriptor - Row and column number of cell (1-indexed).\n * @returns The cell element.\n */\n public cell(descriptor: {\n row: number;\n col: number;\n }): Cypress.Chainable<JQuery<HTMLTableCellElement>> {\n const row = this.bodyRow(descriptor.row);\n const nth = `nth-child(${descriptor.col})`;\n return cy.get([row, `> td:${nth},`, row, `> th:${nth}`].join(\" \"));\n }\n\n /**\n * Get expand button of given row.\n *\n * Only applicable if using an expandable table.\n *\n * @public\n * @param row - Row number for the expand button (1-indexed).\n * @returns Expand button of given row.\n */\n public expandButton(\n row: number,\n ): Cypress.Chainable<JQuery<HTMLButtonElement>> {\n return cy.get([this.bodyRow(row), this.expandCell, `button`].join(\" \"));\n }\n\n /**\n * Get checkbox in the table header for selectable column.\n *\n * Only applicable if using a multiselect table.\n *\n * @public\n * @returns Checkbox in selectable column header.\n */\n public selectHeaderInput(): Cypress.Chainable<JQuery<HTMLInputElement>> {\n return cy.get([this.thead, this.selectHeader, `input`].join(\" \"));\n }\n\n /**\n * Get select input of given row.\n *\n * Only applicable if using a selectable table.\n * Input is a checkbox if using a multiselect table and radio if single.\n *\n * @param row - Row number for the select input (1-indexed).\n * @returns Select input of given row.\n */\n public selectInput(\n row: number,\n ): Cypress.Chainable<JQuery<HTMLInputElement>> {\n return cy.get([this.bodyRow(row), this.selectCell, `input`].join(\" \"));\n }\n\n /**\n * Get the currently open context menu.\n *\n * The context menu must have been opened for this to return an element.\n *\n * @internal\n * @returns The opened context menu element.\n */\n public contextmenu(): Cypress.Chainable<JQuery<HTMLDivElement>> {\n /* this element is teleported, so we cannot scope it to the table selector */\n return cy.get(`ul.contextmenu__list`);\n }\n\n /**\n * Get the menu items of the currently open context menu.\n *\n * The context menu must have been opened for this to return an element.\n *\n * @public\n * @returns The context menu items.\n */\n public contextmenuItems(): Cypress.Chainable<JQuery<HTMLButtonElement>> {\n /* this element is teleported, so we cannot scope it to the table selector */\n return cy.get(`ul.contextmenu__list .contextmenu__list__item`);\n }\n\n /**\n * Get the dropdown from a select cell.\n *\n * Only applicable if using a select cell.\n *\n * Element is teleported and does not use given selector. Method may\n * not work properly if there are several dropdowns open simultaneously.\n *\n * @internal\n * @returns Dropdown for a select cell.\n */\n public selectDropdown(): DefaultCypressChainable {\n return cy.get(\".combobox__listbox\");\n }\n\n /**\n * Get an option in a select cell dropdown.\n *\n * Only applicable if using a select cell.\n *\n * Element is teleported and does not use given selector. Method may\n * not work properly if there are several dropdowns open simultaneously.\n *\n * @public\n * @param option - option number (1-indexed).\n * @returns Option of given number from a select cell dropdown.\n */\n public selectDropdownOption(option: number): DefaultCypressChainable {\n const index = option - 1;\n return cy.get(\n `.combobox__listbox li.combobox__listbox__option:nth(${index})`,\n );\n }\n\n /**\n * Get table caption.\n *\n * Only applicable if caption slot is used.\n *\n * @public\n * @returns The table caption.\n */\n public caption(): Cypress.Chainable<JQuery<HTMLTableSectionElement>> {\n return cy.get(`${this.selector} caption`);\n }\n\n /**\n * Get table footer.\n *\n * Only applicable if footer slot is used.\n *\n * @public\n * @returns The table footer.\n */\n public footer(): Cypress.Chainable<JQuery<HTMLTableSectionElement>> {\n return cy.get(this.tfoot);\n }\n\n /**\n * Get current tabbable element in the table.\n *\n * If table is untouched, it is the first cell in the table body (including columns for expandable and selectable).\n * If the cell has an interactable element, it is instead the interactable that is returned and not the cell.\n *\n * @internal\n * @returns The current tabbable element.\n */\n public tabbableElement(): DefaultCypressChainable {\n return cy.get(`${this.selector} [tabindex=0]`);\n }\n\n /**\n * Get all visible rows (`<tr>` in `<tbody>`).\n *\n * Includes expanded rows if table is expandable.\n *\n * @public\n * @returns All visible rows in the table.\n */\n public rows(): Cypress.Chainable<JQuery<HTMLTableRowElement>> {\n return cy.get(`${this.tbody} tr`);\n }\n\n /** @internal */\n private bodyRow(row: number): string {\n const rowIndex = String(row - 1);\n return `${this.tbody} tr:nth(${rowIndex})`;\n }\n\n /** @internal */\n private get thead(): string {\n return `${this.selector} thead`;\n }\n\n /** @internal */\n private get tbody(): string {\n return `${this.selector} tbody`;\n }\n\n /** @internal */\n private get tfoot(): string {\n return `${this.selector} tfoot`;\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,mBAAN,MAAiD;AAAA;AAAA;AAAA;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACKO,IAAM,mBAAN,MAAiD;AAAA,EAC7C;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAKA,YAAY,UAAkB;AACjC,SAAK,WAAW;AAChB,SAAK,KAAK,MAAM,GAAG,IAAI,KAAK,QAAQ;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA,EAKO,UAAmC;AACtC,WAAO,GAAG,IAAI,GAAG,KAAK,QAAQ,KAAK;A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