@umbraco/playwright-testhelpers 17.0.23 → 17.0.24

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.
@@ -372,4 +372,5 @@ export declare class UiBaseLocators {
372
372
  isImageCropperFieldVisible(isVisible?: boolean): Promise<void>;
373
373
  isInputUploadFieldVisible(isVisible?: boolean): Promise<void>;
374
374
  isBackOfficeMainVisible(isVisible?: boolean): Promise<void>;
375
+ doesPropertyWithNameContainValidationMessage(propertyName: string, validationMessage: string, isContained?: boolean): Promise<void>;
375
376
  }
@@ -1065,6 +1065,7 @@ class UiBaseLocators {
1065
1065
  const mediaLocator = this.mediaCardItems.filter({ hasText: mediaName });
1066
1066
  await (0, test_1.expect)(mediaLocator).toBeVisible();
1067
1067
  await mediaLocator.click({ position: { x: 0.5, y: 0.5 }, force: isForce });
1068
+ await (0, test_1.expect)(mediaLocator).toHaveAttribute('selected');
1068
1069
  }
1069
1070
  async selectMediaWithTestId(mediaKey) {
1070
1071
  const locator = this.page.getByTestId('media:' + mediaKey);
@@ -1294,6 +1295,15 @@ class UiBaseLocators {
1294
1295
  await this.page.waitForTimeout(1000);
1295
1296
  await (0, test_1.expect)(this.backOfficeMain).toBeVisible({ visible: isVisible });
1296
1297
  }
1298
+ async doesPropertyWithNameContainValidationMessage(propertyName, validationMessage, isContained = true) {
1299
+ const validationMessageLocator = this.page.locator('umb-property-layout[label="' + propertyName + '"]').locator(this.validationMessage);
1300
+ if (!isContained) {
1301
+ await (0, test_1.expect)(validationMessageLocator).not.toContainText(validationMessage);
1302
+ }
1303
+ else {
1304
+ await (0, test_1.expect)(validationMessageLocator).toContainText(validationMessage);
1305
+ }
1306
+ }
1297
1307
  }
1298
1308
  exports.UiBaseLocators = UiBaseLocators;
1299
1309
  //# sourceMappingURL=UiBaseLocators.js.map