@umbraco/playwright-testhelpers 15.0.50 → 15.0.52

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.
@@ -310,6 +310,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
310
310
  clickMediaLinkButton(): Promise<void>;
311
311
  clickManualLinkButton(): Promise<void>;
312
312
  clickAddBlockElementButton(): Promise<void>;
313
+ clickAddBlockWithNameButton(name: string): Promise<void>;
314
+ clickCreateForModalWithHeadline(headline: string): Promise<void>;
313
315
  isAddBlockElementButtonVisible(isVisible?: boolean): Promise<void>;
314
316
  isAddBlockElementButtonWithLabelVisible(blockName: string, label: string, isVisible?: boolean): Promise<void>;
315
317
  doesFormValidationMessageContainText(text: string): Promise<void>;
@@ -361,6 +363,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
361
363
  doesPropertyContainValidationMessage(groupName: string, propertyName: string, message: string): Promise<void>;
362
364
  clickInsertBlockButton(): Promise<void>;
363
365
  enterRTETipTapEditor(value: string): Promise<void>;
366
+ enterRTETipTapEditorWithName(name: string, value: string): Promise<void>;
364
367
  clickTipTapToolbarIconWithTitle(iconTitle: string): Promise<void>;
365
368
  doesUploadedSvgThumbnailHaveSrc(imageSrc: string): Promise<void>;
366
369
  doesRichTextEditorBlockContainLabel(richTextEditorAlias: string, label: string): Promise<void>;
@@ -382,6 +385,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
382
385
  clickSelectAllCheckbox(): Promise<void>;
383
386
  doesSchedulePublishModalButtonContainDisabledTag(hasDisabledTag?: Boolean): Promise<void>;
384
387
  clickInlineBlockCaretButtonForName(blockEditorName: string, index?: number): Promise<void>;
388
+ clickBlockCardWithName(name: string, toForce?: boolean): Promise<void>;
385
389
  doesTiptapHaveWordCount(count: number): Promise<void>;
386
390
  doesTiptapHaveCharacterCount(count: number): Promise<void>;
387
391
  clickTiptapWordCountButton(): Promise<void>;
@@ -961,6 +961,14 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
961
961
  await (0, test_1.expect)(this.addBlockElementBtn).toBeVisible();
962
962
  await this.addBlockElementBtn.click();
963
963
  }
964
+ async clickAddBlockWithNameButton(name) {
965
+ await (0, test_1.expect)(this.page.getByLabel('Add ' + name)).toBeVisible();
966
+ await this.page.getByLabel('Add ' + name).click();
967
+ }
968
+ async clickCreateForModalWithHeadline(headline) {
969
+ await (0, test_1.expect)(this.page.locator('[headline="' + headline + '"]').getByLabel('Create')).toBeVisible();
970
+ await this.page.locator('[headline="' + headline + '"]').getByLabel('Create').click();
971
+ }
964
972
  async isAddBlockElementButtonVisible(isVisible = true) {
965
973
  await (0, test_1.expect)(this.addBlockElementBtn).toBeVisible({ visible: isVisible });
966
974
  }
@@ -1197,6 +1205,12 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1197
1205
  await this.tipTapEditor.clear();
1198
1206
  await this.tipTapEditor.fill(value);
1199
1207
  }
1208
+ async enterRTETipTapEditorWithName(name, value) {
1209
+ const tipTapEditorLocator = this.page.locator('[data-mark="property:' + name + '"]').locator(this.tipTapEditor);
1210
+ await (0, test_1.expect)(tipTapEditorLocator).toBeVisible();
1211
+ await tipTapEditorLocator.clear();
1212
+ await tipTapEditorLocator.fill(value);
1213
+ }
1200
1214
  async clickTipTapToolbarIconWithTitle(iconTitle) {
1201
1215
  await (0, test_1.expect)(this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg')).toBeVisible();
1202
1216
  await this.tipTapPropertyEditor.getByTitle(iconTitle, { exact: true }).locator('svg').click();
@@ -1281,6 +1295,11 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1281
1295
  await (0, test_1.expect)(caretButtonLocator).toBeVisible();
1282
1296
  await caretButtonLocator.click();
1283
1297
  }
1298
+ async clickBlockCardWithName(name, toForce = false) {
1299
+ const blockWithNameLocator = this.page.locator('umb-block-type-card', { hasText: name });
1300
+ await (0, test_1.expect)(blockWithNameLocator).toBeVisible();
1301
+ await blockWithNameLocator.click({ force: toForce });
1302
+ }
1284
1303
  async doesTiptapHaveWordCount(count) {
1285
1304
  await (0, test_1.expect)(this.tiptapStatusbarWordCount).toHaveText(count.toString() + ' words');
1286
1305
  }