@fkui/vue 6.32.1 → 6.34.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 +138 -14
- package/dist/cjs/cypress.cjs.js.map +3 -3
- package/dist/cjs/index.cjs.js +164 -141
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/selectors.cjs.js +150 -0
- package/dist/cjs/selectors.cjs.js.map +7 -0
- package/dist/esm/cypress.esm.js +138 -14
- package/dist/esm/cypress.esm.js.map +3 -3
- package/dist/esm/index.esm.js +166 -143
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/selectors.esm.js +127 -0
- package/dist/esm/selectors.esm.js.map +7 -0
- package/dist/types/cypress.d.ts +3 -2
- package/dist/types/index.d.ts +85 -5
- package/dist/types/selectors.d.ts +110 -0
- package/package.json +12 -6
package/dist/cjs/cypress.cjs.js
CHANGED
|
@@ -2086,14 +2086,141 @@ var FDialogueTreePageObject = class {
|
|
|
2086
2086
|
}
|
|
2087
2087
|
};
|
|
2088
2088
|
|
|
2089
|
+
// src/selectors/FPaginator.selectors.ts
|
|
2090
|
+
function FPaginatorSelectors(selector = ".paginator") {
|
|
2091
|
+
return Object.freeze({
|
|
2092
|
+
/**
|
|
2093
|
+
* The base selector for the component.
|
|
2094
|
+
*
|
|
2095
|
+
* This is the same selector that the consumer provided.
|
|
2096
|
+
*
|
|
2097
|
+
* @public
|
|
2098
|
+
* @since v6.34.0
|
|
2099
|
+
* @returns The root selector for the component.
|
|
2100
|
+
*/
|
|
2101
|
+
get selector() {
|
|
2102
|
+
return selector;
|
|
2103
|
+
},
|
|
2104
|
+
/**
|
|
2105
|
+
* Get the button for the current page.
|
|
2106
|
+
*
|
|
2107
|
+
* @public
|
|
2108
|
+
* @since v6.34.0
|
|
2109
|
+
* @returns A selector for the currently active page button.
|
|
2110
|
+
*/
|
|
2111
|
+
currentPageButton() {
|
|
2112
|
+
return `${selector} .paginator__page--active`;
|
|
2113
|
+
},
|
|
2114
|
+
/**
|
|
2115
|
+
* Get the button for the first page.
|
|
2116
|
+
*
|
|
2117
|
+
* @public
|
|
2118
|
+
* @since v6.34.0
|
|
2119
|
+
* @returns A selector for the button that navigates to the first
|
|
2120
|
+
* page.
|
|
2121
|
+
*/
|
|
2122
|
+
firstPageButton() {
|
|
2123
|
+
return `${selector} [data-page~="first"]`;
|
|
2124
|
+
},
|
|
2125
|
+
/**
|
|
2126
|
+
* Get the button for the last page.
|
|
2127
|
+
*
|
|
2128
|
+
* @public
|
|
2129
|
+
* @since v6.34.0
|
|
2130
|
+
* @returns A selector for the button that navigates to the last
|
|
2131
|
+
* page.
|
|
2132
|
+
*/
|
|
2133
|
+
lastPageButton() {
|
|
2134
|
+
return `${selector} [data-page~="last"]`;
|
|
2135
|
+
},
|
|
2136
|
+
/**
|
|
2137
|
+
* Get the button for navigating to the next page.
|
|
2138
|
+
*
|
|
2139
|
+
* @public
|
|
2140
|
+
* @since v6.34.0
|
|
2141
|
+
* @returns A selector for the button that navigates to the next
|
|
2142
|
+
* page.
|
|
2143
|
+
*/
|
|
2144
|
+
nextPageButton() {
|
|
2145
|
+
return `${selector} .paginator__next`;
|
|
2146
|
+
},
|
|
2147
|
+
/**
|
|
2148
|
+
* Get the button for a specific page by displayed text.
|
|
2149
|
+
*
|
|
2150
|
+
* This returns the button that displays the given text.
|
|
2151
|
+
*
|
|
2152
|
+
* @public
|
|
2153
|
+
* @since v6.34.0
|
|
2154
|
+
* @param text - The text displayed on the requested button. If a
|
|
2155
|
+
* numeric value is provided, it is converted to a string.
|
|
2156
|
+
* @returns A selector for the specified page button.
|
|
2157
|
+
*/
|
|
2158
|
+
pageButtonByText(text) {
|
|
2159
|
+
return `${selector} > [data-page~="${text}"]`;
|
|
2160
|
+
},
|
|
2161
|
+
/**
|
|
2162
|
+
* Get the button for a specific page by index.
|
|
2163
|
+
*
|
|
2164
|
+
* The index starts at zero for the first button. A negative index
|
|
2165
|
+
* selects buttons from the end, e.g. `-1` selects the last button.
|
|
2166
|
+
*
|
|
2167
|
+
* @public
|
|
2168
|
+
* @since v6.34.0
|
|
2169
|
+
* @param index - The zero-based page index, or a negative index to
|
|
2170
|
+
* select from the end (e.g. `-1` selects the last button).
|
|
2171
|
+
* @returns A selector for the specified page button.
|
|
2172
|
+
*/
|
|
2173
|
+
pageButtonByIndex(index) {
|
|
2174
|
+
return `${selector} > [data-index~="${index}"]`;
|
|
2175
|
+
},
|
|
2176
|
+
/**
|
|
2177
|
+
* Get the buttons for all pages shown.
|
|
2178
|
+
*
|
|
2179
|
+
* @public
|
|
2180
|
+
* @since v6.34.0
|
|
2181
|
+
* @returns A selector for all displayed page buttons.
|
|
2182
|
+
*/
|
|
2183
|
+
pageButtons() {
|
|
2184
|
+
return `${selector} .paginator__page`;
|
|
2185
|
+
},
|
|
2186
|
+
/**
|
|
2187
|
+
* Get the page counter element.
|
|
2188
|
+
*
|
|
2189
|
+
* The counter replaces the page buttons in compact mode on mobile
|
|
2190
|
+
* devices.
|
|
2191
|
+
*
|
|
2192
|
+
* @public
|
|
2193
|
+
* @since v6.34.0
|
|
2194
|
+
* @returns A selector for the page counter element.
|
|
2195
|
+
*/
|
|
2196
|
+
pageCounter() {
|
|
2197
|
+
return `${selector} .paginator__page-counter`;
|
|
2198
|
+
},
|
|
2199
|
+
/**
|
|
2200
|
+
* Get the button for navigating to the previous page.
|
|
2201
|
+
*
|
|
2202
|
+
* @public
|
|
2203
|
+
* @since v6.34.0
|
|
2204
|
+
* @returns A selector for the button that navigates to the previous
|
|
2205
|
+
* page.
|
|
2206
|
+
*/
|
|
2207
|
+
previousPageButton() {
|
|
2208
|
+
return `${selector} .paginator__previous`;
|
|
2209
|
+
}
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2089
2213
|
// src/cypress/FPaginator.pageobject.ts
|
|
2090
2214
|
var FPaginatorPageObject = class {
|
|
2091
|
-
|
|
2215
|
+
_selectors;
|
|
2092
2216
|
/**
|
|
2093
2217
|
* @param selector - The root of the FPaginator component
|
|
2094
2218
|
*/
|
|
2095
|
-
constructor(selector) {
|
|
2096
|
-
this.
|
|
2219
|
+
constructor(selector = ".paginator") {
|
|
2220
|
+
this._selectors = FPaginatorSelectors(selector);
|
|
2221
|
+
}
|
|
2222
|
+
get selector() {
|
|
2223
|
+
return this._selectors.selector;
|
|
2097
2224
|
}
|
|
2098
2225
|
/**
|
|
2099
2226
|
* Get the root element.
|
|
@@ -2101,7 +2228,7 @@ var FPaginatorPageObject = class {
|
|
|
2101
2228
|
* @returns The element itself.
|
|
2102
2229
|
*/
|
|
2103
2230
|
el() {
|
|
2104
|
-
return cy.get(this.selector);
|
|
2231
|
+
return cy.get(this._selectors.selector);
|
|
2105
2232
|
}
|
|
2106
2233
|
/**
|
|
2107
2234
|
* Get the button for the current page.
|
|
@@ -2109,7 +2236,7 @@ var FPaginatorPageObject = class {
|
|
|
2109
2236
|
* @returns The button for the current page.
|
|
2110
2237
|
*/
|
|
2111
2238
|
currentPageButton() {
|
|
2112
|
-
return cy.get(
|
|
2239
|
+
return cy.get(this._selectors.currentPageButton());
|
|
2113
2240
|
}
|
|
2114
2241
|
/**
|
|
2115
2242
|
* Get the button for navigating to the next page.
|
|
@@ -2117,7 +2244,7 @@ var FPaginatorPageObject = class {
|
|
|
2117
2244
|
* @returns The button for navigating to the next page.
|
|
2118
2245
|
*/
|
|
2119
2246
|
nextButton() {
|
|
2120
|
-
return cy.get(
|
|
2247
|
+
return cy.get(this._selectors.nextPageButton());
|
|
2121
2248
|
}
|
|
2122
2249
|
/**
|
|
2123
2250
|
* Gets the button/buttons for the specified page/pages.
|
|
@@ -2126,14 +2253,13 @@ var FPaginatorPageObject = class {
|
|
|
2126
2253
|
* @returns The button for the specified page (if param `page` is defined); the buttons for all pages shown (if param `page` is undefined).
|
|
2127
2254
|
*/
|
|
2128
2255
|
pageButton(page) {
|
|
2129
|
-
const pageButtons = cy.get(`${this.selector} .paginator__page`);
|
|
2130
2256
|
switch (typeof page) {
|
|
2131
2257
|
case "number":
|
|
2132
|
-
return
|
|
2258
|
+
return cy.get(this._selectors.pageButtonByIndex(page));
|
|
2133
2259
|
case "string":
|
|
2134
|
-
return
|
|
2260
|
+
return cy.get(this._selectors.pageButtonByText(page));
|
|
2135
2261
|
default:
|
|
2136
|
-
return pageButtons;
|
|
2262
|
+
return cy.get(this._selectors.pageButtons());
|
|
2137
2263
|
}
|
|
2138
2264
|
}
|
|
2139
2265
|
/**
|
|
@@ -2143,9 +2269,7 @@ var FPaginatorPageObject = class {
|
|
|
2143
2269
|
* @returns The page counter.
|
|
2144
2270
|
*/
|
|
2145
2271
|
pageCounter() {
|
|
2146
|
-
return cy.get(
|
|
2147
|
-
`${this.selector} .paginator__page-counter [aria-hidden]`
|
|
2148
|
-
);
|
|
2272
|
+
return cy.get(`${this._selectors.pageCounter()} [aria-hidden]`);
|
|
2149
2273
|
}
|
|
2150
2274
|
/**
|
|
2151
2275
|
* Get the button for navigating to the previous page.
|
|
@@ -2153,7 +2277,7 @@ var FPaginatorPageObject = class {
|
|
|
2153
2277
|
* @returns The button for navigating to the previous page.
|
|
2154
2278
|
*/
|
|
2155
2279
|
previousButton() {
|
|
2156
|
-
return cy.get(
|
|
2280
|
+
return cy.get(this._selectors.previousPageButton());
|
|
2157
2281
|
}
|
|
2158
2282
|
};
|
|
2159
2283
|
//# sourceMappingURL=cypress.cjs.js.map
|