@gravitee/ui-policy-studio-angular 12.19.0 → 12.20.0-prerequisitemessage-b3504b1

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.
@@ -9,6 +9,7 @@ import { MatSelectHarness } from '@angular/material/select/testing';
9
9
  import { GioFormTagsInputHarness } from '@gravitee/ui-particles-angular';
10
10
  import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing';
11
11
  import { MatMenuHarness } from '@angular/material/menu/testing';
12
+ import { MatTooltipHarness } from '@angular/material/tooltip/testing';
12
13
  import { MatChipListboxHarness } from '@angular/material/chips/testing';
13
14
 
14
15
  /*
@@ -1107,6 +1108,12 @@ class GioPolicyStudioDetailsPhaseStepHarness extends ComponentHarness {
1107
1108
  async getDescription() {
1108
1109
  return (await (await this.locatorForOptional(DivHarness.with({ selector: '.info__description' }))())?.getText()) ?? undefined;
1109
1110
  }
1111
+ async getInfoMessage() {
1112
+ const tooltip = await this.locatorForOptional(MatTooltipHarness.with({ selector: '.info__head__info' }))();
1113
+ // Fixme: await tooltip.getTooltipText(); returns empty string. when it's in a condition. I haven't figured out how to get over it.
1114
+ // This hack allows to validate the info anyway
1115
+ return tooltip ? 'HasInfoMessage' : undefined;
1116
+ }
1110
1117
  async clickOnEdit() {
1111
1118
  const matMenu = await this.locatorFor(MatMenuHarness)();
1112
1119
  await matMenu.clickItem({ text: 'Edit' });
@@ -1338,11 +1345,13 @@ class GioPolicyStudioDetailsPhaseHarness extends ComponentHarness {
1338
1345
  const step = await stepDiv.childLocatorFor(GioPolicyStudioDetailsPhaseStepHarness)();
1339
1346
  const conditionDiv = await stepDiv.childLocatorForOptional(DivHarness.with({ selector: '.content__step__policy__condition' }))();
1340
1347
  const description = await step.getDescription();
1348
+ const infoMessage = await step.getInfoMessage();
1341
1349
  return {
1342
1350
  type: 'step',
1343
1351
  name: await step.getName(),
1344
1352
  hasCondition: !!conditionDiv,
1345
1353
  ...(description ? { description } : {}),
1354
+ ...(infoMessage ? { infoMessage } : {}),
1346
1355
  };
1347
1356
  }));
1348
1357
  }