@umbraco/playwright-testhelpers 16.0.40 → 16.0.42

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 UiBaseLocators {
56
56
  readonly typeToFilterSearchTxt: Locator;
57
57
  readonly editorSettingsBtn: Locator;
58
58
  readonly labelAboveBtn: Locator;
59
- readonly unnamedTxt: Locator;
59
+ readonly unnamedTabTxt: Locator;
60
60
  readonly deleteThreeDotsBtn: Locator;
61
61
  readonly removeExactBtn: Locator;
62
62
  readonly confirmBtn: Locator;
@@ -293,6 +293,7 @@ export declare class UiBaseLocators {
293
293
  clickLinkWithName(name: string, isExact?: boolean): Promise<void>;
294
294
  clickMediaPickerModalSubmitButton(): Promise<void>;
295
295
  selectMediaWithName(mediaName: string): Promise<void>;
296
+ selectMediaWithTestId(mediaKey: string): Promise<void>;
296
297
  clickCreateModalButton(): Promise<void>;
297
298
  clickMediaCaptionAltTextModalSubmitButton(): Promise<void>;
298
299
  enterEmbeddedURL(value: string): Promise<void>;
@@ -60,7 +60,7 @@ class UiBaseLocators {
60
60
  typeToFilterSearchTxt;
61
61
  editorSettingsBtn;
62
62
  labelAboveBtn;
63
- unnamedTxt;
63
+ unnamedTabTxt;
64
64
  deleteThreeDotsBtn;
65
65
  removeExactBtn;
66
66
  confirmBtn;
@@ -213,7 +213,8 @@ class UiBaseLocators {
213
213
  this.typeToFilterSearchTxt = page.locator('[type="search"] #input');
214
214
  this.editorSettingsBtn = page.getByLabel('Editor settings');
215
215
  this.labelAboveBtn = page.locator('button').filter({ hasText: 'Label above' });
216
- this.unnamedTxt = page.getByRole('textbox', { name: 'Unnamed' });
216
+ // tab: means that the tab is unnamed
217
+ this.unnamedTabTxt = page.getByTestId('tab:').getByTestId('tab:name-input').locator('#input');
217
218
  this.deleteThreeDotsBtn = page.getByLabel('Delete…');
218
219
  this.removeExactBtn = page.getByLabel('Remove', { exact: true });
219
220
  this.confirmBtn = page.getByLabel('Confirm');
@@ -696,11 +697,11 @@ class UiBaseLocators {
696
697
  await this.addTabBtn.click();
697
698
  }
698
699
  async enterTabName(tabName) {
699
- await (0, test_1.expect)(this.unnamedTxt).toBeVisible();
700
+ await (0, test_1.expect)(this.unnamedTabTxt).toBeVisible();
700
701
  await this.page.waitForTimeout(400);
701
- await this.unnamedTxt.clear();
702
- await this.unnamedTxt.fill(tabName);
703
- await (0, test_1.expect)(this.page.getByRole('textbox', { name: tabName })).toBeVisible();
702
+ await this.unnamedTabTxt.clear();
703
+ await this.unnamedTabTxt.fill(tabName);
704
+ await (0, test_1.expect)(this.page.getByTestId('tab:' + tabName)).toBeVisible();
704
705
  }
705
706
  async searchForTypeToFilterValue(searchValue) {
706
707
  await (0, test_1.expect)(this.typeToFilterSearchTxt).toBeVisible();
@@ -1006,6 +1007,11 @@ class UiBaseLocators {
1006
1007
  await (0, test_1.expect)(this.mediaCardItems.filter({ hasText: mediaName })).toBeVisible();
1007
1008
  await this.mediaCardItems.filter({ hasText: mediaName }).click({ position: { x: 0.5, y: 0.5 } });
1008
1009
  }
1010
+ async selectMediaWithTestId(mediaKey) {
1011
+ const locator = this.page.getByTestId('media:' + mediaKey);
1012
+ await (0, test_1.expect)(locator).toBeVisible();
1013
+ await locator.click({ position: { x: 0.5, y: 0.5 } });
1014
+ }
1009
1015
  async clickCreateModalButton() {
1010
1016
  await (0, test_1.expect)(this.createModalBtn).toBeVisible();
1011
1017
  await this.createModalBtn.click();