@umbraco/playwright-testhelpers 15.0.18 → 15.0.20
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/ConstantHelper.d.ts +1 -0
- package/dist/lib/helpers/ConstantHelper.js +1 -0
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +14 -0
- package/dist/lib/helpers/ContentUiHelper.js +50 -0
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +2 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +40 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.d.ts +2 -0
- package/dist/lib/helpers/DataTypeUiHelper.js +7 -1
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeApiHelper.d.ts +2 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js +47 -0
- package/dist/lib/helpers/DocumentTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +2 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js +6 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/MediaTypeUiHelper.d.ts +2 -0
- package/dist/lib/helpers/MediaTypeUiHelper.js +7 -1
- package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/NotificationConstantHelper.d.ts +3 -0
- package/dist/lib/helpers/NotificationConstantHelper.js +4 -1
- package/dist/lib/helpers/NotificationConstantHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +11 -2
- package/dist/lib/helpers/UiBaseLocators.js +42 -4
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -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;
|
|
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,9 @@ 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;
|
|
134
137
|
constructor(page: Page);
|
|
135
138
|
enterContentName(name: string): Promise<void>;
|
|
136
139
|
clickSaveAndPublishButton(): Promise<void>;
|
|
@@ -292,6 +295,15 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
292
295
|
clickCopyBlockGridBlockButton(groupName: string, propertyName: string, blockName: string, index?: number): Promise<void>;
|
|
293
296
|
clickPasteFromClipboardButtonForProperty(groupName: string, propertyName: string): Promise<void>;
|
|
294
297
|
clickActionsMenuForProperty(groupName: string, propertyName: string): Promise<void>;
|
|
298
|
+
clickAddBlockGridElementWithName(elementTypeName: string): Promise<void>;
|
|
299
|
+
clickEditBlockListEntryWithName(blockListElementName: string): Promise<void>;
|
|
300
|
+
clickSelectBlockElementWithName(elementTypeName: string): Promise<void>;
|
|
301
|
+
clickSelectBlockElementInAreaWithName(elementTypeName: string): Promise<void>;
|
|
302
|
+
clickBlockElementWithName(elementTypeName: string): Promise<void>;
|
|
303
|
+
enterPropertyValue(propertyName: string, value: string): Promise<void>;
|
|
304
|
+
doesPropertyContainValue(propertyName: string, value: string): Promise<void>;
|
|
305
|
+
clickCreateButtonForModalWithElementTypeNameAndGroupName(headlineName: string, groupName: string): Promise<void>;
|
|
306
|
+
clickUpdateButtonForModalWithElementTypeNameAndGroupName(headlineName: string, groupName: string): Promise<void>;
|
|
295
307
|
clickExactCopyButton(): Promise<void>;
|
|
296
308
|
clickExactReplaceButton(): Promise<void>;
|
|
297
309
|
doesClipboardHaveCopiedBlockWithName(contentName: string, propertyName: string, blockName: string, index?: number): Promise<void>;
|
|
@@ -306,6 +318,8 @@ export declare class ContentUiHelper extends UiBaseLocators {
|
|
|
306
318
|
clickPasteButton(): Promise<void>;
|
|
307
319
|
doesBlockListPropertyHaveBlockAmount(groupName: string, propertyName: string, amount: number): Promise<void>;
|
|
308
320
|
doesBlockGridPropertyHaveBlockAmount(groupName: string, propertyName: string, amount: number): Promise<void>;
|
|
321
|
+
doesPropertyContainValidationMessage(groupName: string, propertyName: string, message: string): Promise<void>;
|
|
322
|
+
clickInsertBlockButton(): Promise<void>;
|
|
309
323
|
enterRTETipTapEditor(value: string): Promise<void>;
|
|
310
324
|
clickTipTapToolbarIconWithTitle(iconTitle: string): Promise<void>;
|
|
311
325
|
doesUploadedSvgThumbnailHaveSrc(imageSrc: string): Promise<void>;
|
|
@@ -135,6 +135,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
135
135
|
replaceExactBtn;
|
|
136
136
|
clipboardEntryPicker;
|
|
137
137
|
blockWorkspaceEditTab;
|
|
138
|
+
insertBlockBtn;
|
|
139
|
+
validationMessage;
|
|
140
|
+
blockWorkspace;
|
|
138
141
|
constructor(page) {
|
|
139
142
|
super(page);
|
|
140
143
|
this.closeBtn = page.getByRole('button', { name: 'Close', exact: true });
|
|
@@ -272,6 +275,9 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
272
275
|
this.tipTapPropertyEditor = page.locator('umb-property-editor-ui-tiptap');
|
|
273
276
|
this.tipTapEditor = this.tipTapPropertyEditor.locator('#editor .tiptap');
|
|
274
277
|
this.uploadedSvgThumbnail = this.page.locator('umb-input-upload-field-svg img');
|
|
278
|
+
this.insertBlockBtn = this.page.locator('[title="Insert Block"]');
|
|
279
|
+
this.validationMessage = this.page.locator('umb-form-validation-message').locator('#messages');
|
|
280
|
+
this.blockWorkspace = page.locator('umb-block-workspace-editor');
|
|
275
281
|
}
|
|
276
282
|
async enterContentName(name) {
|
|
277
283
|
await (0, test_1.expect)(this.contentNameTxt).toBeVisible();
|
|
@@ -956,6 +962,43 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
956
962
|
await (0, test_1.expect)(property.locator(this.openActionsMenu)).toBeVisible();
|
|
957
963
|
await property.locator(this.openActionsMenu).click({ force: true });
|
|
958
964
|
}
|
|
965
|
+
async clickAddBlockGridElementWithName(elementTypeName) {
|
|
966
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: 'Add ' + elementTypeName, exact: true })).toBeVisible();
|
|
967
|
+
await this.page.getByRole('link', { name: 'Add ' + elementTypeName, exact: true }).click();
|
|
968
|
+
}
|
|
969
|
+
async clickEditBlockListEntryWithName(blockListElementName) {
|
|
970
|
+
await (0, test_1.expect)(this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit')).toBeVisible();
|
|
971
|
+
await this.blockListEntry.filter({ hasText: blockListElementName }).getByLabel('edit').click({ force: true });
|
|
972
|
+
}
|
|
973
|
+
async clickSelectBlockElementWithName(elementTypeName) {
|
|
974
|
+
await (0, test_1.expect)(this.page.getByRole('button', { name: elementTypeName, exact: true })).toBeVisible();
|
|
975
|
+
await this.page.getByRole('button', { name: elementTypeName, exact: true }).click();
|
|
976
|
+
}
|
|
977
|
+
async clickSelectBlockElementInAreaWithName(elementTypeName) {
|
|
978
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: elementTypeName, exact: true })).toBeVisible();
|
|
979
|
+
await this.page.getByRole('link', { name: elementTypeName, exact: true }).click();
|
|
980
|
+
}
|
|
981
|
+
async clickBlockElementWithName(elementTypeName) {
|
|
982
|
+
await (0, test_1.expect)(this.page.getByRole('link', { name: elementTypeName, exact: true })).toBeVisible();
|
|
983
|
+
await this.page.getByRole('link', { name: elementTypeName, exact: true }).click({ force: true });
|
|
984
|
+
}
|
|
985
|
+
async enterPropertyValue(propertyName, value) {
|
|
986
|
+
const property = this.property.filter({ hasText: propertyName });
|
|
987
|
+
await (0, test_1.expect)(property).toBeVisible();
|
|
988
|
+
await property.locator('input').clear();
|
|
989
|
+
await property.locator('input').fill(value);
|
|
990
|
+
}
|
|
991
|
+
async doesPropertyContainValue(propertyName, value) {
|
|
992
|
+
await (0, test_1.expect)(this.property.filter({ hasText: propertyName }).locator('input')).toHaveValue(value);
|
|
993
|
+
}
|
|
994
|
+
async clickCreateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
|
|
995
|
+
await (0, test_1.expect)(this.blockWorkspace.filter({ hasText: 'Add ' + headlineName }).filter({ hasText: groupName }).getByLabel('Create')).toBeVisible();
|
|
996
|
+
await this.blockWorkspace.filter({ hasText: 'Add ' + headlineName }).filter({ hasText: groupName }).getByLabel('Create').click();
|
|
997
|
+
}
|
|
998
|
+
async clickUpdateButtonForModalWithElementTypeNameAndGroupName(headlineName, groupName) {
|
|
999
|
+
await (0, test_1.expect)(this.blockWorkspace.filter({ hasText: 'Edit ' + headlineName }).filter({ hasText: groupName }).getByLabel('Update')).toBeVisible();
|
|
1000
|
+
await this.blockWorkspace.filter({ hasText: 'Edit ' + headlineName }).filter({ hasText: groupName }).getByLabel('Update').click();
|
|
1001
|
+
}
|
|
959
1002
|
async clickExactCopyButton() {
|
|
960
1003
|
await (0, test_1.expect)(this.exactCopyBtn).toBeVisible();
|
|
961
1004
|
await this.exactCopyBtn.click();
|
|
@@ -1008,6 +1051,13 @@ class ContentUiHelper extends UiBaseLocators_1.UiBaseLocators {
|
|
|
1008
1051
|
async doesBlockGridPropertyHaveBlockAmount(groupName, propertyName, amount) {
|
|
1009
1052
|
await (0, test_1.expect)(this.workspaceEditTab.filter({ hasText: groupName }).locator(this.workspaceEditProperties).filter({ hasText: propertyName }).locator(this.blockGridEntry)).toHaveCount(amount);
|
|
1010
1053
|
}
|
|
1054
|
+
async doesPropertyContainValidationMessage(groupName, propertyName, message) {
|
|
1055
|
+
await (0, test_1.expect)(this.blockWorkspaceEditTab.filter({ hasText: groupName }).locator(this.property).filter({ hasText: propertyName }).locator(this.validationMessage)).toContainText(message);
|
|
1056
|
+
}
|
|
1057
|
+
async clickInsertBlockButton() {
|
|
1058
|
+
await (0, test_1.expect)(this.insertBlockBtn).toBeVisible();
|
|
1059
|
+
await this.insertBlockBtn.click();
|
|
1060
|
+
}
|
|
1011
1061
|
// TipTap
|
|
1012
1062
|
async enterRTETipTapEditor(value) {
|
|
1013
1063
|
await (0, test_1.expect)(this.tipTapEditor).toBeVisible();
|