@umbraco/playwright-testhelpers 17.0.26 → 17.0.28

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.
@@ -185,6 +185,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
185
185
  private readonly linkPickerTargetToggle;
186
186
  private readonly confirmToResetBtn;
187
187
  private readonly saveModal;
188
+ private readonly expandSegmentBtn;
188
189
  constructor(page: Page);
189
190
  enterContentName(name: string): Promise<void>;
190
191
  clickSaveAndPublishButton(): Promise<void>;
@@ -292,6 +293,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
292
293
  doesDocumentTableColumnNameValuesMatch(expectedValues: string[]): Promise<void>;
293
294
  searchByKeywordInCollection(keyword: string): Promise<void>;
294
295
  clickSelectVariantButton(): Promise<void>;
296
+ clickExpendSegmentButton(contentName: string): Promise<void>;
295
297
  clickVariantAddModeButtonForLanguageName(language: string): Promise<void>;
296
298
  clickSaveAndCloseButton(): Promise<void>;
297
299
  clickCreateContentWithName(name: string): Promise<void>;
@@ -479,7 +481,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
479
481
  isInlineBlockPropertyVisibleForBlockWithName(blockName: string, propertyName: string, isVisible?: boolean, index?: number): Promise<void>;
480
482
  enterInlineBlockPropertyValue(propertyName: string, value: string, index?: number): Promise<void>;
481
483
  doesInlineBlockPropertyHaveValue(propertyName: string, value: string, index?: number): Promise<void>;
482
- removeNotFoundContentPickerWithId(contentPickerId?: string): Promise<void>;
483
484
  clickConfirmTrashButtonAndWaitForContentToBeTrashed(): Promise<string | undefined>;
484
485
  clickConfirmEmptyRecycleBinButtonAndWaitForRecycleBinToBeEmptied(): Promise<string | undefined>;
485
486
  clickConfirmToPublishButtonAndWaitForContentToBePublished(): Promise<string | undefined>;
@@ -492,4 +493,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
492
493
  clickLinkPickerAddButton(): Promise<void>;
493
494
  clickLinkPickerTargetToggle(): Promise<void>;
494
495
  clickConfirmToResetButton(): Promise<void>;
496
+ doesTextStringHaveExpectedValue(expectedValue: string): Promise<void>;
497
+ doesTextAreaHaveExpectedValue(expectedValue: string): Promise<void>;
495
498
  }
@@ -189,6 +189,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
189
189
  linkPickerTargetToggle;
190
190
  confirmToResetBtn;
191
191
  saveModal;
192
+ expandSegmentBtn;
192
193
  constructor(page) {
193
194
  super(page);
194
195
  this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
@@ -387,6 +388,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
387
388
  this.linkPickerCloseBtn = this.linkPickerModal.getByRole('button', { name: 'Close', exact: true });
388
389
  this.linkPickerTargetToggle = this.linkPickerModal.locator('[label="Opens the link in a new window or tab"]').locator('#toggle');
389
390
  this.confirmToResetBtn = page.locator('#confirm').getByLabel('Reset', { exact: true });
391
+ // Segment
392
+ this.expandSegmentBtn = page.locator('.expand-area uui-button');
390
393
  }
391
394
  async enterContentName(name) {
392
395
  await this.enterText(this.contentNameTxt, name, { verify: true });
@@ -800,6 +803,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
800
803
  async clickSelectVariantButton() {
801
804
  await this.click(this.selectAVariantBtn);
802
805
  }
806
+ async clickExpendSegmentButton(contentName) {
807
+ await this.page.locator('.variant.culture-variant').filter({ hasText: contentName }).locator(this.expandSegmentBtn).click();
808
+ }
803
809
  async clickVariantAddModeButtonForLanguageName(language) {
804
810
  await this.click(this.variantAddModeBtn.getByText(language));
805
811
  await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
@@ -1525,13 +1531,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1525
1531
  const propertyLocator = this.blockListEntry.nth(index).locator(this.blockProperty).filter({ hasText: propertyName }).locator('input');
1526
1532
  await this.hasValue(propertyLocator, value);
1527
1533
  }
1528
- async removeNotFoundContentPickerWithId(contentPickerId) {
1529
- const hasText = contentPickerId ? contentPickerId : 'Not found';
1530
- const contentPickerLocator = this.entityItem.filter({ hasText: hasText });
1531
- const removeButton = contentPickerLocator.getByLabel('Remove');
1532
- await this.hoverAndClick(contentPickerLocator, removeButton);
1533
- await this.clickConfirmRemoveButton();
1534
- }
1535
1534
  async clickConfirmTrashButtonAndWaitForContentToBeTrashed() {
1536
1535
  return await this.waitForResponseAfterExecutingPromise(ConstantHelper_1.ConstantHelper.apiEndpoints.document, this.clickConfirmTrashButton(), ConstantHelper_1.ConstantHelper.statusCodes.ok);
1537
1536
  }
@@ -1568,6 +1567,12 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1568
1567
  async clickConfirmToResetButton() {
1569
1568
  await this.click(this.confirmToResetBtn);
1570
1569
  }
1570
+ async doesTextStringHaveExpectedValue(expectedValue) {
1571
+ await this.hasValue(this.textstringTxt, expectedValue);
1572
+ }
1573
+ async doesTextAreaHaveExpectedValue(expectedValue) {
1574
+ await this.hasValue(this.textAreaTxt, expectedValue);
1575
+ }
1571
1576
  }
1572
1577
  exports.ContentUiHelper = ContentUiHelper;
1573
1578
  //# sourceMappingURL=ContentUiHelper.js.map