@umbraco/playwright-testhelpers 16.0.4 → 16.0.6

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.
@@ -56,7 +56,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
56
56
  private readonly tabItems;
57
57
  private readonly documentWorkspace;
58
58
  private readonly searchTxt;
59
- private readonly variantSelectorBtn;
59
+ private readonly selectAVariantBtn;
60
60
  private readonly variantAddModeBtn;
61
61
  private readonly saveAndCloseBtn;
62
62
  private readonly enterNameInContainerTxt;
@@ -247,8 +247,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
247
247
  doesDocumentHaveName(name: string): Promise<void>;
248
248
  doesDocumentTableColumnNameValuesMatch(expectedValues: string[]): Promise<void>;
249
249
  searchByKeywordInCollection(keyword: string): Promise<void>;
250
- clickVariantSelectorButton(): Promise<void>;
251
- clickVariantAddModeButton(): Promise<void>;
250
+ clickSelectVariantButton(): Promise<void>;
251
+ clickVariantAddModeButtonForLanguageName(language: string): Promise<void>;
252
252
  clickSaveAndCloseButton(): Promise<void>;
253
253
  clickCreateContentWithName(name: string): Promise<void>;
254
254
  enterNameInContainer(name: string): Promise<void>;
@@ -376,6 +376,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
376
376
  doesPublishAtContainText(text: string): Promise<void>;
377
377
  doesRemoveAtContainText(text: string): Promise<void>;
378
378
  clickSelectAllCheckbox(): Promise<void>;
379
- doesSchedulePublishModalButtonContainDisabledTag(hasDisabledTag?: Boolean): Promise<void>;
379
+ doesSchedulePublishModalButtonContainDisabledTag(hasDisabledTag?: boolean): Promise<void>;
380
380
  clickInlineBlockCaretButtonForName(blockEditorName: string, index?: number): Promise<void>;
381
381
  }
@@ -60,7 +60,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
60
60
  tabItems;
61
61
  documentWorkspace;
62
62
  searchTxt;
63
- variantSelectorBtn;
63
+ selectAVariantBtn;
64
64
  variantAddModeBtn;
65
65
  saveAndCloseBtn;
66
66
  enterNameInContainerTxt;
@@ -203,8 +203,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
203
203
  this.tabItems = page.locator('uui-tab');
204
204
  this.documentWorkspace = page.locator('umb-document-workspace-editor');
205
205
  this.searchTxt = this.documentWorkspace.getByLabel('Search', { exact: true });
206
- this.variantSelectorBtn = page.locator('#variant-selector-toggle');
207
- this.variantAddModeBtn = page.locator('.variant-selector-switch-button.add-mode');
206
+ this.selectAVariantBtn = page.getByRole('button', { name: 'Select a variant' });
207
+ this.variantAddModeBtn = page.locator('.switch-button.add-mode').locator('.variant-name');
208
208
  this.saveAndCloseBtn = page.getByLabel('Save and close');
209
209
  this.documentTreeItem = page.locator('umb-document-tree-item');
210
210
  this.documentLanguageSelect = page.locator('umb-app-language-select');
@@ -340,6 +340,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
340
340
  }
341
341
  async clickPublishButton() {
342
342
  await this.publishBtn.click();
343
+ await this.page.waitForTimeout(500);
343
344
  }
344
345
  async clickUnpublishButton() {
345
346
  await this.unpublishBtn.click();
@@ -475,6 +476,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
475
476
  }
476
477
  async clickSaveModalButton() {
477
478
  await this.saveModalBtn.click();
479
+ await this.page.waitForTimeout(500);
478
480
  }
479
481
  async chooseDocumentType(documentTypeName) {
480
482
  await this.documentTypeNode.filter({ hasText: documentTypeName }).click();
@@ -701,15 +703,17 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
701
703
  await this.searchTxt.press('Enter');
702
704
  await this.page.waitForTimeout(500);
703
705
  }
704
- async clickVariantSelectorButton() {
705
- await this.variantSelectorBtn.click();
706
+ async clickSelectVariantButton() {
707
+ await (0, test_1.expect)(this.selectAVariantBtn).toBeVisible();
708
+ await this.selectAVariantBtn.click();
706
709
  }
707
- async clickVariantAddModeButton() {
708
- await this.variantAddModeBtn.first().click();
710
+ async clickVariantAddModeButtonForLanguageName(language) {
711
+ await this.variantAddModeBtn.getByText(language).click();
709
712
  await this.page.waitForTimeout(500);
710
713
  }
711
714
  async clickSaveAndCloseButton() {
712
715
  await this.saveAndCloseBtn.click();
716
+ await this.page.waitForTimeout(500);
713
717
  }
714
718
  // List View
715
719
  async clickCreateContentWithName(name) {