@umbraco/playwright-testhelpers 15.0.19 → 15.0.21

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.
Files changed (47) hide show
  1. package/dist/lib/helpers/ConstantHelper.d.ts +1 -0
  2. package/dist/lib/helpers/ConstantHelper.js +1 -0
  3. package/dist/lib/helpers/ConstantHelper.js.map +1 -1
  4. package/dist/lib/helpers/ContentUiHelper.d.ts +19 -1
  5. package/dist/lib/helpers/ContentUiHelper.js +87 -20
  6. package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
  7. package/dist/lib/helpers/DataTypeApiHelper.d.ts +2 -0
  8. package/dist/lib/helpers/DataTypeApiHelper.js +40 -0
  9. package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
  10. package/dist/lib/helpers/DataTypeUiHelper.d.ts +4 -2
  11. package/dist/lib/helpers/DataTypeUiHelper.js +18 -12
  12. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  13. package/dist/lib/helpers/DictionaryUiHelper.js +3 -3
  14. package/dist/lib/helpers/DictionaryUiHelper.js.map +1 -1
  15. package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +1 -0
  16. package/dist/lib/helpers/DocumentTypeApiHelper.js +23 -0
  17. package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
  18. package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +2 -0
  19. package/dist/lib/helpers/DocumentTypeUiHelper.js +7 -1
  20. package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
  21. package/dist/lib/helpers/FormsUiHelper.js +4 -4
  22. package/dist/lib/helpers/FormsUiHelper.js.map +1 -1
  23. package/dist/lib/helpers/MediaTypeUiHelper.d.ts +2 -0
  24. package/dist/lib/helpers/MediaTypeUiHelper.js +8 -2
  25. package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
  26. package/dist/lib/helpers/MediaUiHelper.js +2 -2
  27. package/dist/lib/helpers/MediaUiHelper.js.map +1 -1
  28. package/dist/lib/helpers/NotificationConstantHelper.d.ts +3 -0
  29. package/dist/lib/helpers/NotificationConstantHelper.js +4 -1
  30. package/dist/lib/helpers/NotificationConstantHelper.js.map +1 -1
  31. package/dist/lib/helpers/PartialViewUiHelper.d.ts +2 -0
  32. package/dist/lib/helpers/PartialViewUiHelper.js +8 -0
  33. package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
  34. package/dist/lib/helpers/ScriptUiHelper.d.ts +2 -0
  35. package/dist/lib/helpers/ScriptUiHelper.js +8 -0
  36. package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
  37. package/dist/lib/helpers/StylesheetUiHelper.d.ts +2 -0
  38. package/dist/lib/helpers/StylesheetUiHelper.js +8 -0
  39. package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
  40. package/dist/lib/helpers/UiBaseLocators.d.ts +11 -2
  41. package/dist/lib/helpers/UiBaseLocators.js +52 -12
  42. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  43. package/dist/lib/helpers/UserUiHelper.d.ts +1 -1
  44. package/dist/lib/helpers/UserUiHelper.js +4 -3
  45. package/dist/lib/helpers/UserUiHelper.js.map +1 -1
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +2 -2
@@ -15,6 +15,7 @@ export declare class ConstantHelper {
15
15
  };
16
16
  static readonly validationMessages: {
17
17
  emptyLinkPicker: string;
18
+ invalidValue: string;
18
19
  };
19
20
  static readonly inputTypes: {
20
21
  general: string;
@@ -18,6 +18,7 @@ class ConstantHelper {
18
18
  };
19
19
  static validationMessages = {
20
20
  emptyLinkPicker: 'Please enter an anchor or querystring, or select a published document or media item, or manually configure the URL',
21
+ invalidValue: 'Value is invalid, it does not match the correct pattern'
21
22
  };
22
23
  static inputTypes = {
23
24
  general: 'input',
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,OAAO;KACf,CAAA;IAEM,MAAM,CAAU,mBAAmB,GAAG;QAC3C,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,uBAAuB;KAClC,CAAA;IAEM,MAAM,CAAU,kBAAkB,GAAG;QAC1C,eAAe,EAAE,oHAAoH;KACtI,CAAA;IAEM,MAAM,CAAU,UAAU,GAAG;QAClC,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,kBAAkB;KAC3B,CAAA;;AAzBH,wCA0BC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'Please enter an anchor or querystring, or select a published document or media item, or manually configure the URL',\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n}"]}
1
+ {"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,OAAO;KACf,CAAA;IAEM,MAAM,CAAU,mBAAmB,GAAG;QAC3C,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,uBAAuB;KAClC,CAAA;IAEM,MAAM,CAAU,kBAAkB,GAAG;QAC1C,eAAe,EAAE,oHAAoH;QACrI,YAAY,EAAE,yDAAyD;KACxE,CAAA;IAEM,MAAM,CAAU,UAAU,GAAG;QAClC,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,kBAAkB;KAC3B,CAAA;;AA1BH,wCA2BC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'Please enter an anchor or querystring, or select a published document or media item, or manually configure the URL',\n invalidValue: 'Value is invalid, it does not match the correct pattern'\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n}"]}
@@ -131,6 +131,11 @@ export declare class ContentUiHelper extends UiBaseLocators {
131
131
  private readonly replaceExactBtn;
132
132
  private readonly clipboardEntryPicker;
133
133
  private readonly blockWorkspaceEditTab;
134
+ private readonly insertBlockBtn;
135
+ private readonly validationMessage;
136
+ private readonly blockWorkspace;
137
+ private readonly saveContentBtn;
138
+ private readonly splitView;
134
139
  constructor(page: Page);
135
140
  enterContentName(name: string): Promise<void>;
136
141
  clickSaveAndPublishButton(): Promise<void>;
@@ -144,6 +149,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
144
149
  clickCaretButtonForContentName(name: string): Promise<void>;
145
150
  waitForModalVisible(): Promise<void>;
146
151
  waitForModalHidden(): Promise<void>;
152
+ clickSaveButtonForContent(): Promise<void>;
147
153
  enterTextstring(text: string): Promise<void>;
148
154
  doesContentTreeHaveName(contentName: string): Promise<void>;
149
155
  enterRichTextArea(value: string): Promise<void>;
@@ -253,6 +259,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
253
259
  clickConfirmEmptyRecycleBinButton(): Promise<void>;
254
260
  isDocumentPropertyEditable(propertyName: string, isEditable?: boolean): Promise<void>;
255
261
  doesDocumentPropertyHaveValue(propertyName: string, value: string): Promise<void>;
262
+ clickContentTab(): Promise<void>;
256
263
  isDocumentTreeEmpty(): Promise<void>;
257
264
  doesDocumentWorkspaceContainName(name: string): Promise<void>;
258
265
  doesDocumentWorkspaceHaveText(text: string): Promise<void>;
@@ -280,7 +287,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
280
287
  clickManualLinkButton(): Promise<void>;
281
288
  clickAddBlockElementButton(): Promise<void>;
282
289
  isAddBlockElementButtonVisible(isVisible?: boolean): Promise<void>;
283
- isAddBlockElementButtonWithLabelVisible(label: string, isVisible?: boolean): Promise<void>;
290
+ isAddBlockElementButtonWithLabelVisible(blockName: string, label: string, isVisible?: boolean): Promise<void>;
284
291
  doesFormValidationMessageContainText(text: string): Promise<void>;
285
292
  doesBlockElementHaveName(name: string): Promise<void>;
286
293
  clickAddBlockSettingsTabButton(): Promise<void>;
@@ -292,6 +299,15 @@ export declare class ContentUiHelper extends UiBaseLocators {
292
299
  clickCopyBlockGridBlockButton(groupName: string, propertyName: string, blockName: string, index?: number): Promise<void>;
293
300
  clickPasteFromClipboardButtonForProperty(groupName: string, propertyName: string): Promise<void>;
294
301
  clickActionsMenuForProperty(groupName: string, propertyName: string): Promise<void>;
302
+ clickAddBlockGridElementWithName(elementTypeName: string): Promise<void>;
303
+ clickEditBlockListEntryWithName(blockListElementName: string): Promise<void>;
304
+ clickSelectBlockElementWithName(elementTypeName: string): Promise<void>;
305
+ clickSelectBlockElementInAreaWithName(elementTypeName: string): Promise<void>;
306
+ clickBlockElementWithName(elementTypeName: string): Promise<void>;
307
+ enterPropertyValue(propertyName: string, value: string): Promise<void>;
308
+ doesPropertyContainValue(propertyName: string, value: string): Promise<void>;
309
+ clickCreateButtonForModalWithElementTypeNameAndGroupName(headlineName: string, groupName: string): Promise<void>;
310
+ clickUpdateButtonForModalWithElementTypeNameAndGroupName(headlineName: string, groupName: string): Promise<void>;
295
311
  clickExactCopyButton(): Promise<void>;
296
312
  clickExactReplaceButton(): Promise<void>;
297
313
  doesClipboardHaveCopiedBlockWithName(contentName: string, propertyName: string, blockName: string, index?: number): Promise<void>;
@@ -306,6 +322,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
306
322
  clickPasteButton(): Promise<void>;
307
323
  doesBlockListPropertyHaveBlockAmount(groupName: string, propertyName: string, amount: number): Promise<void>;
308
324
  doesBlockGridPropertyHaveBlockAmount(groupName: string, propertyName: string, amount: number): Promise<void>;
325
+ doesPropertyContainValidationMessage(groupName: string, propertyName: string, message: string): Promise<void>;
326
+ clickInsertBlockButton(): Promise<void>;
309
327
  enterRTETipTapEditor(value: string): Promise<void>;
310
328
  clickTipTapToolbarIconWithTitle(iconTitle: string): Promise<void>;
311
329
  doesUploadedSvgThumbnailHaveSrc(imageSrc: string): Promise<void>;
@@ -135,18 +135,24 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
135
135
  replaceExactBtn;
136
136
  clipboardEntryPicker;
137
137
  blockWorkspaceEditTab;
138
+ insertBlockBtn;
139
+ validationMessage;
140
+ blockWorkspace;
141
+ saveContentBtn;
142
+ splitView;
138
143
  constructor(page) {
139
144
  super(page);
145
+ this.saveContentBtn = page.locator('[data-mark="workspace-action:Umb.WorkspaceAction.Document.Save"]');
140
146
  this.closeBtn = page.getByRole('button', { name: 'Close', exact: true });
141
147
  this.linkPickerModal = page.locator('umb-link-picker-modal');
142
148
  this.contentNameTxt = page.locator('#name-input input');
143
149
  this.saveAndPublishBtn = page.getByLabel('Save And Publish');
144
- this.publishBtn = page.getByLabel(/^Publish(\.\.\.)?$/);
145
- this.unpublishBtn = page.getByLabel(/^Unpublish(\.\.\.)?$/);
150
+ this.publishBtn = page.getByLabel(/^Publish()?$/);
151
+ this.unpublishBtn = page.getByLabel(/^Unpublish()?$/);
146
152
  this.actionMenuForContentBtn = page.locator('#header [label="Open actions menu"]');
147
153
  this.openedModal = page.locator('uui-modal-container[backdrop]');
148
154
  this.textstringTxt = page.locator('umb-property-editor-ui-text-box #input');
149
- this.reloadChildrenThreeDotsBtn = page.getByRole('button', { name: 'Reload children...' });
155
+ this.reloadChildrenThreeDotsBtn = page.getByRole('button', { name: 'Reload children' });
150
156
  this.contentTree = page.locator('umb-tree[alias="Umb.Tree.Document"]');
151
157
  this.richTextAreaTxt = page.frameLocator('iframe[title="Rich Text Area"]').locator('#tinymce');
152
158
  this.textAreaTxt = page.locator('umb-property-editor-ui-textarea textarea');
@@ -155,12 +161,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
155
161
  this.menuItemTree = page.locator('umb-menu-item-tree-default');
156
162
  this.confirmToUnpublishBtn = page.locator('umb-document-unpublish-modal').getByLabel('Unpublish');
157
163
  this.dropdown = page.locator('select#native');
158
- this.setADateTxt = page.getByLabel('Set a date...');
164
+ this.splitView = page.locator('#splitViews');
165
+ this.setADateTxt = page.getByLabel('Set a date…');
159
166
  this.chooseMediaPickerBtn = page.locator('umb-property-editor-ui-media-picker #btn-add');
160
167
  this.chooseMemberPickerBtn = page.locator('umb-property-editor-ui-member-picker #btn-add');
161
168
  this.numericTxt = page.locator('umb-property-editor-ui-number input');
162
169
  this.addMultiURLPickerBtn = page.locator('umb-property-editor-ui-multi-url-picker #btn-add');
163
- this.linkTxt = page.getByLabel('Enter a URL...', { exact: true });
170
+ this.linkTxt = page.getByLabel('Enter a URL', { exact: true });
164
171
  this.anchorQuerystringTxt = page.getByLabel('#value or ?key=value');
165
172
  this.linkTitleTxt = this.linkPickerModal.getByLabel('Title');
166
173
  this.tagItems = page.locator('uui-tag');
@@ -194,7 +201,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
194
201
  this.addTemplateBtn = this.generalItem.filter({ hasText: 'Template' }).locator('#button');
195
202
  this.id = this.generalItem.filter({ hasText: 'Id' }).locator('span');
196
203
  // Culture and Hostname
197
- this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(\.\.\.)?$/);
204
+ this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames()?$/);
198
205
  this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
199
206
  this.addNewDomainBtn = page.getByLabel('Add new domain');
200
207
  this.domainTxt = page.getByLabel('Domain', { exact: true });
@@ -204,17 +211,17 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
204
211
  this.saveModalBtn = this.sidebarModal.getByLabel('Save', { exact: true });
205
212
  this.resetFocalPointBtn = this.page.getByLabel('Reset focal point');
206
213
  // List View
207
- this.enterNameInContainerTxt = this.container.getByLabel('Enter a name...');
214
+ this.enterNameInContainerTxt = this.container.getByLabel('Enter a name');
208
215
  this.listView = page.locator('umb-document-table-collection-view');
209
216
  this.nameBtn = page.getByRole('button', { name: 'Name' });
210
217
  this.listViewTableRow = this.listView.locator('uui-table-row');
211
- this.publishSelectedListItems = page.getByRole('button', { name: /^Publish(\.\.\.)?$/ });
212
- this.unpublishSelectedListItems = page.getByRole('button', { name: /^Unpublish(\.\.\.)?$/ });
213
- this.duplicateToSelectedListItems = page.getByRole('button', { name: /^Duplicate to(\.\.\.)?$/ });
214
- this.moveToSelectedListItems = page.getByRole('button', { name: /^Move to(\.\.\.)?$/ });
215
- this.trashSelectedListItems = page.getByRole('button', { name: /^Trash(\.\.\.)?$/ });
218
+ this.publishSelectedListItems = page.getByRole('button', { name: /^Publish()?$/ });
219
+ this.unpublishSelectedListItems = page.getByRole('button', { name: /^Unpublish()?$/ });
220
+ this.duplicateToSelectedListItems = page.getByRole('button', { name: /^Duplicate to()?$/ });
221
+ this.moveToSelectedListItems = page.getByRole('button', { name: /^Move to()?$/ });
222
+ this.trashSelectedListItems = page.getByRole('button', { name: /^Trash()?$/ });
216
223
  this.modalContent = page.locator('umb-tree-picker-modal');
217
- this.trashBtn = page.getByLabel(/^Trash(\.\.\.)?$/);
224
+ this.trashBtn = page.getByLabel(/^Trash()?$/);
218
225
  this.exactTrashBtn = page.getByRole('button', { name: 'Trash', exact: true });
219
226
  this.documentListView = page.locator('umb-document-table-collection-view');
220
227
  this.documentGridView = page.locator('umb-document-grid-collection-view');
@@ -229,7 +236,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
229
236
  this.duplicateBtn = page.getByLabel('Duplicate', { exact: true });
230
237
  this.contentTreeRefreshBtn = page.locator('#header').getByLabel('#actions_refreshNode');
231
238
  this.sortChildrenBtn = page.getByRole('button', { name: 'Sort children' });
232
- this.rollbackBtn = page.getByRole('button', { name: 'Rollback' });
239
+ this.rollbackBtn = page.getByRole('button', { name: 'Rollback', exact: true });
233
240
  this.rollbackContainerBtn = this.container.getByLabel('Rollback');
234
241
  this.publicAccessBtn = page.getByRole('button', { name: 'Public Access' });
235
242
  this.uuiCheckbox = page.locator('uui-checkbox');
@@ -250,7 +257,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
250
257
  this.umbDocumentCollection = page.locator('umb-document-collection');
251
258
  this.documentTableColumnName = this.listView.locator('umb-document-table-column-name');
252
259
  //Block Grid - Block List
253
- this.addBlockElementBtn = page.locator('uui-button-group uui-button').first().locator('a#button');
260
+ this.addBlockElementBtn = page.locator('uui-button-group uui-button').first().filter({ has: page.locator('a#button') });
254
261
  this.formValidationMessage = page.locator('#splitViews umb-form-validation-message #messages');
255
262
  this.blockName = page.locator('#editor [slot="name"]');
256
263
  this.addBlockSettingsTabBtn = page.locator('umb-body-layout').getByRole('tab', { name: 'Settings' });
@@ -272,11 +279,15 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
272
279
  this.tipTapPropertyEditor = page.locator('umb-property-editor-ui-tiptap');
273
280
  this.tipTapEditor = this.tipTapPropertyEditor.locator('#editor .tiptap');
274
281
  this.uploadedSvgThumbnail = this.page.locator('umb-input-upload-field-svg img');
282
+ this.insertBlockBtn = this.page.locator('[title="Insert Block"]');
283
+ this.validationMessage = this.page.locator('umb-form-validation-message').locator('#messages');
284
+ this.blockWorkspace = page.locator('umb-block-workspace-editor');
275
285
  }
276
286
  async enterContentName(name) {
277
287
  await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
278
288
  await this.contentNameTxt.clear();
279
289
  await this.contentNameTxt.fill(name);
290
+ await (0, test_1.expect)(this.contentNameTxt).toHaveValue(name);
280
291
  }
281
292
  async clickSaveAndPublishButton() {
282
293
  await (0, test_1.expect)(this.saveAndPublishBtn).toBeVisible();
@@ -315,6 +326,10 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
315
326
  async waitForModalHidden() {
316
327
  await this.openedModal.waitFor({ state: 'hidden' });
317
328
  }
329
+ async clickSaveButtonForContent() {
330
+ await (0, test_1.expect)(this.saveContentBtn).toBeVisible();
331
+ await this.saveContentBtn.click();
332
+ }
318
333
  async enterTextstring(text) {
319
334
  await (0, test_1.expect)(this.textstringTxt).toBeVisible();
320
335
  await this.textstringTxt.clear();
@@ -455,7 +470,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
455
470
  await (0, test_1.expect)(this.documentTreeItem.locator('[label="' + parentName + '"]').getByLabel(childName)).toBeVisible({ visible: isVisible });
456
471
  }
457
472
  async removeContentPicker(contentPickerName) {
458
- const contentPickerLocator = this.page.locator('[name="' + contentPickerName + '"]');
473
+ const contentPickerLocator = this.page.locator('umb-entity-item-ref').filter({ has: this.page.locator('[name="' + contentPickerName + '"]') });
459
474
  await contentPickerLocator.hover();
460
475
  await contentPickerLocator.getByLabel('Remove').click();
461
476
  await this.clickConfirmRemoveButton();
@@ -513,7 +528,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
513
528
  await this.sidebarModal.getByText(memberName, { exact: true }).click();
514
529
  }
515
530
  async removeMemberPickerByName(memberName) {
516
- await this.page.locator('[name="' + memberName + '"]').getByLabel('Remove').click();
531
+ const mediaPickerLocator = this.page.locator('umb-entity-item-ref').filter({ has: this.page.locator('[name="' + memberName + '"]') });
532
+ await mediaPickerLocator.hover();
533
+ await mediaPickerLocator.getByLabel('Remove').click();
517
534
  await this.clickConfirmRemoveButton();
518
535
  }
519
536
  // Numeric
@@ -534,6 +551,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
534
551
  await this.enterTagTxt.press('Enter');
535
552
  }
536
553
  async removeTagByName(tagName) {
554
+ await (0, test_1.expect)(this.tagItems.filter({ hasText: tagName }).locator('svg')).toBeVisible();
537
555
  await this.tagItems.filter({ hasText: tagName }).locator('svg').click();
538
556
  }
539
557
  // Multi URL Picker
@@ -579,11 +597,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
579
597
  }
580
598
  // Upload
581
599
  async clickRemoveFilesButton() {
600
+ await (0, test_1.expect)(this.removeFilesBtn).toBeVisible();
582
601
  await this.removeFilesBtn.click();
583
602
  }
584
603
  // True/false
585
604
  async clickToggleButton() {
586
- await this.toggleBtn.click();
605
+ await (0, test_1.expect)(this.toggleBtn).toBeVisible();
606
+ await this.toggleBtn.click({ force: true });
587
607
  }
588
608
  async doesToggleHaveLabel(label) {
589
609
  return await (0, test_1.expect)(this.toggleInput).toHaveAttribute('aria-label', label);
@@ -762,6 +782,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
762
782
  const propertyLocator = this.documentWorkspace.locator(this.property).filter({ hasText: propertyName }).locator('#input');
763
783
  await (0, test_1.expect)(propertyLocator).toHaveValue(value);
764
784
  }
785
+ async clickContentTab() {
786
+ await this.splitView.getByRole('tab', { name: 'Content' }).click();
787
+ }
765
788
  async isDocumentTreeEmpty() {
766
789
  await (0, test_1.expect)(this.documentTreeItem).toHaveCount(0);
767
790
  }
@@ -892,8 +915,8 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
892
915
  async isAddBlockElementButtonVisible(isVisible = true) {
893
916
  await (0, test_1.expect)(this.addBlockElementBtn).toBeVisible({ visible: isVisible });
894
917
  }
895
- async isAddBlockElementButtonWithLabelVisible(label, isVisible = true) {
896
- await (0, test_1.expect)(this.addBlockElementBtn.getByLabel(label)).toBeVisible({ visible: isVisible });
918
+ async isAddBlockElementButtonWithLabelVisible(blockName, label, isVisible = true) {
919
+ await (0, test_1.expect)(this.property.filter({ hasText: blockName }).locator(this.addBlockElementBtn).filter({ hasText: label })).toBeVisible({ visible: isVisible });
897
920
  }
898
921
  async doesFormValidationMessageContainText(text) {
899
922
  await (0, test_1.expect)(this.formValidationMessage).toContainText(text);
@@ -956,6 +979,43 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
956
979
  await (0, test_1.expect)(property.locator(this.openActionsMenu)).toBeVisible();
957
980
  await property.locator(this.openActionsMenu).click({ force: true });
958
981
  }
982
+ async clickAddBlockGridElementWithName(elementTypeName) {
983
+ await (0, test_1.expect)(this.page.getByRole('link', { name: 'Add ' + elementTypeName, exact: true })).toBeVisible();
984
+ await this.page.getByRole('link', { name: 'Add ' + elementTypeName, exact: true }).click();
985
+ }
986
+ async clickEditBlockListEntryWithName(blockListElementName) {
987
+ await (0, test_1.expect)(this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit')).toBeVisible();
988
+ await this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit').click({ force: true });
989
+ }
990
+ async clickSelectBlockElementWithName(elementTypeName) {
991
+ await (0, test_1.expect)(this.page.getByRole('button', { name: elementTypeName, exact: true })).toBeVisible();
992
+ await this.page.getByRole('button', { name: elementTypeName, exact: true }).click();
993
+ }
994
+ async clickSelectBlockElementInAreaWithName(elementTypeName) {
995
+ await (0, test_1.expect)(this.page.getByRole('link', { name: elementTypeName, exact: true })).toBeVisible();
996
+ await this.page.getByRole('link', { name: elementTypeName, exact: true }).click();
997
+ }
998
+ async clickBlockElementWithName(elementTypeName) {
999
+ await (0, test_1.expect)(this.page.getByRole('link', { name: elementTypeName, exact: true })).toBeVisible();
1000
+ await this.page.getByRole('link', { name: elementTypeName, exact: true }).click({ force: true });
1001
+ }
1002
+ async enterPropertyValue(propertyName, value) {
1003
+ const property = this.property.filter({ hasText: propertyName });
1004
+ await (0, test_1.expect)(property).toBeVisible();
1005
+ await property.locator('input').clear();
1006
+ await property.locator('input').fill(value);
1007
+ }
1008
+ async doesPropertyContainValue(propertyName, value) {
1009
+ await (0, test_1.expect)(this.property.filter({ hasText: propertyName }).locator('input')).toHaveValue(value);
1010
+ }
1011
+ async clickCreateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
1012
+ await (0, test_1.expect)(this.blockWorkspace.filter({ hasText: 'Add ' + headlineName }).filter({ hasText: groupName }).getByLabel('Create')).toBeVisible();
1013
+ await this.blockWorkspace.filter({ hasText: 'Add ' + headlineName }).filter({ hasText: groupName }).getByLabel('Create').click();
1014
+ }
1015
+ async clickUpdateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
1016
+ await (0, test_1.expect)(this.blockWorkspace.filter({ hasText: 'Edit ' + headlineName }).filter({ hasText: groupName }).getByLabel('Update')).toBeVisible();
1017
+ await this.blockWorkspace.filter({ hasText: 'Edit ' + headlineName }).filter({ hasText: groupName }).getByLabel('Update').click();
1018
+ }
959
1019
  async clickExactCopyButton() {
960
1020
  await (0, test_1.expect)(this.exactCopyBtn).toBeVisible();
961
1021
  await this.exactCopyBtn.click();
@@ -1008,6 +1068,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
1008
1068
  async doesBlockGridPropertyHaveBlockAmount(groupName, propertyName, amount) {
1009
1069
  await (0, test_1.expect)(this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockGridEntry)).toHaveCount(amount);
1010
1070
  }
1071
+ async doesPropertyContainValidationMessage(groupName, propertyName, message) {
1072
+ await (0, test_1.expect)(this.blockWorkspaceEditTab.filter({ hasText: groupName }).locator(this.property).filter({ hasText: propertyName }).locator(this.validationMessage)).toContainText(message);
1073
+ }
1074
+ async clickInsertBlockButton() {
1075
+ await (0, test_1.expect)(this.insertBlockBtn).toBeVisible();
1076
+ await this.insertBlockBtn.click();
1077
+ }
1011
1078
  // TipTap
1012
1079
  async enterRTETipTapEditor(value) {
1013
1080
  await (0, test_1.expect)(this.tipTapEditor).toBeVisible();