@gravitee/ui-particles-angular 16.0.0-angular-20-fixes-a73324e → 16.0.0-card-selection-harness-36e5799

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.
@@ -7366,7 +7366,8 @@ class GioFormSelectionInlineCardHarness extends ComponentHarness {
7366
7366
  }
7367
7367
  async getValue() {
7368
7368
  const host = await this.host();
7369
- return (await host.getAttribute('value')) ?? null;
7369
+ const value = (await host.getAttribute('value')) ?? (await host.getAttribute('ng-reflect-value'));
7370
+ return value ?? null;
7370
7371
  }
7371
7372
  async isSelected() {
7372
7373
  return (await this.host()).hasClass('selected');
@@ -7399,11 +7400,6 @@ class GioFormSelectionInlineHarness extends ComponentHarness {
7399
7400
  constructor() {
7400
7401
  super(...arguments);
7401
7402
  this.getCards = this.locatorForAll(GioFormSelectionInlineCardHarness);
7402
- this.getCardByValue = (value) => {
7403
- const byValue = this.locatorForOptional(`gio-form-selection-inline-card[value="${value}"]`)();
7404
- const byReflectValue = this.locatorForOptional(`gio-form-selection-inline-card[ng-reflect-value="${value}"]`)();
7405
- return byValue.then(card => card ?? byReflectValue);
7406
- };
7407
7403
  }
7408
7404
  static { this.hostSelector = 'gio-form-selection-inline'; }
7409
7405
  /**
@@ -7416,6 +7412,18 @@ class GioFormSelectionInlineHarness extends ComponentHarness {
7416
7412
  static with(options = {}) {
7417
7413
  return new HarnessPredicate(GioFormSelectionInlineHarness, options);
7418
7414
  }
7415
+ async getCardByValue(value) {
7416
+ const primaryLocator = await this.locatorForOptional(`gio-form-selection-inline-card[value="${value}"]`)();
7417
+ if (primaryLocator) {
7418
+ return primaryLocator;
7419
+ }
7420
+ // fallback
7421
+ const secondaryLocator = await this.locatorForOptional(`gio-form-selection-inline-card[ng-reflect-value="${value}"]`)();
7422
+ if (secondaryLocator) {
7423
+ return secondaryLocator;
7424
+ }
7425
+ throw new Error(`No card found with value or ng-reflect-value "${value}"`);
7426
+ }
7419
7427
  async getSelectedValue() {
7420
7428
  const cards = await this.getCards();
7421
7429
  const cardsAttr = await parallel(() => cards.map(async (row) => ({ class: await row.isSelected(), value: await row.getValue() })));
@@ -7438,7 +7446,7 @@ class GioFormSelectionInlineHarness extends ComponentHarness {
7438
7446
  }
7439
7447
  async select(value) {
7440
7448
  const card = await this.getCardByValue(value);
7441
- await card?.click();
7449
+ await card.click();
7442
7450
  }
7443
7451
  async isDisabled() {
7444
7452
  const cards = await this.getCards();