@umbraco/playwright-testhelpers 2.0.0-beta.22 → 2.0.0-beta.24

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 (39) hide show
  1. package/dist/lib/helpers/ApiHelpers.d.ts +2 -2
  2. package/dist/lib/helpers/ApiHelpers.js +1 -1
  3. package/dist/lib/helpers/ApiHelpers.js.map +1 -1
  4. package/dist/lib/helpers/DataTypeUiHelper.d.ts +0 -2
  5. package/dist/lib/helpers/DataTypeUiHelper.js +0 -5
  6. package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
  7. package/dist/lib/helpers/DocumentApiHelper.js +1 -1
  8. package/dist/lib/helpers/DocumentApiHelper.js.map +1 -1
  9. package/dist/lib/helpers/LanguageApiHelper.d.ts +3 -1
  10. package/dist/lib/helpers/LanguageApiHelper.js +16 -3
  11. package/dist/lib/helpers/LanguageApiHelper.js.map +1 -1
  12. package/dist/lib/helpers/MediaTypeApiHelper.d.ts +8 -2
  13. package/dist/lib/helpers/MediaTypeApiHelper.js +91 -10
  14. package/dist/lib/helpers/MediaTypeApiHelper.js.map +1 -1
  15. package/dist/lib/helpers/MediaTypeUiHelper.d.ts +15 -0
  16. package/dist/lib/helpers/MediaTypeUiHelper.js +39 -0
  17. package/dist/lib/helpers/MediaTypeUiHelper.js.map +1 -0
  18. package/dist/lib/helpers/TemporaryFileApiHelper.js +4 -4
  19. package/dist/lib/helpers/TemporaryFileApiHelper.js.map +1 -1
  20. package/dist/lib/helpers/UiBaseLocators.d.ts +33 -8
  21. package/dist/lib/helpers/UiBaseLocators.js +94 -25
  22. package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
  23. package/dist/lib/helpers/UiHelpers.d.ts +6 -0
  24. package/dist/lib/helpers/UiHelpers.js +9 -0
  25. package/dist/lib/helpers/UiHelpers.js.map +1 -1
  26. package/dist/lib/helpers/UserApiHelper.d.ts +6 -2
  27. package/dist/lib/helpers/UserApiHelper.js +34 -12
  28. package/dist/lib/helpers/UserApiHelper.js.map +1 -1
  29. package/dist/lib/helpers/UserGroupApiHelper.d.ts +5 -3
  30. package/dist/lib/helpers/UserGroupApiHelper.js +20 -19
  31. package/dist/lib/helpers/UserGroupApiHelper.js.map +1 -1
  32. package/dist/lib/helpers/UserGroupUiHelper.d.ts +20 -0
  33. package/dist/lib/helpers/UserGroupUiHelper.js +56 -0
  34. package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -0
  35. package/dist/lib/helpers/UserUiHelper.d.ts +41 -0
  36. package/dist/lib/helpers/UserUiHelper.js +116 -0
  37. package/dist/lib/helpers/UserUiHelper.js.map +1 -0
  38. package/dist/tsconfig.tsbuildinfo +1 -1
  39. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ import { UiBaseLocators } from "./UiBaseLocators";
2
+ import { Page } from "@playwright/test";
3
+ export declare class MediaTypeUiHelper extends UiBaseLocators {
4
+ private readonly newMediaTypeThreeDotsBtn;
5
+ private readonly mediaTypeNameTxt;
6
+ private readonly mediaEditPropertyWorkspace;
7
+ constructor(page: Page);
8
+ clickActionsMenuForMediaType(name: string): Promise<void>;
9
+ clickActionsMenuAtRoot(): Promise<void>;
10
+ clickRootFolderCaretButton(): Promise<void>;
11
+ clickNewMediaTypeButton(): Promise<void>;
12
+ goToMediaType(mediaTypeName: string): Promise<void>;
13
+ enterMediaTypeName(name: string): Promise<void>;
14
+ enterDescriptionForPropertyEditorWithName(propertyEditorName: string, description: string): Promise<void>;
15
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MediaTypeUiHelper = void 0;
4
+ const UiBaseLocators_1 = require("./UiBaseLocators");
5
+ class MediaTypeUiHelper extends UiBaseLocators_1.UiBaseLocators {
6
+ newMediaTypeThreeDotsBtn;
7
+ mediaTypeNameTxt;
8
+ mediaEditPropertyWorkspace;
9
+ constructor(page) {
10
+ super(page);
11
+ this.newMediaTypeThreeDotsBtn = page.getByLabel('New Media Type...');
12
+ this.mediaTypeNameTxt = page.getByLabel('name', { exact: true });
13
+ this.mediaEditPropertyWorkspace = page.locator('umb-media-type-workspace-view-edit-property');
14
+ }
15
+ async clickActionsMenuForMediaType(name) {
16
+ await this.clickActionsMenuForName(name);
17
+ }
18
+ async clickActionsMenuAtRoot() {
19
+ await this.clickActionsMenuForMediaType("Media Types");
20
+ }
21
+ async clickRootFolderCaretButton() {
22
+ await this.clickCaretButtonForName("Media Types");
23
+ }
24
+ async clickNewMediaTypeButton() {
25
+ await this.newMediaTypeThreeDotsBtn.click();
26
+ }
27
+ async goToMediaType(mediaTypeName) {
28
+ await this.clickRootFolderCaretButton();
29
+ await this.page.getByLabel(mediaTypeName).click();
30
+ }
31
+ async enterMediaTypeName(name) {
32
+ await this.mediaTypeNameTxt.fill(name);
33
+ }
34
+ async enterDescriptionForPropertyEditorWithName(propertyEditorName, description) {
35
+ await this.mediaEditPropertyWorkspace.filter({ hasText: propertyEditorName }).getByLabel('description').fill(description);
36
+ }
37
+ }
38
+ exports.MediaTypeUiHelper = MediaTypeUiHelper;
39
+ //# sourceMappingURL=MediaTypeUiHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaTypeUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/MediaTypeUiHelper.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAGhD,MAAa,iBAAkB,SAAQ,+BAAc;IAClC,wBAAwB,CAAU;IAClC,gBAAgB,CAAU;IAC1B,0BAA0B,CAAU;IAErD,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/D,IAAI,CAAC,0BAA0B,GAAG,IAAI,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;IAChG,CAAC;IAED,KAAK,CAAC,4BAA4B,CAAC,IAAY;QAC7C,MAAM,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,KAAK,CAAC,sBAAsB;QAC1B,MAAM,IAAI,CAAC,4BAA4B,CAAC,aAAa,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,0BAA0B;QAC9B,MAAM,IAAI,CAAC,uBAAuB,CAAC,aAAa,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,MAAM,IAAI,CAAC,wBAAwB,CAAC,KAAK,EAAE,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,aAAqB;QACvC,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;QACxC,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,KAAK,EAAE,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,kBAAkB,CAAC,IAAY;QACnC,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,yCAAyC,CAAC,kBAA0B,EAAE,WAAmB;QAC7F,MAAM,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,EAAC,OAAO,EAAE,kBAAkB,EAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1H,CAAC;CACF;AAxCD,8CAwCC","sourcesContent":["import {UiBaseLocators} from \"./UiBaseLocators\";\nimport {Locator, Page} from \"@playwright/test\";\n\nexport class MediaTypeUiHelper extends UiBaseLocators {\n private readonly newMediaTypeThreeDotsBtn: Locator;\n private readonly mediaTypeNameTxt: Locator;\n private readonly mediaEditPropertyWorkspace: Locator;\n\n constructor(page: Page) {\n super(page);\n this.newMediaTypeThreeDotsBtn = page.getByLabel('New Media Type...');\n this.mediaTypeNameTxt = page.getByLabel('name', {exact: true});\n this.mediaEditPropertyWorkspace = page.locator('umb-media-type-workspace-view-edit-property');\n }\n\n async clickActionsMenuForMediaType(name: string) {\n await this.clickActionsMenuForName(name);\n }\n\n async clickActionsMenuAtRoot() {\n await this.clickActionsMenuForMediaType(\"Media Types\");\n }\n\n async clickRootFolderCaretButton() {\n await this.clickCaretButtonForName(\"Media Types\");\n }\n\n async clickNewMediaTypeButton() {\n await this.newMediaTypeThreeDotsBtn.click();\n }\n \n async goToMediaType(mediaTypeName: string) {\n await this.clickRootFolderCaretButton();\n await this.page.getByLabel(mediaTypeName).click();\n }\n\n async enterMediaTypeName(name: string) {\n await this.mediaTypeNameTxt.fill(name);\n }\n\n async enterDescriptionForPropertyEditorWithName(propertyEditorName: string, description: string) {\n await this.mediaEditPropertyWorkspace.filter({hasText: propertyEditorName}).getByLabel('description').fill(description);\n }\n}"]}
@@ -7,14 +7,14 @@ class TemporaryFileApiHelper {
7
7
  this.api = api;
8
8
  }
9
9
  async exists(id) {
10
- const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);
10
+ const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);
11
11
  return response.status() === 200;
12
12
  }
13
13
  async create(id, name, mimeType, filePath) {
14
- return this.api.postMultiPartForm(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile', id, name, mimeType, filePath);
14
+ return this.api.postMultiPartForm(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file', id, name, mimeType, filePath);
15
15
  }
16
16
  async get(id) {
17
- const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);
17
+ const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);
18
18
  const json = await response.json();
19
19
  if (json !== null) {
20
20
  return json;
@@ -22,7 +22,7 @@ class TemporaryFileApiHelper {
22
22
  return null;
23
23
  }
24
24
  async delete(id) {
25
- return await this.api.delete(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);
25
+ return await this.api.delete(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);
26
26
  }
27
27
  }
28
28
  exports.TemporaryFileApiHelper = TemporaryFileApiHelper;
@@ -1 +1 @@
1
- {"version":3,"file":"TemporaryFileApiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/TemporaryFileApiHelper.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IACjC,GAAG,CAAY;IAEf,YAAY,GAAe;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,2CAA2C,GAAG,EAAE,CAAC,CAAC;QACzG,OAAO,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAY,EAAE,QAAQ,EAAE,QAAQ;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,0CAA0C,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IAChI,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,2CAA2C,GAAG,EAAE,CAAC,CAAC;QACzG,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEnC,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,2CAA2C,GAAG,EAAE,CAAC,CAAC;IACpG,CAAC;CACF;AA7BD,wDA6BC","sourcesContent":["import {ApiHelpers} from \"./ApiHelpers\";\n\nexport class TemporaryFileApiHelper {\n api: ApiHelpers\n\n constructor(api: ApiHelpers) {\n this.api = api;\n }\n\n async exists(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);\n return response.status() === 200;\n }\n\n async create(id: string, name: string, mimeType, filePath) {\n return this.api.postMultiPartForm(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile', id, name, mimeType, filePath)\n }\n\n async get(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);\n const json = await response.json();\n\n if (json !== null) {\n return json;\n }\n return null;\n }\n\n async delete(id: string) {\n return await this.api.delete(this.api.baseUrl + '/umbraco/management/api/v1/temporaryfile/' + id);\n }\n}"]}
1
+ {"version":3,"file":"TemporaryFileApiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/TemporaryFileApiHelper.ts"],"names":[],"mappings":";;;AAEA,MAAa,sBAAsB;IACjC,GAAG,CAAY;IAEf,YAAY,GAAe;QACzB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,4CAA4C,GAAG,EAAE,CAAC,CAAC;QAC1G,OAAO,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAY,EAAE,QAAQ,EAAE,QAAQ;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,2CAA2C,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACjI,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,4CAA4C,GAAG,EAAE,CAAC,CAAC;QAC1G,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QAEnC,IAAI,IAAI,KAAK,IAAI,EAAE;YACjB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,GAAG,4CAA4C,GAAG,EAAE,CAAC,CAAC;IACrG,CAAC;CACF;AA7BD,wDA6BC","sourcesContent":["import {ApiHelpers} from \"./ApiHelpers\";\n\nexport class TemporaryFileApiHelper {\n api: ApiHelpers\n\n constructor(api: ApiHelpers) {\n this.api = api;\n }\n\n async exists(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);\n return response.status() === 200;\n }\n\n async create(id: string, name: string, mimeType, filePath) {\n return this.api.postMultiPartForm(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file', id, name, mimeType, filePath)\n }\n\n async get(id: string) {\n const response = await this.api.get(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);\n const json = await response.json();\n\n if (json !== null) {\n return json;\n }\n return null;\n }\n\n async delete(id: string) {\n return await this.api.delete(this.api.baseUrl + '/umbraco/management/api/v1/temporary-file/' + id);\n }\n}"]}
@@ -8,8 +8,9 @@ export declare class UiBaseLocators {
8
8
  readonly breadcrumbBtn: Locator;
9
9
  readonly deleteBtn: Locator;
10
10
  readonly confirmToDeleteBtn: Locator;
11
- readonly deleteFolderBtn: Locator;
11
+ readonly deleteLabelBtn: Locator;
12
12
  readonly deleteExactLabelBtn: Locator;
13
+ readonly deleteExactBtn: Locator;
13
14
  readonly confirmCreateFolderBtn: Locator;
14
15
  readonly dictionaryInsertItemBtn: Locator;
15
16
  readonly caretDictionaryBtn: Locator;
@@ -40,7 +41,7 @@ export declare class UiBaseLocators {
40
41
  private readonly filterChooseBtn;
41
42
  private readonly updateBtn;
42
43
  private readonly changeBtn;
43
- private readonly enterANameTxt;
44
+ private readonly propertyNameTxt;
44
45
  private readonly selectPropertyEditorBtn;
45
46
  private readonly addGroupBtn;
46
47
  private readonly iAmDoneReorderingBtn;
@@ -54,12 +55,23 @@ export declare class UiBaseLocators {
54
55
  private readonly regexTxt;
55
56
  private readonly regexMessageTxt;
56
57
  private readonly structureTabBtn;
57
- private readonly allowAsRootBtn;
58
+ private readonly allowAtRootBtn;
58
59
  private readonly addPropertyBtn;
59
- private readonly typeToFilterIconsTxt;
60
+ private readonly typeToFilterSearchTxt;
60
61
  private readonly editorSettingsBtn;
61
62
  private readonly labelOnTopBtn;
62
63
  private readonly unnamedTxt;
64
+ private readonly deleteThreeDotsBtn;
65
+ private readonly removeExactBtn;
66
+ private readonly confirmBtn;
67
+ private readonly disableBtn;
68
+ private readonly confirmDisableBtn;
69
+ private readonly enableBtn;
70
+ private readonly confirmEnableBtn;
71
+ private readonly iconBtn;
72
+ private readonly bugIconBtn;
73
+ private readonly aliasLockBtn;
74
+ private readonly aliasNameTxt;
63
75
  constructor(page: Page);
64
76
  clickActionsMenuForName(name: string): Promise<void>;
65
77
  clickCaretButtonForName(name: string): Promise<void>;
@@ -72,10 +84,13 @@ export declare class UiBaseLocators {
72
84
  clickUpdateButton(): Promise<void>;
73
85
  clickSubmitButton(): Promise<void>;
74
86
  clickChangeButton(): Promise<void>;
87
+ enterAliasName(aliasName: string): Promise<void>;
88
+ updateIcon(iconName: string): Promise<void>;
75
89
  clickTextButtonWithName(name: string): Promise<void>;
76
90
  clickSelectPropertyEditorButton(): Promise<void>;
77
91
  clickCreateFolderButton(): Promise<void>;
78
- enterAName(name: string): Promise<void>;
92
+ enterAPropertyName(name: string): Promise<void>;
93
+ clickConfirmButton(): Promise<void>;
79
94
  clickBreadcrumbButton(): Promise<void>;
80
95
  clickInsertButton(): Promise<void>;
81
96
  clickDictionaryInsertItemButton(): Promise<void>;
@@ -84,17 +99,27 @@ export declare class UiBaseLocators {
84
99
  clickConfirmToDeleteButton(): Promise<void>;
85
100
  clickDeleteFolderButton(): Promise<void>;
86
101
  clickConfirmCreateFolderButton(): Promise<void>;
102
+ clickDeleteThreeDotsButton(): Promise<void>;
103
+ clickRemoveExactButton(): Promise<void>;
104
+ clickRemoveWithName(name: string): Promise<void>;
105
+ clickDisableButton(): Promise<void>;
106
+ clickConfirmDisableButton(): Promise<void>;
107
+ clickEnableButton(): Promise<void>;
108
+ clickConfirmEnableButton(): Promise<void>;
87
109
  insertDictionaryByName(dictionaryName: string): Promise<void>;
88
110
  addQueryBuilderWithOrderByStatement(propertyAlias: string, isAscending: boolean): Promise<void>;
89
111
  addQueryBuilderWithWhereStatement(propertyAlias: string, operator: string, constrainValue: string): Promise<void>;
90
112
  waitAndSelectQueryBuilderDropDownList(option: string): Promise<void>;
91
113
  createFolder(folderName: string): Promise<void>;
114
+ deletePropertyEditor(propertyEditorName: string): Promise<void>;
92
115
  enterFolderName(folderName: string): Promise<void>;
116
+ isTextWithExactNameVisible(name: string, isVisible?: boolean): Promise<void>;
93
117
  isQueryBuilderCodeShown(code: string): Promise<void>;
94
118
  deleteFolder(): Promise<void>;
95
119
  clickDeleteExactLabel(): Promise<void>;
120
+ clickDeleteExactButton(): Promise<void>;
96
121
  isTreeItemVisible(name: string): Promise<void>;
97
- isUniqueTreeItemVisible(name: string): Promise<void>;
122
+ doesTreeItemHaveTheCorrectIcon(name: string, icon: string): Promise<void>;
98
123
  goToSection(sectionName: string): Promise<void>;
99
124
  goToSettingsTreeItem(settingsTreeItemName: string): Promise<void>;
100
125
  clickDataElement(elementName: string, options?: any): Promise<void>;
@@ -112,7 +137,7 @@ export declare class UiBaseLocators {
112
137
  enterDescription(description: string): Promise<void>;
113
138
  doesDescriptionHaveValue(value: string): Promise<void>;
114
139
  clickStructureTab(): Promise<void>;
115
- clickAllowAsRootButton(): Promise<void>;
140
+ clickAllowAtRootButton(): Promise<void>;
116
141
  clickIAmDoneReorderingButton(): Promise<void>;
117
142
  clickReorderButton(): Promise<void>;
118
143
  clickLabelOnTopButton(): Promise<void>;
@@ -123,7 +148,7 @@ export declare class UiBaseLocators {
123
148
  clickCompositionsButton(): Promise<void>;
124
149
  clickAddTabButton(): Promise<void>;
125
150
  enterTabName(tabName: string): Promise<void>;
126
- searchForPropertyEditor(propertyEditorName: string): Promise<void>;
151
+ searchForTypeToFilterValue(searchValue: string): Promise<void>;
127
152
  addPropertyEditor(propertyEditorName: string, index?: number): Promise<void>;
128
153
  updatePropertyEditor(propertyEditorName: string): Promise<void>;
129
154
  clickAddGroupButton(): Promise<void>;
@@ -12,8 +12,9 @@ class UiBaseLocators {
12
12
  breadcrumbBtn;
13
13
  deleteBtn;
14
14
  confirmToDeleteBtn;
15
- deleteFolderBtn;
15
+ deleteLabelBtn;
16
16
  deleteExactLabelBtn;
17
+ deleteExactBtn;
17
18
  confirmCreateFolderBtn;
18
19
  dictionaryInsertItemBtn;
19
20
  caretDictionaryBtn;
@@ -44,7 +45,7 @@ class UiBaseLocators {
44
45
  filterChooseBtn;
45
46
  updateBtn;
46
47
  changeBtn;
47
- enterANameTxt;
48
+ propertyNameTxt;
48
49
  selectPropertyEditorBtn;
49
50
  addGroupBtn;
50
51
  iAmDoneReorderingBtn;
@@ -58,18 +59,30 @@ class UiBaseLocators {
58
59
  regexTxt;
59
60
  regexMessageTxt;
60
61
  structureTabBtn;
61
- allowAsRootBtn;
62
+ allowAtRootBtn;
62
63
  addPropertyBtn;
63
- typeToFilterIconsTxt;
64
+ typeToFilterSearchTxt;
64
65
  editorSettingsBtn;
65
66
  labelOnTopBtn;
66
67
  unnamedTxt;
68
+ deleteThreeDotsBtn;
69
+ removeExactBtn;
70
+ confirmBtn;
71
+ disableBtn;
72
+ confirmDisableBtn;
73
+ enableBtn;
74
+ confirmEnableBtn;
75
+ iconBtn;
76
+ bugIconBtn;
77
+ aliasLockBtn;
78
+ aliasNameTxt;
67
79
  constructor(page) {
68
80
  this.page = page;
69
81
  this.saveBtn = page.getByLabel('Save', { exact: true });
70
82
  this.submitBtn = page.getByLabel('Submit');
71
83
  this.deleteExactLabelBtn = page.getByLabel('Delete', { exact: true });
72
- this.deleteFolderBtn = page.getByLabel('Delete');
84
+ this.deleteExactBtn = page.getByRole('button', { name: 'Delete', exact: true });
85
+ this.deleteLabelBtn = page.getByLabel('Delete');
73
86
  this.deleteBtn = page.getByRole('button', { name: 'Delete' });
74
87
  this.confirmToDeleteBtn = page.locator('#confirm').getByLabel('Delete');
75
88
  this.confirmCreateFolderBtn = page.locator('#confirm').getByLabel('Create Folder');
@@ -90,7 +103,7 @@ class UiBaseLocators {
90
103
  this.orderByPropertyAliasBtn = page.locator('#sort-dropdown').getByLabel('Property alias');
91
104
  this.ascendingBtn = page.locator('uui-button').filter({ hasText: 'ascending' }).locator('#button');
92
105
  this.queryBuilderShowCode = page.locator('umb-code-block');
93
- this.createThreeDotsBtn = page.getByLabel('Create...', { exact: true });
106
+ this.createThreeDotsBtn = page.getByText('Create...', { exact: true });
94
107
  this.chooseBtn = page.getByLabel('Choose', { exact: true });
95
108
  this.newFolderThreeDotsBtn = page.getByLabel('New Folder...');
96
109
  this.renameThreeDotsBtn = page.getByLabel('Rename...', { exact: true });
@@ -105,7 +118,7 @@ class UiBaseLocators {
105
118
  this.filterChooseBtn = page.locator('button').filter({ hasText: 'Choose' });
106
119
  this.updateBtn = page.getByLabel('Update');
107
120
  this.changeBtn = page.getByLabel('Change');
108
- this.enterANameTxt = page.getByRole('textbox', { name: 'Enter a name...' });
121
+ this.propertyNameTxt = page.locator('#name-input #input');
109
122
  this.selectPropertyEditorBtn = page.getByLabel('Select Property Editor');
110
123
  this.addGroupBtn = page.getByLabel('Add group', { exact: true });
111
124
  this.iAmDoneReorderingBtn = page.getByLabel('I am done reordering');
@@ -119,12 +132,23 @@ class UiBaseLocators {
119
132
  this.regexTxt = page.locator('input[name="pattern"]');
120
133
  this.regexMessageTxt = page.locator('textarea[name="pattern-message"]');
121
134
  this.structureTabBtn = page.getByRole('tab', { name: 'Structure' });
122
- this.allowAsRootBtn = page.locator('label').filter({ hasText: 'Allow as root' });
135
+ this.allowAtRootBtn = page.locator('label').filter({ hasText: 'Allow at root' });
123
136
  this.addPropertyBtn = page.getByLabel('Add property', { exact: true });
124
- this.typeToFilterIconsTxt = page.getByLabel('Type to filter icons');
137
+ this.typeToFilterSearchTxt = page.locator('[type="search"] #input');
125
138
  this.editorSettingsBtn = page.getByLabel('Editor settings');
126
139
  this.labelOnTopBtn = page.getByRole('button', { name: 'Label on top' });
127
140
  this.unnamedTxt = page.getByRole('textbox', { name: 'Unnamed' });
141
+ this.deleteThreeDotsBtn = page.locator('umb-entity-action').getByLabel('Delete...');
142
+ this.removeExactBtn = page.getByLabel('Remove', { exact: true });
143
+ this.confirmBtn = page.getByLabel('Confirm');
144
+ this.disableBtn = page.getByLabel('Disable');
145
+ this.confirmDisableBtn = page.locator('#confirm').getByLabel('Disable');
146
+ this.enableBtn = page.getByLabel('Enable');
147
+ this.confirmEnableBtn = page.locator('#confirm').getByLabel('Enable');
148
+ this.iconBtn = page.getByLabel('icon');
149
+ this.bugIconBtn = page.getByLabel('icon-bug').getByRole('img');
150
+ this.aliasLockBtn = page.locator('#name #alias-lock');
151
+ this.aliasNameTxt = page.locator('#name').getByLabel('alias');
128
152
  }
129
153
  async clickActionsMenuForName(name) {
130
154
  await this.page.locator('[label="' + name + '"] >> [label="Open actions menu"]').click({ force: true });
@@ -159,6 +183,17 @@ class UiBaseLocators {
159
183
  async clickChangeButton() {
160
184
  await this.changeBtn.click();
161
185
  }
186
+ async enterAliasName(aliasName) {
187
+ // Unlocks alias
188
+ await this.aliasLockBtn.click();
189
+ await this.aliasNameTxt.clear();
190
+ await this.aliasNameTxt.fill(aliasName);
191
+ }
192
+ async updateIcon(iconName) {
193
+ await this.iconBtn.click({ force: true });
194
+ await this.searchForTypeToFilterValue(iconName);
195
+ await this.bugIconBtn.click();
196
+ }
162
197
  async clickTextButtonWithName(name) {
163
198
  await this.page.getByText(name, { exact: true }).click();
164
199
  }
@@ -168,8 +203,11 @@ class UiBaseLocators {
168
203
  async clickCreateFolderButton() {
169
204
  await this.createFolderBtn.click();
170
205
  }
171
- async enterAName(name) {
172
- await this.enterANameTxt.fill(name);
206
+ async enterAPropertyName(name) {
207
+ await this.propertyNameTxt.fill(name);
208
+ }
209
+ async clickConfirmButton() {
210
+ await this.confirmBtn.click();
173
211
  }
174
212
  async clickBreadcrumbButton() {
175
213
  await this.breadcrumbBtn.click();
@@ -190,11 +228,32 @@ class UiBaseLocators {
190
228
  await this.confirmToDeleteBtn.click();
191
229
  }
192
230
  async clickDeleteFolderButton() {
193
- await this.deleteFolderBtn.click();
231
+ await this.deleteLabelBtn.click();
194
232
  }
195
233
  async clickConfirmCreateFolderButton() {
196
234
  await this.confirmCreateFolderBtn.click();
197
235
  }
236
+ async clickDeleteThreeDotsButton() {
237
+ await this.deleteThreeDotsBtn.click();
238
+ }
239
+ async clickRemoveExactButton() {
240
+ await this.removeExactBtn.click();
241
+ }
242
+ async clickRemoveWithName(name) {
243
+ await this.page.getByLabel('Remove ' + name).click();
244
+ }
245
+ async clickDisableButton() {
246
+ await this.disableBtn.click();
247
+ }
248
+ async clickConfirmDisableButton() {
249
+ await this.confirmDisableBtn.click();
250
+ }
251
+ async clickEnableButton() {
252
+ await this.enableBtn.click();
253
+ }
254
+ async clickConfirmEnableButton() {
255
+ await this.confirmEnableBtn.click();
256
+ }
198
257
  async insertDictionaryByName(dictionaryName) {
199
258
  await this.insertValueBtn.click();
200
259
  await this.clickDictionaryInsertItemButton();
@@ -240,14 +299,21 @@ class UiBaseLocators {
240
299
  async createFolder(folderName) {
241
300
  await this.clickCreateThreeDotsButton();
242
301
  await this.clickNewFolderThreeDotsButton();
243
- await this.folderNameTxt.waitFor({ state: 'visible' });
244
- await this.folderNameTxt.fill(folderName);
302
+ await this.enterFolderName(folderName);
245
303
  await this.clickConfirmCreateFolderButton();
246
304
  }
305
+ async deletePropertyEditor(propertyEditorName) {
306
+ // We need to hover over the property to be able to see the delete button
307
+ await this.page.locator('uui-button').filter({ hasText: propertyEditorName }).getByLabel('Editor settings').hover();
308
+ await this.deleteLabelBtn.click({ force: true });
309
+ }
247
310
  async enterFolderName(folderName) {
248
311
  await this.folderNameTxt.clear();
249
312
  await this.folderNameTxt.fill(folderName);
250
313
  }
314
+ async isTextWithExactNameVisible(name, isVisible = true) {
315
+ return (0, test_1.expect)(this.page.getByText(name, { exact: true })).toBeVisible({ visible: isVisible });
316
+ }
251
317
  async isQueryBuilderCodeShown(code) {
252
318
  await this.queryBuilderShowCode.click();
253
319
  await (0, test_1.expect)(this.queryBuilderShowCode).toContainText(code);
@@ -259,11 +325,14 @@ class UiBaseLocators {
259
325
  async clickDeleteExactLabel() {
260
326
  await this.deleteExactLabelBtn.click();
261
327
  }
328
+ async clickDeleteExactButton() {
329
+ await this.deleteExactBtn.click();
330
+ }
262
331
  async isTreeItemVisible(name) {
263
332
  await (0, test_1.expect)(this.page.locator('umb-tree-item').locator('[label="' + name + '"] ')).toBeVisible();
264
333
  }
265
- async isUniqueTreeItemVisible(name) {
266
- return await (0, test_1.expect)(this.page.locator('umb-unique-tree-item').locator('[label="' + name + '"] ')).toBeVisible();
334
+ async doesTreeItemHaveTheCorrectIcon(name, icon) {
335
+ return await (0, test_1.expect)(this.page.locator('umb-tree-item').filter({ hasText: name }).locator('umb-icon').locator('[name="' + icon + '"]')).toBeVisible();
267
336
  }
268
337
  async goToSection(sectionName) {
269
338
  for (let section in ConstantHelper_1.ConstantHelper.sections) {
@@ -322,8 +391,8 @@ class UiBaseLocators {
322
391
  await this.page.waitForTimeout(200);
323
392
  await this.structureTabBtn.click({ force: true });
324
393
  }
325
- async clickAllowAsRootButton() {
326
- await this.allowAsRootBtn.click();
394
+ async clickAllowAtRootButton() {
395
+ await this.allowAtRootBtn.click();
327
396
  }
328
397
  async clickIAmDoneReorderingButton() {
329
398
  await this.iAmDoneReorderingBtn.click();
@@ -355,25 +424,25 @@ class UiBaseLocators {
355
424
  async enterTabName(tabName) {
356
425
  await this.unnamedTxt.fill(tabName);
357
426
  }
358
- async searchForPropertyEditor(propertyEditorName) {
359
- await this.typeToFilterIconsTxt.fill(propertyEditorName);
427
+ async searchForTypeToFilterValue(searchValue) {
428
+ await this.typeToFilterSearchTxt.fill(searchValue);
360
429
  }
361
430
  async addPropertyEditor(propertyEditorName, index = 0) {
362
431
  await this.addPropertyBtn.nth(index).click({ force: true });
363
432
  await this.clickSelectPropertyEditorButton();
364
- await this.searchForPropertyEditor(propertyEditorName);
433
+ await this.searchForTypeToFilterValue(propertyEditorName);
365
434
  await this.page.getByText(propertyEditorName, { exact: true }).click();
366
435
  await this.page.waitForTimeout(200);
367
- await this.enterAName(propertyEditorName);
436
+ await this.enterAPropertyName(propertyEditorName);
368
437
  await this.clickAddButton();
369
438
  }
370
439
  async updatePropertyEditor(propertyEditorName) {
371
440
  await this.clickEditorSettingsButton();
372
441
  await this.clickChangeButton();
373
- await this.searchForPropertyEditor(propertyEditorName);
442
+ await this.searchForTypeToFilterValue(propertyEditorName);
374
443
  await this.page.getByText(propertyEditorName, { exact: true }).click();
375
444
  await this.page.waitForTimeout(200);
376
- await this.enterAName(propertyEditorName);
445
+ await this.enterAPropertyName(propertyEditorName);
377
446
  await this.clickUpdateButton();
378
447
  }
379
448
  async clickAddGroupButton() {
@@ -381,7 +450,7 @@ class UiBaseLocators {
381
450
  }
382
451
  async enterGroupName(groupName, index = 0) {
383
452
  await this.page.waitForTimeout(200);
384
- await this.page.getByLabel('Group', { exact: true }).nth(index).fill(groupName);
453
+ await this.page.getByLabel('Group name', { exact: true }).nth(index).fill(groupName);
385
454
  }
386
455
  async doesGroupHaveValue(value) {
387
456
  return await (0, test_1.expect)(this.page.getByLabel('Group', { exact: true })).toHaveValue(value);