@umbraco/playwright-testhelpers 17.0.0-beta.1 → 17.0.0-beta.11
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.
- package/dist/lib/helpers/ApiHelpers.d.ts +23 -13
- package/dist/lib/helpers/ApiHelpers.js +107 -49
- package/dist/lib/helpers/ApiHelpers.js.map +1 -1
- package/dist/lib/helpers/ConstantHelper.d.ts +8 -3
- package/dist/lib/helpers/ConstantHelper.js +20 -15
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +4 -3
- package/dist/lib/helpers/ContentUiHelper.js +16 -12
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +3 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +21 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.d.ts +3 -0
- package/dist/lib/helpers/DataTypeUiHelper.js +15 -2
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +3 -0
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js +6 -4
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.d.ts +1 -0
- package/dist/lib/helpers/LanguageUiHelper.js +3 -1
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginApiHelper.d.ts +7 -3
- package/dist/lib/helpers/LoginApiHelper.js +7 -5
- package/dist/lib/helpers/LoginApiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.d.ts +1 -0
- package/dist/lib/helpers/PartialViewUiHelper.js +5 -3
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +1 -0
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.d.ts +1 -0
- package/dist/lib/helpers/ScriptUiHelper.js +6 -2
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.d.ts +3 -0
- package/dist/lib/helpers/StylesheetUiHelper.js +11 -2
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +10 -1
- package/dist/lib/helpers/UiBaseLocators.js +42 -12
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserApiHelper.d.ts +6 -2
- package/dist/lib/helpers/UserApiHelper.js +1 -1
- package/dist/lib/helpers/UserApiHelper.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.d.ts +0 -1
- package/dist/lib/helpers/UserUiHelper.js +0 -2
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
6
6
|
private readonly publishBtn;
|
|
7
7
|
private readonly unpublishBtn;
|
|
8
8
|
private readonly actionMenuForContentBtn;
|
|
9
|
-
private readonly openedModal;
|
|
10
9
|
private readonly textstringTxt;
|
|
11
10
|
private readonly infoTab;
|
|
12
11
|
private readonly linkContent;
|
|
@@ -50,8 +49,6 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
50
49
|
private readonly documentTypeWorkspace;
|
|
51
50
|
private readonly addMultipleTextStringBtn;
|
|
52
51
|
private readonly multipleTextStringValueTxt;
|
|
53
|
-
private readonly markdownTxt;
|
|
54
|
-
private readonly codeEditorTxt;
|
|
55
52
|
private readonly sliderInput;
|
|
56
53
|
private readonly tabItems;
|
|
57
54
|
private readonly documentWorkspace;
|
|
@@ -170,6 +167,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
170
167
|
private readonly treePickerSearchTxt;
|
|
171
168
|
private readonly mediaPickerSearchTxt;
|
|
172
169
|
private readonly memberPickerSearchTxt;
|
|
170
|
+
private readonly documentCreateOptionsModal;
|
|
173
171
|
constructor(page: Page);
|
|
174
172
|
enterContentName(name: string): Promise<void>;
|
|
175
173
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -429,4 +427,7 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
429
427
|
enterSearchKeywordInMediaPickerModal(keyword: string): Promise<void>;
|
|
430
428
|
enterSearchKeywordInMemberPickerModal(keyword: string): Promise<void>;
|
|
431
429
|
isContentNameReadOnly(): Promise<void>;
|
|
430
|
+
isContentWithNameVisibleInList(contentName: string, isVisible?: boolean): Promise<void>;
|
|
431
|
+
selectDocumentBlueprintWithName(blueprintName: string): Promise<void>;
|
|
432
|
+
doesDocumentModalHaveText(text: string): Promise<void>;
|
|
432
433
|
}
|
|
@@ -10,7 +10,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
10
10
|
publishBtn;
|
|
11
11
|
unpublishBtn;
|
|
12
12
|
actionMenuForContentBtn;
|
|
13
|
-
openedModal;
|
|
14
13
|
textstringTxt;
|
|
15
14
|
infoTab;
|
|
16
15
|
linkContent;
|
|
@@ -54,8 +53,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
54
53
|
documentTypeWorkspace;
|
|
55
54
|
addMultipleTextStringBtn;
|
|
56
55
|
multipleTextStringValueTxt;
|
|
57
|
-
markdownTxt;
|
|
58
|
-
codeEditorTxt;
|
|
59
56
|
sliderInput;
|
|
60
57
|
tabItems;
|
|
61
58
|
documentWorkspace;
|
|
@@ -174,6 +171,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
174
171
|
treePickerSearchTxt;
|
|
175
172
|
mediaPickerSearchTxt;
|
|
176
173
|
memberPickerSearchTxt;
|
|
174
|
+
documentCreateOptionsModal;
|
|
177
175
|
constructor(page) {
|
|
178
176
|
super(page);
|
|
179
177
|
this.saveContentBtn = page.getByTestId('workspace-action:Umb.WorkspaceAction.Document.Save');
|
|
@@ -184,7 +182,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
184
182
|
this.publishBtn = page.getByLabel(/^Publish(…)?$/);
|
|
185
183
|
this.unpublishBtn = page.getByLabel(/^Unpublish(…)?$/);
|
|
186
184
|
this.actionMenuForContentBtn = page.locator('#header').getByTestId('open-dropdown');
|
|
187
|
-
this.openedModal = page.locator('uui-modal-container[backdrop]');
|
|
188
185
|
this.textstringTxt = page.locator('umb-property-editor-ui-text-box #input');
|
|
189
186
|
this.reloadChildrenThreeDotsBtn = page.getByRole('button', { name: 'Reload children…' });
|
|
190
187
|
this.contentTree = page.locator('umb-tree[alias="Umb.Tree.Document"]');
|
|
@@ -211,8 +208,6 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
211
208
|
this.documentTypeWorkspace = this.sidebarModal.locator('umb-document-type-workspace-editor');
|
|
212
209
|
this.addMultipleTextStringBtn = page.locator('umb-input-multiple-text-string').getByLabel('Add');
|
|
213
210
|
this.multipleTextStringValueTxt = page.locator('umb-input-multiple-text-string').getByLabel('Value');
|
|
214
|
-
this.markdownTxt = page.locator('umb-input-markdown textarea');
|
|
215
|
-
this.codeEditorTxt = page.locator('umb-code-editor textarea');
|
|
216
211
|
this.sliderInput = page.locator('umb-property-editor-ui-slider #input');
|
|
217
212
|
this.tabItems = page.locator('uui-tab');
|
|
218
213
|
this.documentWorkspace = page.locator('umb-document-workspace-editor');
|
|
@@ -234,6 +229,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
234
229
|
this.editDocumentTypeBtn = this.generalItem.filter({ hasText: 'Document Type' }).locator('#button');
|
|
235
230
|
this.addTemplateBtn = this.generalItem.filter({ hasText: 'Template' }).locator('#button');
|
|
236
231
|
this.id = this.generalItem.filter({ hasText: 'Id' }).locator('span');
|
|
232
|
+
this.documentCreateOptionsModal = page.locator('umb-document-create-options-modal');
|
|
237
233
|
// Culture and Hostname
|
|
238
234
|
this.cultureAndHostnamesBtn = page.getByLabel(/^Culture and Hostnames(…)?$/);
|
|
239
235
|
this.cultureLanguageDropdownBox = page.locator('[headline="Culture"]').getByLabel('combobox-input');
|
|
@@ -315,7 +311,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
315
311
|
this.tipTapPropertyEditor = page.locator('umb-property-editor-ui-tiptap');
|
|
316
312
|
this.tipTapEditor = this.tipTapPropertyEditor.locator('#editor .tiptap');
|
|
317
313
|
this.uploadedSvgThumbnail = page.locator('umb-input-upload-field-svg img');
|
|
318
|
-
this.insertBlockBtn = page.
|
|
314
|
+
this.insertBlockBtn = page.getByTestId('action:tiptap-toolbar:Umb.Tiptap.Toolbar.BlockPicker');
|
|
319
315
|
this.blockWorkspace = page.locator('umb-block-workspace-editor');
|
|
320
316
|
this.tiptapInput = page.locator('umb-input-tiptap');
|
|
321
317
|
this.rteBlockInline = page.locator('umb-rte-block-inline');
|
|
@@ -731,13 +727,11 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
731
727
|
}
|
|
732
728
|
// Code Editor
|
|
733
729
|
async enterCodeEditorValue(value) {
|
|
734
|
-
await this.
|
|
735
|
-
await this.codeEditorTxt.fill(value);
|
|
730
|
+
await this.enterMonacoEditorValue(value);
|
|
736
731
|
}
|
|
737
732
|
// Markdown Editor
|
|
738
733
|
async enterMarkdownEditorValue(value) {
|
|
739
|
-
await this.
|
|
740
|
-
await this.markdownTxt.fill(value);
|
|
734
|
+
await this.enterMonacoEditorValue(value);
|
|
741
735
|
}
|
|
742
736
|
// Slider
|
|
743
737
|
async changeSliderValue(value) {
|
|
@@ -747,7 +741,7 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
747
741
|
return (0, test_1.expect)(this.sidebarModal.getByText(contentName)).toBeVisible({ visible: isVisible });
|
|
748
742
|
}
|
|
749
743
|
async doesModalHaveText(text) {
|
|
750
|
-
return (0, test_1.expect)(this.
|
|
744
|
+
return (0, test_1.expect)(this.openedModal).toContainText(text);
|
|
751
745
|
}
|
|
752
746
|
// Collection tab
|
|
753
747
|
async isTabNameVisible(tabName) {
|
|
@@ -1456,6 +1450,16 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1456
1450
|
async isContentNameReadOnly() {
|
|
1457
1451
|
await (0, test_1.expect)(this.contentNameTxt).toHaveAttribute('readonly');
|
|
1458
1452
|
}
|
|
1453
|
+
async isContentWithNameVisibleInList(contentName, isVisible = true) {
|
|
1454
|
+
await (0, test_1.expect)(this.documentTableColumnName.filter({ hasText: contentName })).toBeVisible({ visible: isVisible });
|
|
1455
|
+
}
|
|
1456
|
+
async selectDocumentBlueprintWithName(blueprintName) {
|
|
1457
|
+
await (0, test_1.expect)(this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName })).toBeVisible();
|
|
1458
|
+
await this.documentCreateOptionsModal.locator('uui-menu-item', { hasText: blueprintName }).click();
|
|
1459
|
+
}
|
|
1460
|
+
async doesDocumentModalHaveText(text) {
|
|
1461
|
+
await (0, test_1.expect)(this.documentCreateOptionsModal).toContainText(text);
|
|
1462
|
+
}
|
|
1459
1463
|
}
|
|
1460
1464
|
exports.ContentUiHelper = ContentUiHelper;
|
|
1461
1465
|
//# sourceMappingURL=ContentUiHelper.js.map
|