@baloise/ds-testing 18.3.0 → 19.0.0-nightly.20250509

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,5 +1,5 @@
1
1
  import { s as selectors, p as parseDataTestID, a as byDataSelectors } from './selectors.esm2.js';
2
- import { f as isAccordion, g as wrapCommand, h as isButton, j as isCheckbox, k as isInput, m as isInputDate, n as isNumberInput, o as isTextarea, p as isSlider, q as isRadio, r as isSelect, i as isDropDown, w as wrapOptions, s as isTag, u as isHint, l as log, v as hasClass, x as isLabel, y as isInputStepper, z as isTabs, A as hasTestId, B as isSteps } from './helpers.esm.js';
2
+ import { f as isAccordion, g as wrapCommand, h as isButton, j as isCheckbox, k as isInput, m as isInputDate, n as isNumberInput, o as isTextarea, p as isSlider, q as isRadio, r as isSelect, i as isDropDown, w as wrapOptions, s as isTag, u as isHint, l as log, v as hasClass, x as hasRole, y as isLabel, z as isInputStepper, A as isTabs, B as hasTestId, C as isSteps } from './helpers.esm.js';
3
3
 
4
4
  Cypress.Commands.overwrite('blur', function(originalFn, element, options) {
5
5
  var command = wrapCommand('blur', element, '', function($el) {
@@ -42,10 +42,12 @@ Cypress.Commands.overwrite('blur', function(originalFn, element, options) {
42
42
  });
43
43
 
44
44
  Cypress.Commands.overwrite('check', function(originalFn, element, options) {
45
- if (isRadio(element) || isCheckbox(element)) {
46
- return cy.wrapComponent(element, {
45
+ if (isCheckbox(element) || isRadio(element)) {
46
+ return cy.wrap(element, {
47
47
  log: false
48
- }).click();
48
+ }).click(options).wrap(element, {
49
+ log: false
50
+ });
49
51
  }
50
52
  return originalFn(element, options);
51
53
  });
@@ -199,7 +201,7 @@ var shouldAndAndCommand = function(originalFn, element, condition, key, value, o
199
201
  }), condition, key, value, options);
200
202
  }
201
203
  }
202
- if (isCheckbox(element) || isRadio(element) || hasClass(element, 'bal-radio-checkbox__label')) {
204
+ if (isCheckbox(element) || isRadio(element) || hasClass(element, 'bal-checkbox__label') || hasRole(element, 'radiogroup') || hasRole(element, 'group')) {
203
205
  if (isLabel(element)) {
204
206
  element = element.closest(isCheckbox(element) ? '<bal-checkbox>' : '<bal-radio>', {
205
207
  log: false
package/helpers.esm.js CHANGED
@@ -229,6 +229,9 @@ var isElement = function(el, name) {
229
229
  var hasClass = function(el, name) {
230
230
  return (typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0 && el.hasClass(name);
231
231
  };
232
+ var hasRole = function(el, role) {
233
+ return (typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0 && el.attr('role') === role;
234
+ };
232
235
  var hasTestId = function(el, testId) {
233
236
  if ((typeof el === "undefined" ? "undefined" : _type_of(el)) === 'object' && el.length > 0) {
234
237
  var dataTestId = el.data('testid');
@@ -366,4 +369,4 @@ function checkAriaLabel(element, label) {
366
369
  ].includes(label.trim());
367
370
  }
368
371
 
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 };
372
+ export { isTabs as A, hasTestId as B, isSteps as C, 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, hasRole as x, isLabel as y, isInputStepper as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baloise/ds-testing",
3
- "version": "18.3.0",
3
+ "version": "19.0.0-nightly.20250509",
4
4
  "description": "The Baloise Design-System is an open source project for styling awesome web applications that follow the Baloise corporate styling guidelines.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,7 @@
12
12
  "homepage": "https://design.baloise.dev",
13
13
  "license": "Apache-2.0",
14
14
  "dependencies": {
15
- "@baloise/ds-core": "18.3.0"
15
+ "@baloise/ds-core": "19.0.0-nightly.20250509"
16
16
  },
17
17
  "module": "./index.esm.js",
18
18
  "type": "module",
@@ -13,6 +13,7 @@ export declare const runHighPrioritizedTask: (callback: (value: unknown) => void
13
13
  export type isElementType = (el: Cypress.Chainable<JQuery>) => boolean;
14
14
  export declare const isElement: (el: Cypress.Chainable<JQuery>, name: string) => boolean;
15
15
  export declare const hasClass: (el: Cypress.Chainable<JQuery>, name: string) => boolean;
16
+ export declare const hasRole: (el: Cypress.Chainable<JQuery>, role: string) => boolean;
16
17
  export declare const hasTestId: (el: Cypress.Chainable<JQuery>, testId: string) => boolean;
17
18
  export declare const isLabel: isElementType;
18
19
  export declare const isAccordion: isElementType;