@umbraco/playwright-testhelpers 18.0.0 → 18.0.2

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.
@@ -17,8 +17,9 @@ export declare class UserGroupUiHelper extends UiBaseLocators {
17
17
  private readonly addGranularPermissionBtn;
18
18
  private readonly granularPermissionsModal;
19
19
  private readonly iconChecked;
20
- private readonly inputEntityUserPermissionList;
21
20
  private readonly sectionList;
21
+ private readonly documentPermissionsGroups;
22
+ private readonly elementPermissionsGroups;
22
23
  constructor(page: Page);
23
24
  clickUserGroupsButton(): Promise<void>;
24
25
  enterUserGroupName(name: string): Promise<void>;
@@ -30,9 +31,10 @@ export declare class UserGroupUiHelper extends UiBaseLocators {
30
31
  clickRemoveLanguageFromUserGroup(languageName: string): Promise<void>;
31
32
  isUserGroupWithNameVisible(name: string, isVisible?: boolean): Promise<void>;
32
33
  clickUserGroupWithName(name: string): Promise<void>;
33
- clickPermissionsByName(permissionName: string[]): Promise<void>;
34
+ clickDocumentPermissionsByName(permissionName: string[]): Promise<void>;
35
+ clickElementPermissionsByName(permissionName: string[]): Promise<void>;
34
36
  clickGranularPermissionsByName(permissionName: string[]): Promise<void>;
35
- doesUserGroupHavePermission(permissionName: string, hasPermission?: boolean): Promise<void>;
37
+ doesUserGroupHaveDocumentPermission(permissionName: string, hasPermission?: boolean): Promise<void>;
36
38
  doesUserGroupHaveGranularPermission(permissionName: string, hasPermission?: boolean): Promise<void>;
37
39
  addSectionWithNameToUserGroup(sectionName: string): Promise<void>;
38
40
  clickChooseSectionButton(): Promise<void>;
@@ -41,12 +43,12 @@ export declare class UserGroupUiHelper extends UiBaseLocators {
41
43
  clickRemoveSectionFromUserGroup(sectionName: string): Promise<void>;
42
44
  clickRemoveContentStartNodeFromUserGroup(contentStartNodeName: string): Promise<void>;
43
45
  clickRemoveMediaStartNodeFromUserGroup(mediaStartNodeName: string): Promise<void>;
44
- doesUserGroupHavePermissionEnabled(permissionName: string[]): Promise<void[]>;
46
+ doesUserGroupHaveDocumentPermissionEnabled(permissionName: string[]): Promise<void[]>;
45
47
  clickGranularPermissionWithName(permissionName: string): Promise<void>;
46
48
  clickAddGranularPermission(): Promise<void>;
47
49
  clickRemoveGranularPermissionWithName(permissionName: string): Promise<void>;
48
50
  doesSettingHaveValue(headline: string, settings: any): Promise<void>;
49
- doesPermissionsSettingsHaveValue(settings: any): Promise<void>;
51
+ doesDocumentPermissionsSettingsHaveValue(settings: any): Promise<void>;
50
52
  doesUserGroupContainSection(section: string): Promise<void>;
51
53
  doesUserGroupHaveSections(sections: string[]): Promise<void[]>;
52
54
  doesUserGroupSectionsHaveCount(count: number): Promise<void>;
@@ -54,4 +56,7 @@ export declare class UserGroupUiHelper extends UiBaseLocators {
54
56
  clickSaveButtonAndWaitForUserGroupToBeUpdated(): Promise<string | undefined>;
55
57
  clickConfirmToDeleteButtonAndWaitForUserGroupToBeDeleted(): Promise<string | undefined>;
56
58
  doesUserGroupHaveDescription(userGroupName: string, description: string): Promise<void>;
59
+ doesUserGroupHaveElementPermission(permissionName: string, hasPermission?: boolean): Promise<void>;
60
+ doesUserGroupHaveElementPermissionEnabled(permissionName: string[]): Promise<void[]>;
61
+ doesElementPermissionsSettingsHaveValue(settings: any): Promise<void>;
57
62
  }
@@ -21,8 +21,9 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
21
21
  addGranularPermissionBtn;
22
22
  granularPermissionsModal;
23
23
  iconChecked;
24
- inputEntityUserPermissionList;
25
24
  sectionList;
25
+ documentPermissionsGroups;
26
+ elementPermissionsGroups;
26
27
  constructor(page) {
27
28
  super(page);
28
29
  this.userGroupsBtn = page.getByLabel('User groups');
@@ -42,7 +43,8 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
42
43
  this.addGranularPermissionBtn = this.granularPermission.getByLabel('Add');
43
44
  this.granularPermissionsModal = page.locator('umb-entity-user-permission-settings-modal');
44
45
  this.iconChecked = page.locator('uui-toggle').locator('#icon-checked').getByRole('img');
45
- this.inputEntityUserPermissionList = page.locator('umb-input-entity-user-permission');
46
+ this.documentPermissionsGroups = page.locator('umb-user-group-entity-type-permission-groups uui-box').filter({ hasText: 'Document permissions' });
47
+ this.elementPermissionsGroups = page.locator('umb-user-group-entity-type-permission-groups uui-box').filter({ hasText: 'Element permissions' });
46
48
  }
47
49
  async clickUserGroupsButton() {
48
50
  await this.click(this.userGroupsBtn);
@@ -78,9 +80,14 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
78
80
  await this.click(this.page.getByRole('link', { name: name }));
79
81
  await this.page.waitForTimeout(ConstantHelper_1.ConstantHelper.wait.short);
80
82
  }
81
- async clickPermissionsByName(permissionName) {
83
+ async clickDocumentPermissionsByName(permissionName) {
82
84
  for (let i = 0; i < permissionName.length; i++) {
83
- await this.click(this.permissionVerbBtn.getByText(permissionName[i], { exact: true }));
85
+ await this.click(this.documentPermissionsGroups.getByText(permissionName[i], { exact: true }));
86
+ }
87
+ }
88
+ async clickElementPermissionsByName(permissionName) {
89
+ for (let i = 0; i < permissionName.length; i++) {
90
+ await this.click(this.elementPermissionsGroups.getByText(permissionName[i], { exact: true }));
84
91
  }
85
92
  }
86
93
  async clickGranularPermissionsByName(permissionName) {
@@ -88,8 +95,8 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
88
95
  await this.click(this.granularPermissionsModal.getByText(permissionName[i], { exact: true }));
89
96
  }
90
97
  }
91
- async doesUserGroupHavePermission(permissionName, hasPermission = true) {
92
- await this.isVisible(this.permissionVerbBtn.filter({ has: this.page.getByLabel(permissionName, { exact: true }) }).filter({ has: this.iconChecked }), hasPermission);
98
+ async doesUserGroupHaveDocumentPermission(permissionName, hasPermission = true) {
99
+ await this.isVisible(this.documentPermissionsGroups.locator('umb-input-user-permission-verb[label="' + permissionName + '"]').filter({ has: this.iconChecked }), hasPermission);
93
100
  }
94
101
  async doesUserGroupHaveGranularPermission(permissionName, hasPermission = true) {
95
102
  await this.isVisible(this.granularPermissionsModal.filter({ has: this.page.getByLabel(permissionName, { exact: true }) }).filter({ has: this.iconChecked }), hasPermission);
@@ -119,8 +126,8 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
119
126
  // Force click is needed
120
127
  await this.click(this.mediaStartNode.filter({ hasText: mediaStartNodeName }).getByLabel('Remove'), { force: true });
121
128
  }
122
- async doesUserGroupHavePermissionEnabled(permissionName) {
123
- return await Promise.all(permissionName.map(permission => this.doesUserGroupHavePermission(permission)));
129
+ async doesUserGroupHaveDocumentPermissionEnabled(permissionName) {
130
+ return await Promise.all(permissionName.map(permission => this.doesUserGroupHaveDocumentPermission(permission)));
124
131
  }
125
132
  async clickGranularPermissionWithName(permissionName) {
126
133
  await this.click(this.granularPermission.getByText(permissionName));
@@ -140,10 +147,10 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
140
147
  await (0, test_1.expect)(propertyLocator.locator('#description')).toHaveText(description);
141
148
  }
142
149
  }
143
- async doesPermissionsSettingsHaveValue(settings) {
150
+ async doesDocumentPermissionsSettingsHaveValue(settings) {
144
151
  for (let index = 0; index < Object.keys(settings).length; index++) {
145
152
  const [name, description] = settings[index];
146
- const permissionItemLocator = this.inputEntityUserPermissionList.locator(this.permissionVerbBtn).nth(index);
153
+ const permissionItemLocator = this.documentPermissionsGroups.locator(this.permissionVerbBtn).nth(index);
147
154
  await (0, test_1.expect)(permissionItemLocator.locator('#name')).toHaveText(name);
148
155
  if (description !== '')
149
156
  await (0, test_1.expect)(permissionItemLocator.locator('#setting small')).toHaveText(description);
@@ -172,6 +179,21 @@ class UserGroupUiHelper extends UiBaseLocators_1.UiBaseLocators {
172
179
  const descriptionCell = userGroupRow.locator('uui-table-cell').nth(2);
173
180
  await this.hasText(descriptionCell, description);
174
181
  }
182
+ async doesUserGroupHaveElementPermission(permissionName, hasPermission = true) {
183
+ await this.isVisible(this.elementPermissionsGroups.locator('umb-input-user-permission-verb[label="' + permissionName + '"]').filter({ has: this.iconChecked }), hasPermission);
184
+ }
185
+ async doesUserGroupHaveElementPermissionEnabled(permissionName) {
186
+ return await Promise.all(permissionName.map(permission => this.doesUserGroupHaveElementPermission(permission)));
187
+ }
188
+ async doesElementPermissionsSettingsHaveValue(settings) {
189
+ for (let index = 0; index < Object.keys(settings).length; index++) {
190
+ const [name, description] = settings[index];
191
+ const permissionItemLocator = this.elementPermissionsGroups.locator(this.permissionVerbBtn).nth(index);
192
+ await (0, test_1.expect)(permissionItemLocator.locator('#name')).toHaveText(name);
193
+ if (description !== '')
194
+ await (0, test_1.expect)(permissionItemLocator.locator('#setting small')).toHaveText(description);
195
+ }
196
+ }
175
197
  }
176
198
  exports.UserGroupUiHelper = UserGroupUiHelper;
177
199
  //# sourceMappingURL=UserGroupUiHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserGroupUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/UserGroupUiHelper.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,qDAAgD;AAChD,qDAAgD;AAEhD,MAAa,iBAAkB,SAAQ,+BAAc;IAClC,aAAa,CAAU;IACvB,gBAAgB,CAAU;IAC1B,aAAa,CAAU;IACvB,iBAAiB,CAAU;IAC3B,iBAAiB,CAAU;IAC3B,kBAAkB,CAAU;IAC5B,4BAA4B,CAAU;IACtC,4BAA4B,CAAU;IACtC,wBAAwB,CAAU;IAClC,gBAAgB,CAAU;IAC1B,cAAc,CAAU;IACxB,OAAO,CAAU;IACjB,kBAAkB,CAAU;IAC5B,wBAAwB,CAAU;IAClC,wBAAwB,CAAU;IAClC,WAAW,CAAU;IACrB,6BAA6B,CAAU;IACvC,WAAW,CAAU;IAEtC,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,gCAA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5J,CAAC;IAED,KAAK,CAAC,6CAA6C;QACjD,OAAO,MAAM,IAAI,CAAC,oCAAoC,CAAC,+BAAc,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,EAAE,+BAAc,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IACvJ,CAAC;IAED,KAAK,CAAC,wDAAwD;QAC5D,OAAO,MAAM,IAAI,CAAC,oCAAoC,CAAC,+BAAc,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,0BAA0B,EAAE,EAAE,+BAAc,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAClK,CAAC;IAED,KAAK,CAAC,4BAA4B,CAAC,aAAqB,EAAE,WAAmB;QAC3E,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,EAAC,OAAO,EAAE,aAAa,EAAC,CAAC,CAAC;QAClF,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC;CACF;AA/MD,8CA+MC","sourcesContent":["import {expect, Locator, Page} from \"@playwright/test\"\nimport {UiBaseLocators} from \"./UiBaseLocators\";\nimport {ConstantHelper} from \"./ConstantHelper\";\n\nexport class UserGroupUiHelper extends UiBaseLocators {\n private readonly userGroupsBtn: Locator;\n private readonly chooseSectionBtn: Locator;\n private readonly languageInput: Locator;\n private readonly chooseLanguageBtn: Locator;\n private readonly permissionVerbBtn: Locator;\n private readonly userGroupCreateBtn: Locator;\n private readonly allowAccessToAllLanguagesBtn: Locator;\n private readonly allowAccessToAllDocumentsBtn: Locator;\n private readonly allowAccessToAllMediaBtn: Locator;\n private readonly contentStartNode: Locator;\n private readonly mediaStartNode: Locator;\n private readonly section: Locator;\n private readonly granularPermission: Locator;\n private readonly addGranularPermissionBtn: Locator;\n private readonly granularPermissionsModal: Locator;\n private readonly iconChecked: Locator;\n private readonly inputEntityUserPermissionList: Locator;\n private readonly sectionList: Locator;\n\n constructor(page: Page) {\n super(page);\n this.userGroupsBtn = page.getByLabel('User groups');\n this.permissionVerbBtn = page.locator('umb-input-user-permission-verb');\n this.chooseSectionBtn = page.locator('umb-input-section').getByLabel('Choose');\n this.languageInput = page.locator('umb-input-language');\n this.chooseLanguageBtn = this.languageInput.getByLabel('Choose');\n this.userGroupCreateBtn = page.getByLabel('Create');\n this.allowAccessToAllLanguagesBtn = page.getByText('Allow access to all languages');\n this.allowAccessToAllDocumentsBtn = page.getByText('Allow access to all documents');\n this.allowAccessToAllMediaBtn = page.getByText('Allow access to all media');\n this.contentStartNode = page.locator('umb-input-document');\n this.mediaStartNode = page.locator('umb-input-media');\n this.sectionList = page.locator('umb-input-section uui-ref-list');\n this.section = this.sectionList.locator('umb-ref-section');\n this.granularPermission = page.locator('umb-input-document-granular-user-permission');\n this.addGranularPermissionBtn = this.granularPermission.getByLabel('Add');\n this.granularPermissionsModal = page.locator('umb-entity-user-permission-settings-modal');\n this.iconChecked = page.locator('uui-toggle').locator('#icon-checked').getByRole('img');\n this.inputEntityUserPermissionList = page.locator('umb-input-entity-user-permission');\n }\n\n async clickUserGroupsButton() {\n await this.click(this.userGroupsBtn);\n await this.page.waitForTimeout(ConstantHelper.wait.short);\n }\n\n async enterUserGroupName(name: string) {\n await this.enterText(this.enterAName, name);\n }\n\n async addLanguageToUserGroup(languageName: string) {\n await this.click(this.chooseLanguageBtn);\n await this.clickLabelWithName(languageName, true);\n await this.clickSubmitButton();\n }\n\n async clickAllowAccessToAllLanguages() {\n await this.click(this.allowAccessToAllLanguagesBtn);\n }\n\n async clickAllowAccessToAllDocuments() {\n await this.click(this.allowAccessToAllDocumentsBtn);\n }\n\n async clickAllowAccessToAllMedia() {\n await this.click(this.allowAccessToAllMediaBtn);\n }\n\n async clickCreateUserGroupButton() {\n await this.click(this.userGroupCreateBtn);\n }\n\n async clickRemoveLanguageFromUserGroup(languageName: string) {\n await this.click(this.entityItem.filter({hasText: languageName}).getByLabel('Remove'));\n }\n\n async isUserGroupWithNameVisible(name: string, isVisible = true) {\n return await this.isVisible(this.page.locator('uui-table-row', {hasText: name}), isVisible);\n }\n\n async clickUserGroupWithName(name: string) {\n await this.click(this.page.getByRole('link', {name: name}));\n await this.page.waitForTimeout(ConstantHelper.wait.short);\n }\n\n async clickPermissionsByName(permissionName: string[]) {\n for (let i = 0; i < permissionName.length; i++) {\n await this.click(this.permissionVerbBtn.getByText(permissionName[i], {exact: true}));\n }\n }\n\n async clickGranularPermissionsByName(permissionName: string[]) {\n for (let i = 0; i < permissionName.length; i++) {\n await this.click(this.granularPermissionsModal.getByText(permissionName[i], {exact: true}));\n }\n }\n\n async doesUserGroupHavePermission(permissionName: string, hasPermission = true) {\n await this.isVisible(this.permissionVerbBtn.filter({has: this.page.getByLabel(permissionName, {exact: true})}).filter({has: this.iconChecked}), hasPermission);\n }\n\n async doesUserGroupHaveGranularPermission(permissionName: string, hasPermission = true) {\n await this.isVisible(this.granularPermissionsModal.filter({has: this.page.getByLabel(permissionName, {exact: true})}).filter({has: this.iconChecked}), hasPermission);\n }\n\n async addSectionWithNameToUserGroup(sectionName: string) {\n await this.clickChooseSectionButton();\n await this.clickLabelWithName(sectionName, true);\n await this.clickSubmitButton();\n }\n\n async clickChooseSectionButton() {\n await this.click(this.chooseSectionBtn);\n }\n\n async doesUserGroupTableHaveSection(userGroupName: string, sectionName: string, hasSection = true) {\n await this.isVisible(this.page.locator('uui-table-row', {hasText: userGroupName}).locator('umb-user-group-table-sections-column-layout', {hasText: sectionName}), hasSection);\n }\n\n async doesUserGroupContainLanguage(languageName: string, isVisible = true) {\n await this.waitForVisible(this.languageInput);\n await this.isVisible(this.languageInput.filter({hasText: languageName}), isVisible);\n }\n\n async clickRemoveSectionFromUserGroup(sectionName: string) {\n await this.click(this.section.filter({hasText: sectionName}).getByLabel('Remove'));\n }\n\n async clickRemoveContentStartNodeFromUserGroup(contentStartNodeName: string) {\n await this.click(this.contentStartNode.filter({hasText: contentStartNodeName}).getByLabel('Remove'));\n }\n\n async clickRemoveMediaStartNodeFromUserGroup(mediaStartNodeName: string) {\n // Force click is needed\n await this.click(this.mediaStartNode.filter({hasText: mediaStartNodeName}).getByLabel('Remove'), {force: true});\n }\n\n async doesUserGroupHavePermissionEnabled(permissionName: string[]) {\n return await Promise.all(\n permissionName.map(permission => this.doesUserGroupHavePermission(permission))\n );\n }\n\n async clickGranularPermissionWithName(permissionName: string) {\n await this.click(this.granularPermission.getByText(permissionName));\n }\n\n async clickAddGranularPermission() {\n await this.click(this.addGranularPermissionBtn);\n }\n\n async clickRemoveGranularPermissionWithName(permissionName: string) {\n await this.click(this.granularPermission.filter({hasText: permissionName}).getByLabel('Remove'));\n }\n\n async doesSettingHaveValue(headline: string, settings) {\n for (let index = 0; index < Object.keys(settings).length; index++) {\n const [label, description] = settings[index];\n const propertyLocator = this.page.locator('uui-box').filter({hasText: headline}).locator('umb-property-layout').nth(index);\n await expect(propertyLocator.locator('#headerColumn #label')).toHaveText(label);\n if (description !== '')\n await expect(propertyLocator.locator('#description')).toHaveText(description);\n }\n }\n\n async doesPermissionsSettingsHaveValue(settings) {\n for (let index = 0; index < Object.keys(settings).length; index++) {\n const [name, description] = settings[index];\n const permissionItemLocator = this.inputEntityUserPermissionList.locator(this.permissionVerbBtn).nth(index);\n await expect(permissionItemLocator.locator('#name')).toHaveText(name);\n if (description !== '')\n await expect(permissionItemLocator.locator('#setting small')).toHaveText(description);\n }\n }\n\n async doesUserGroupContainSection(section: string) {\n await this.containsText(this.sectionList, section);\n }\n\n async doesUserGroupHaveSections(sections: string[]) {\n return await Promise.all(\n sections.map(section => this.doesUserGroupContainSection(section))\n );\n }\n\n async doesUserGroupSectionsHaveCount(count: number) {\n await this.hasCount(this.section, count);\n }\n\n async clickSaveButtonAndWaitForUserGroupToBeCreated() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickSaveButton(), ConstantHelper.statusCodes.created);\n }\n\n async clickSaveButtonAndWaitForUserGroupToBeUpdated() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickSaveButton(), ConstantHelper.statusCodes.ok);\n }\n\n async clickConfirmToDeleteButtonAndWaitForUserGroupToBeDeleted() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickConfirmToDeleteButton(), ConstantHelper.statusCodes.ok);\n }\n\n async doesUserGroupHaveDescription(userGroupName: string, description: string) {\n const userGroupRow = this.page.locator('uui-table-row', {hasText: userGroupName});\n const descriptionCell = userGroupRow.locator('uui-table-cell').nth(2);\n await this.hasText(descriptionCell, description);\n }\n}"]}
1
+ {"version":3,"file":"UserGroupUiHelper.js","sourceRoot":"","sources":["../../../lib/helpers/UserGroupUiHelper.ts"],"names":[],"mappings":";;;AAAA,2CAAsD;AACtD,qDAAgD;AAChD,qDAAgD;AAEhD,MAAa,iBAAkB,SAAQ,+BAAc;IAClC,aAAa,CAAU;IACvB,gBAAgB,CAAU;IAC1B,aAAa,CAAU;IACvB,iBAAiB,CAAU;IAC3B,iBAAiB,CAAU;IAC3B,kBAAkB,CAAU;IAC5B,4BAA4B,CAAU;IACtC,4BAA4B,CAAU;IACtC,wBAAwB,CAAU;IAClC,gBAAgB,CAAU;IAC1B,cAAc,CAAU;IACxB,OAAO,CAAU;IACjB,kBAAkB,CAAU;IAC5B,wBAAwB,CAAU;IAClC,wBAAwB,CAAU;IAClC,WAAW,CAAU;IACrB,WAAW,CAAU;IACrB,yBAAyB,CAAU;IACnC,wBAAwB,CAAU;IAEnD,YAAY,IAAU;QACpB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,OAAO,CAAC,gC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nF,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,wCAAwC,GAAG,cAAc,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,WAAW,EAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAC/K,CAAC;IAED,KAAK,CAAC,yCAAyC,CAAC,cAAwB;QACtE,OAAO,MAAM,OAAO,CAAC,GAAG,CACtB,cAAc,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC,kCAAkC,CAAC,UAAU,CAAC,CAAC,CACtF,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,uCAAuC,CAAC,QAAQ;QACpD,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACjE,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;YAC5C,MAAM,qBAAqB,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;YACvG,MAAM,IAAA,aAAM,EAAC,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACtE,IAAI,WAAW,KAAK,EAAE;gBACpB,MAAM,IAAA,aAAM,EAAC,qBAAqB,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;SACzF;IACH,CAAC;CACF;AA3OD,8CA2OC","sourcesContent":["import {expect, Locator, Page} from \"@playwright/test\"\nimport {UiBaseLocators} from \"./UiBaseLocators\";\nimport {ConstantHelper} from \"./ConstantHelper\";\n\nexport class UserGroupUiHelper extends UiBaseLocators {\n private readonly userGroupsBtn: Locator;\n private readonly chooseSectionBtn: Locator;\n private readonly languageInput: Locator;\n private readonly chooseLanguageBtn: Locator;\n private readonly permissionVerbBtn: Locator;\n private readonly userGroupCreateBtn: Locator;\n private readonly allowAccessToAllLanguagesBtn: Locator;\n private readonly allowAccessToAllDocumentsBtn: Locator;\n private readonly allowAccessToAllMediaBtn: Locator;\n private readonly contentStartNode: Locator;\n private readonly mediaStartNode: Locator;\n private readonly section: Locator;\n private readonly granularPermission: Locator;\n private readonly addGranularPermissionBtn: Locator;\n private readonly granularPermissionsModal: Locator;\n private readonly iconChecked: Locator;\n private readonly sectionList: Locator;\n private readonly documentPermissionsGroups: Locator;\n private readonly elementPermissionsGroups: Locator;\n\n constructor(page: Page) {\n super(page);\n this.userGroupsBtn = page.getByLabel('User groups');\n this.permissionVerbBtn = page.locator('umb-input-user-permission-verb');\n this.chooseSectionBtn = page.locator('umb-input-section').getByLabel('Choose');\n this.languageInput = page.locator('umb-input-language');\n this.chooseLanguageBtn = this.languageInput.getByLabel('Choose');\n this.userGroupCreateBtn = page.getByLabel('Create');\n this.allowAccessToAllLanguagesBtn = page.getByText('Allow access to all languages');\n this.allowAccessToAllDocumentsBtn = page.getByText('Allow access to all documents');\n this.allowAccessToAllMediaBtn = page.getByText('Allow access to all media');\n this.contentStartNode = page.locator('umb-input-document');\n this.mediaStartNode = page.locator('umb-input-media');\n this.sectionList = page.locator('umb-input-section uui-ref-list');\n this.section = this.sectionList.locator('umb-ref-section');\n this.granularPermission = page.locator('umb-input-document-granular-user-permission');\n this.addGranularPermissionBtn = this.granularPermission.getByLabel('Add');\n this.granularPermissionsModal = page.locator('umb-entity-user-permission-settings-modal');\n this.iconChecked = page.locator('uui-toggle').locator('#icon-checked').getByRole('img');\n this.documentPermissionsGroups = page.locator('umb-user-group-entity-type-permission-groups uui-box').filter({hasText: 'Document permissions'});\n this.elementPermissionsGroups = page.locator('umb-user-group-entity-type-permission-groups uui-box').filter({hasText: 'Element permissions'});\n }\n\n async clickUserGroupsButton() {\n await this.click(this.userGroupsBtn);\n await this.page.waitForTimeout(ConstantHelper.wait.short);\n }\n\n async enterUserGroupName(name: string) {\n await this.enterText(this.enterAName, name);\n }\n\n async addLanguageToUserGroup(languageName: string) {\n await this.click(this.chooseLanguageBtn);\n await this.clickLabelWithName(languageName, true);\n await this.clickSubmitButton();\n }\n\n async clickAllowAccessToAllLanguages() {\n await this.click(this.allowAccessToAllLanguagesBtn);\n }\n\n async clickAllowAccessToAllDocuments() {\n await this.click(this.allowAccessToAllDocumentsBtn);\n }\n\n async clickAllowAccessToAllMedia() {\n await this.click(this.allowAccessToAllMediaBtn);\n }\n\n async clickCreateUserGroupButton() {\n await this.click(this.userGroupCreateBtn);\n }\n\n async clickRemoveLanguageFromUserGroup(languageName: string) {\n await this.click(this.entityItem.filter({hasText: languageName}).getByLabel('Remove'));\n }\n\n async isUserGroupWithNameVisible(name: string, isVisible = true) {\n return await this.isVisible(this.page.locator('uui-table-row', {hasText: name}), isVisible);\n }\n\n async clickUserGroupWithName(name: string) {\n await this.click(this.page.getByRole('link', {name: name}));\n await this.page.waitForTimeout(ConstantHelper.wait.short);\n }\n\n async clickDocumentPermissionsByName(permissionName: string[]) {\n for (let i = 0; i < permissionName.length; i++) {\n await this.click(this.documentPermissionsGroups.getByText(permissionName[i], {exact: true}));\n }\n }\n\n async clickElementPermissionsByName(permissionName: string[]) {\n for (let i = 0; i < permissionName.length; i++) {\n await this.click(this.elementPermissionsGroups.getByText(permissionName[i], {exact: true}));\n }\n }\n\n async clickGranularPermissionsByName(permissionName: string[]) {\n for (let i = 0; i < permissionName.length; i++) {\n await this.click(this.granularPermissionsModal.getByText(permissionName[i], {exact: true}));\n }\n }\n\n async doesUserGroupHaveDocumentPermission(permissionName: string, hasPermission = true) {\n await this.isVisible(this.documentPermissionsGroups.locator('umb-input-user-permission-verb[label=\"' + permissionName + '\"]').filter({has: this.iconChecked}), hasPermission);\n }\n\n async doesUserGroupHaveGranularPermission(permissionName: string, hasPermission = true) {\n await this.isVisible(this.granularPermissionsModal.filter({has: this.page.getByLabel(permissionName, {exact: true})}).filter({has: this.iconChecked}), hasPermission);\n }\n\n async addSectionWithNameToUserGroup(sectionName: string) {\n await this.clickChooseSectionButton();\n await this.clickLabelWithName(sectionName, true);\n await this.clickSubmitButton();\n }\n\n async clickChooseSectionButton() {\n await this.click(this.chooseSectionBtn);\n }\n\n async doesUserGroupTableHaveSection(userGroupName: string, sectionName: string, hasSection = true) {\n await this.isVisible(this.page.locator('uui-table-row', {hasText: userGroupName}).locator('umb-user-group-table-sections-column-layout', {hasText: sectionName}), hasSection);\n }\n\n async doesUserGroupContainLanguage(languageName: string, isVisible = true) {\n await this.waitForVisible(this.languageInput);\n await this.isVisible(this.languageInput.filter({hasText: languageName}), isVisible);\n }\n\n async clickRemoveSectionFromUserGroup(sectionName: string) {\n await this.click(this.section.filter({hasText: sectionName}).getByLabel('Remove'));\n }\n\n async clickRemoveContentStartNodeFromUserGroup(contentStartNodeName: string) {\n await this.click(this.contentStartNode.filter({hasText: contentStartNodeName}).getByLabel('Remove'));\n }\n\n async clickRemoveMediaStartNodeFromUserGroup(mediaStartNodeName: string) {\n // Force click is needed\n await this.click(this.mediaStartNode.filter({hasText: mediaStartNodeName}).getByLabel('Remove'), {force: true});\n }\n\n async doesUserGroupHaveDocumentPermissionEnabled(permissionName: string[]) {\n return await Promise.all(\n permissionName.map(permission => this.doesUserGroupHaveDocumentPermission(permission))\n );\n }\n\n async clickGranularPermissionWithName(permissionName: string) {\n await this.click(this.granularPermission.getByText(permissionName));\n }\n\n async clickAddGranularPermission() {\n await this.click(this.addGranularPermissionBtn);\n }\n\n async clickRemoveGranularPermissionWithName(permissionName: string) {\n await this.click(this.granularPermission.filter({hasText: permissionName}).getByLabel('Remove'));\n }\n\n async doesSettingHaveValue(headline: string, settings) {\n for (let index = 0; index < Object.keys(settings).length; index++) {\n const [label, description] = settings[index];\n const propertyLocator = this.page.locator('uui-box').filter({hasText: headline}).locator('umb-property-layout').nth(index);\n await expect(propertyLocator.locator('#headerColumn #label')).toHaveText(label);\n if (description !== '')\n await expect(propertyLocator.locator('#description')).toHaveText(description);\n }\n }\n\n async doesDocumentPermissionsSettingsHaveValue(settings) {\n for (let index = 0; index < Object.keys(settings).length; index++) {\n const [name, description] = settings[index];\n const permissionItemLocator = this.documentPermissionsGroups.locator(this.permissionVerbBtn).nth(index);\n await expect(permissionItemLocator.locator('#name')).toHaveText(name);\n if (description !== '')\n await expect(permissionItemLocator.locator('#setting small')).toHaveText(description);\n }\n }\n\n async doesUserGroupContainSection(section: string) {\n await this.containsText(this.sectionList, section);\n }\n\n async doesUserGroupHaveSections(sections: string[]) {\n return await Promise.all(\n sections.map(section => this.doesUserGroupContainSection(section))\n );\n }\n\n async doesUserGroupSectionsHaveCount(count: number) {\n await this.hasCount(this.section, count);\n }\n\n async clickSaveButtonAndWaitForUserGroupToBeCreated() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickSaveButton(), ConstantHelper.statusCodes.created);\n }\n\n async clickSaveButtonAndWaitForUserGroupToBeUpdated() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickSaveButton(), ConstantHelper.statusCodes.ok);\n }\n\n async clickConfirmToDeleteButtonAndWaitForUserGroupToBeDeleted() {\n return await this.waitForResponseAfterExecutingPromise(ConstantHelper.apiEndpoints.userGroup, this.clickConfirmToDeleteButton(), ConstantHelper.statusCodes.ok);\n }\n\n async doesUserGroupHaveDescription(userGroupName: string, description: string) {\n const userGroupRow = this.page.locator('uui-table-row', {hasText: userGroupName});\n const descriptionCell = userGroupRow.locator('uui-table-cell').nth(2);\n await this.hasText(descriptionCell, description);\n }\n\n async doesUserGroupHaveElementPermission(permissionName: string, hasPermission = true) {\n await this.isVisible(this.elementPermissionsGroups.locator('umb-input-user-permission-verb[label=\"' + permissionName + '\"]').filter({has: this.iconChecked}), hasPermission);\n }\n\n async doesUserGroupHaveElementPermissionEnabled(permissionName: string[]) {\n return await Promise.all(\n permissionName.map(permission => this.doesUserGroupHaveElementPermission(permission))\n );\n }\n\n async doesElementPermissionsSettingsHaveValue(settings) {\n for (let index = 0; index < Object.keys(settings).length; index++) {\n const [name, description] = settings[index];\n const permissionItemLocator = this.elementPermissionsGroups.locator(this.permissionVerbBtn).nth(index);\n await expect(permissionItemLocator.locator('#name')).toHaveText(name);\n if (description !== '')\n await expect(permissionItemLocator.locator('#setting small')).toHaveText(description);\n }\n }\n}"]}