@baloise/ds-testing 17.4.1 → 18.0.0-nightly.20250212
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/add-custom-commands.esm.js +1 -1
- package/add-override-commands.esm.js +541 -3
- package/bal-input-stepper.command.esm.js +165 -165
- package/helpers.esm.js +43 -42
- package/index.esm.js +2 -800
- package/package.json +3 -4
- package/selectors.esm.js +1 -1
- package/selectors.esm2.js +179 -0
- package/src/add-custom-commands.d.ts +34 -34
- package/src/add-override-commands.d.ts +9 -9
- package/src/commands/custom/bal-accordion.command.d.ts +1 -1
- package/src/commands/custom/bal-accordion.types.d.ts +15 -15
- package/src/commands/custom/bal-field.command.d.ts +1 -1
- package/src/commands/custom/bal-field.types.d.ts +11 -11
- package/src/commands/custom/bal-hint.command.d.ts +1 -1
- package/src/commands/custom/bal-hint.types.d.ts +15 -15
- package/src/commands/custom/bal-input-stepper.command.d.ts +1 -1
- package/src/commands/custom/bal-input-stepper.types.d.ts +15 -15
- package/src/commands/custom/bal-modal.command.d.ts +1 -1
- package/src/commands/custom/bal-modal.types.d.ts +24 -24
- package/src/commands/custom/bal-pagination.command.d.ts +1 -1
- package/src/commands/custom/bal-pagination.types.d.ts +23 -23
- package/src/commands/custom/bal-popover.command.d.ts +1 -1
- package/src/commands/custom/bal-popover.types.d.ts +27 -27
- package/src/commands/custom/bal-popup.command.d.ts +1 -1
- package/src/commands/custom/bal-popup.types.d.ts +15 -15
- package/src/commands/custom/bal-select.command.d.ts +1 -1
- package/src/commands/custom/bal-select.types.d.ts +19 -19
- package/src/commands/custom/bal-snackbar.command.d.ts +1 -1
- package/src/commands/custom/bal-snackbar.types.d.ts +11 -11
- package/src/commands/custom/bal-steps.command.d.ts +1 -1
- package/src/commands/custom/bal-steps.types.d.ts +27 -27
- package/src/commands/custom/bal-tabs.command.d.ts +1 -1
- package/src/commands/custom/bal-tabs.types.d.ts +31 -31
- package/src/commands/custom/bal-toast.command.d.ts +1 -1
- package/src/commands/custom/bal-toast.types.d.ts +11 -11
- package/src/commands/custom/component.command.d.ts +1 -1
- package/src/commands/custom/component.types.d.ts +47 -47
- package/src/commands/custom/get.command.d.ts +1 -1
- package/src/commands/custom/get.types.d.ts +43 -43
- package/src/commands/custom/platform.command.d.ts +1 -1
- package/src/commands/custom/platform.types.d.ts +11 -11
- package/src/commands/custom/visit.command.d.ts +1 -1
- package/src/commands/custom/visit.types.d.ts +10 -10
- package/src/commands/helpers.d.ts +48 -48
- package/src/commands/overrides/blur.command.d.ts +1 -1
- package/src/commands/overrides/check.command.d.ts +1 -1
- package/src/commands/overrides/clear.command.d.ts +1 -1
- package/src/commands/overrides/click.command.d.ts +1 -1
- package/src/commands/overrides/focus.command.d.ts +1 -1
- package/src/commands/overrides/select.command.d.ts +1 -1
- package/src/commands/overrides/should.command.d.ts +1 -1
- package/src/commands/overrides/type.command.d.ts +1 -1
- package/src/commands/overrides/uncheck.command.d.ts +1 -1
- package/src/index.d.ts +21 -25
- package/src/selectors/index.d.ts +354 -354
- package/src/selectors/selectors.util.d.ts +4 -4
- package/src/selectors.d.ts +1 -1
- package/src/viewports.d.ts +7 -7
- package/index.esm2.js +0 -317
- package/src/legacy/accessors/accordion.accessor.d.ts +0 -29
- package/src/legacy/accessors/button.accessor.d.ts +0 -23
- package/src/legacy/accessors/checkbox.accessor.d.ts +0 -25
- package/src/legacy/accessors/drop-down.accessor.d.ts +0 -31
- package/src/legacy/accessors/error.accessor.d.ts +0 -25
- package/src/legacy/accessors/icon-accessor.d.ts +0 -23
- package/src/legacy/accessors/input.accessor.d.ts +0 -30
- package/src/legacy/accessors/link.accessor.d.ts +0 -39
- package/src/legacy/accessors/list.accessor.d.ts +0 -23
- package/src/legacy/accessors/mixins/andable.d.ts +0 -5
- package/src/legacy/accessors/mixins/attachable.d.ts +0 -6
- package/src/legacy/accessors/mixins/attributable.d.ts +0 -7
- package/src/legacy/accessors/mixins/blurable.d.ts +0 -6
- package/src/legacy/accessors/mixins/checkable.d.ts +0 -7
- package/src/legacy/accessors/mixins/clearable.d.ts +0 -6
- package/src/legacy/accessors/mixins/clickable.d.ts +0 -7
- package/src/legacy/accessors/mixins/containable.d.ts +0 -5
- package/src/legacy/accessors/mixins/disableable.d.ts +0 -5
- package/src/legacy/accessors/mixins/eachable.d.ts +0 -5
- package/src/legacy/accessors/mixins/existable.d.ts +0 -5
- package/src/legacy/accessors/mixins/findable.d.ts +0 -5
- package/src/legacy/accessors/mixins/invokable.d.ts +0 -5
- package/src/legacy/accessors/mixins/lengthable.d.ts +0 -5
- package/src/legacy/accessors/mixins/mixins.d.ts +0 -12
- package/src/legacy/accessors/mixins/nthSelectable.d.ts +0 -7
- package/src/legacy/accessors/mixins/selectable.d.ts +0 -4
- package/src/legacy/accessors/mixins/shouldable.d.ts +0 -5
- package/src/legacy/accessors/mixins/thenable.d.ts +0 -5
- package/src/legacy/accessors/mixins/typeable.d.ts +0 -6
- package/src/legacy/accessors/mixins/urlable.d.ts +0 -6
- package/src/legacy/accessors/mixins/visible.d.ts +0 -5
- package/src/legacy/accessors/mixins/waitable.d.ts +0 -5
- package/src/legacy/accessors/multi-select-button.accessor.d.ts +0 -24
- package/src/legacy/accessors/navigation.accessor.d.ts +0 -22
- package/src/legacy/accessors/radio.accessor.d.ts +0 -23
- package/src/legacy/accessors/select-button.accessor.d.ts +0 -24
- package/src/legacy/accessors/table.accessor.d.ts +0 -27
- package/src/legacy/accessors/tabs.accessor.d.ts +0 -26
- package/src/legacy/accessors/text.accessor.d.ts +0 -23
- package/src/legacy/accessors/tile.accessor.d.ts +0 -27
- package/src/legacy/accessors/toast.accessor.d.ts +0 -24
- package/src/legacy/accessors/tooltip.accessor.d.ts +0 -23
- package/src/legacy/accessors/typeahead.accessor.d.ts +0 -26
- package/src/legacy/index.d.ts +0 -43
- package/type.command.esm.js +0 -541
package/helpers.esm.js
CHANGED
|
@@ -36,6 +36,11 @@ function _extends() {
|
|
|
36
36
|
return _extends.apply(this, arguments);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
function _type_of(obj) {
|
|
40
|
+
"@swc/helpers - typeof";
|
|
41
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
42
|
+
}
|
|
43
|
+
|
|
39
44
|
function __generator(thisArg, body) {
|
|
40
45
|
var _ = {
|
|
41
46
|
label: 0,
|
|
@@ -45,12 +50,8 @@ function __generator(thisArg, body) {
|
|
|
45
50
|
},
|
|
46
51
|
trys: [],
|
|
47
52
|
ops: []
|
|
48
|
-
}, f, y, t, g;
|
|
49
|
-
return g = {
|
|
50
|
-
next: verb(0),
|
|
51
|
-
"throw": verb(1),
|
|
52
|
-
"return": verb(2)
|
|
53
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
53
|
+
}, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
54
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
54
55
|
return this;
|
|
55
56
|
}), g;
|
|
56
57
|
function verb(n) {
|
|
@@ -126,7 +127,7 @@ function __generator(thisArg, body) {
|
|
|
126
127
|
}
|
|
127
128
|
if (op[0] & 5) throw op[1];
|
|
128
129
|
return {
|
|
129
|
-
value: op[0] ? op[1] :
|
|
130
|
+
value: op[0] ? op[1] : undefined,
|
|
130
131
|
done: true
|
|
131
132
|
};
|
|
132
133
|
}
|
|
@@ -141,7 +142,7 @@ var deepReady = /*#__PURE__*/ _async_to_generator(function(el, full) {
|
|
|
141
142
|
return __generator(this, function(_state) {
|
|
142
143
|
switch(_state.label){
|
|
143
144
|
case 0:
|
|
144
|
-
if (full ===
|
|
145
|
+
if (full === undefined) full = false;
|
|
145
146
|
element = el;
|
|
146
147
|
if (!element) return [
|
|
147
148
|
3,
|
|
@@ -181,8 +182,8 @@ var deepReady = /*#__PURE__*/ _async_to_generator(function(el, full) {
|
|
|
181
182
|
});
|
|
182
183
|
});
|
|
183
184
|
var rIC = function(callback, timeout) {
|
|
184
|
-
if (timeout ===
|
|
185
|
-
if (typeof window !==
|
|
185
|
+
if (timeout === undefined) timeout = 5000;
|
|
186
|
+
if (typeof window !== 'undefined' && 'requestIdleCallback' in window) {
|
|
186
187
|
window.requestIdleCallback(callback, {
|
|
187
188
|
timeout: timeout
|
|
188
189
|
});
|
|
@@ -205,16 +206,16 @@ var waitAfterIdleCallback = function(timeout) {
|
|
|
205
206
|
});
|
|
206
207
|
};
|
|
207
208
|
var raf = function(h) {
|
|
208
|
-
if (typeof __zone_symbol__requestAnimationFrame ===
|
|
209
|
+
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
209
210
|
return __zone_symbol__requestAnimationFrame(h);
|
|
210
211
|
}
|
|
211
|
-
if (typeof requestAnimationFrame ===
|
|
212
|
+
if (typeof requestAnimationFrame === 'function') {
|
|
212
213
|
return requestAnimationFrame(h);
|
|
213
214
|
}
|
|
214
215
|
return setTimeout(h);
|
|
215
216
|
};
|
|
216
217
|
var runHighPrioritizedTask = function(callback) {
|
|
217
|
-
if (typeof window !==
|
|
218
|
+
if (typeof window !== 'undefined' && 'MessageChannel' in window) {
|
|
218
219
|
var messageChannel = new window.MessageChannel();
|
|
219
220
|
messageChannel.port1.onmessage = callback;
|
|
220
221
|
messageChannel.port2.postMessage(undefined);
|
|
@@ -223,68 +224,68 @@ var runHighPrioritizedTask = function(callback) {
|
|
|
223
224
|
}
|
|
224
225
|
};
|
|
225
226
|
var isElement = function(el, name) {
|
|
226
|
-
return typeof el === "
|
|
227
|
+
return (typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0 && el[0].nodeName === name;
|
|
227
228
|
};
|
|
228
229
|
var hasClass = function(el, name) {
|
|
229
|
-
return typeof el === "
|
|
230
|
+
return (typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0 && el.hasClass(name);
|
|
230
231
|
};
|
|
231
232
|
var hasTestId = function(el, testId) {
|
|
232
|
-
if (typeof el === "
|
|
233
|
-
var dataTestId = el.data(
|
|
233
|
+
if ((typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0) {
|
|
234
|
+
var dataTestId = el.data('testid');
|
|
234
235
|
return dataTestId === testId;
|
|
235
236
|
}
|
|
236
237
|
return false;
|
|
237
238
|
};
|
|
238
239
|
var isLabel = function(el) {
|
|
239
|
-
return isElement(el,
|
|
240
|
+
return isElement(el, 'LABEL');
|
|
240
241
|
};
|
|
241
242
|
var isAccordion = function(el) {
|
|
242
|
-
return isElement(el,
|
|
243
|
+
return isElement(el, 'BAL-ACCORDION');
|
|
243
244
|
};
|
|
244
245
|
var isButton = function(el) {
|
|
245
|
-
return isElement(el,
|
|
246
|
+
return isElement(el, 'BAL-BUTTON');
|
|
246
247
|
};
|
|
247
248
|
var isCheckbox = function(el) {
|
|
248
|
-
return isElement(el,
|
|
249
|
+
return isElement(el, 'BAL-CHECKBOX');
|
|
249
250
|
};
|
|
250
251
|
var isNumberInput = function(el) {
|
|
251
|
-
return isElement(el,
|
|
252
|
+
return isElement(el, 'BAL-NUMBER-INPUT');
|
|
252
253
|
};
|
|
253
254
|
var isRadio = function(el) {
|
|
254
|
-
return isElement(el,
|
|
255
|
+
return isElement(el, 'BAL-RADIO');
|
|
255
256
|
};
|
|
256
257
|
var isSelect = function(el) {
|
|
257
|
-
return isElement(el,
|
|
258
|
+
return isElement(el, 'BAL-SELECT');
|
|
258
259
|
};
|
|
259
260
|
var isTag = function(el) {
|
|
260
|
-
return isElement(el,
|
|
261
|
+
return isElement(el, 'BAL-TAG');
|
|
261
262
|
};
|
|
262
263
|
var isTabs = function(el) {
|
|
263
|
-
return isElement(el,
|
|
264
|
+
return isElement(el, 'BAL-TABS');
|
|
264
265
|
};
|
|
265
266
|
var isSteps = function(el) {
|
|
266
|
-
return isElement(el,
|
|
267
|
+
return isElement(el, 'BAL-STEPS');
|
|
267
268
|
};
|
|
268
269
|
var isDropDown = function(el) {
|
|
269
|
-
return isElement(el,
|
|
270
|
+
return isElement(el, 'BAL-DROPDOWN');
|
|
270
271
|
};
|
|
271
272
|
var isSlider = function(el) {
|
|
272
|
-
return isElement(el,
|
|
273
|
+
return isElement(el, 'BAL-INPUT-SLIDER');
|
|
273
274
|
};
|
|
274
275
|
var isHint = function(el) {
|
|
275
|
-
return isElement(el,
|
|
276
|
+
return isElement(el, 'BAL-HINT');
|
|
276
277
|
};
|
|
277
278
|
var isTextarea = function(el) {
|
|
278
|
-
return isElement(el,
|
|
279
|
+
return isElement(el, 'BAL-TEXTAREA');
|
|
279
280
|
};
|
|
280
281
|
var isInputStepper = function(el) {
|
|
281
|
-
return isElement(el,
|
|
282
|
+
return isElement(el, 'BAL-INPUT-STEPPER');
|
|
282
283
|
};
|
|
283
284
|
var isInput = function(el) {
|
|
284
|
-
return isElement(el,
|
|
285
|
+
return isElement(el, 'BAL-INPUT');
|
|
285
286
|
};
|
|
286
287
|
var isInputDate = function(el) {
|
|
287
|
-
return isElement(el,
|
|
288
|
+
return isElement(el, 'BAL-INPUT-DATE');
|
|
288
289
|
};
|
|
289
290
|
/**
|
|
290
291
|
* Executes a command on a child element and wraps back to the main element/component
|
|
@@ -303,7 +304,7 @@ var wrapCommand = function(displayName, element, message, fn) {
|
|
|
303
304
|
log: false
|
|
304
305
|
}).then(function($el) {
|
|
305
306
|
Cypress.log({
|
|
306
|
-
type:
|
|
307
|
+
type: 'parent',
|
|
307
308
|
$el: $el,
|
|
308
309
|
displayName: displayName,
|
|
309
310
|
message: message
|
|
@@ -318,10 +319,10 @@ var shouldLog = function(options) {
|
|
|
318
319
|
return options === undefined || options.log !== false;
|
|
319
320
|
};
|
|
320
321
|
var log = function(displayName, message, $el, options) {
|
|
321
|
-
if (message ===
|
|
322
|
+
if (message === undefined) message = '';
|
|
322
323
|
if (shouldLog(options)) {
|
|
323
324
|
Cypress.log({
|
|
324
|
-
type:
|
|
325
|
+
type: 'parent',
|
|
325
326
|
$el: $el,
|
|
326
327
|
displayName: displayName,
|
|
327
328
|
message: message
|
|
@@ -350,13 +351,13 @@ var testOnPlatforms = function(platforms, fn) {
|
|
|
350
351
|
for(var index = 0; index < platforms.length; index++)_loop(index);
|
|
351
352
|
};
|
|
352
353
|
function checkAriaLabel(element, label) {
|
|
353
|
-
if (label === undefined || label === null || label ===
|
|
354
|
+
if (label === undefined || label === null || label === '') {
|
|
354
355
|
return true;
|
|
355
356
|
}
|
|
356
357
|
var text = Cypress.$(element).text().trim();
|
|
357
|
-
var ariaLabel = Cypress.$(element).attr(
|
|
358
|
-
var title = Cypress.$(element).attr(
|
|
359
|
-
var value = Cypress.$(element).attr(
|
|
358
|
+
var ariaLabel = Cypress.$(element).attr('aria-label');
|
|
359
|
+
var title = Cypress.$(element).attr('title');
|
|
360
|
+
var value = Cypress.$(element).attr('value');
|
|
360
361
|
return [
|
|
361
362
|
text,
|
|
362
363
|
ariaLabel,
|
|
@@ -365,4 +366,4 @@ function checkAriaLabel(element, label) {
|
|
|
365
366
|
].includes(label.trim());
|
|
366
367
|
}
|
|
367
368
|
|
|
368
|
-
export { hasTestId as A, isSteps as B,
|
|
369
|
+
export { hasTestId as A, isSteps as B, waitAfterFramePaint as a, waitAfterIdleCallback as b, checkAriaLabel as c, areComponentsReady as d, deepReady as e, isAccordion as f, wrapCommand as g, isButton as h, isDropDown as i, isCheckbox as j, isInput as k, log as l, isInputDate as m, isNumberInput as n, isTextarea as o, isSlider as p, isRadio as q, isSelect as r, isTag as s, testOnPlatforms as t, isHint as u, hasClass as v, wrapOptions as w, isLabel as x, isInputStepper as y, isTabs as z };
|