@bigbinary/neeto-playwright-commons 1.21.1 → 1.21.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.
- package/index.cjs.js +50 -2
- package/index.cjs.js.map +1 -1
- package/index.d.ts +37 -5
- package/index.js +49 -3
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -82,6 +82,48 @@ let MemberApis$1 = class MemberApis {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
let RoleApis$1 = class RoleApis {
|
|
86
|
+
constructor(neetoPlaywrightUtilities) {
|
|
87
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
88
|
+
this.BASE_URL = "/team_members";
|
|
89
|
+
this.ORGANIZATION_ROLES_URL = `${this.BASE_URL}/organization_roles`;
|
|
90
|
+
this.fetch = (endpoint) => this.neetoPlaywrightUtilities.apiRequest({
|
|
91
|
+
url: `${this.BASE_URL}/${endpoint}`,
|
|
92
|
+
});
|
|
93
|
+
this.addRole = (roleName, permissionIds) => this.neetoPlaywrightUtilities.apiRequest({
|
|
94
|
+
url: this.ORGANIZATION_ROLES_URL,
|
|
95
|
+
method: "post",
|
|
96
|
+
data: {
|
|
97
|
+
organization_role: {
|
|
98
|
+
name: roleName,
|
|
99
|
+
permission_ids: permissionIds,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
this.editRole = (roleId, body) => this.neetoPlaywrightUtilities.apiRequest({
|
|
104
|
+
url: `${this.ORGANIZATION_ROLES_URL}/${roleId}`,
|
|
105
|
+
method: "patch",
|
|
106
|
+
body: { organization_role: body },
|
|
107
|
+
});
|
|
108
|
+
this.deleteRole = (roleId, standardRoleId) => this.neetoPlaywrightUtilities.apiRequest({
|
|
109
|
+
url: `${this.ORGANIZATION_ROLES_URL}/${roleId}`,
|
|
110
|
+
method: "delete",
|
|
111
|
+
body: { new_role_id: standardRoleId },
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
let TagsApi$1 = class TagsApi {
|
|
117
|
+
constructor(neetoPlaywrightUtilities) {
|
|
118
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
119
|
+
this.create = ({ body, tagsRequestUrl, }) => this.neetoPlaywrightUtilities.apiRequest({
|
|
120
|
+
url: tagsRequestUrl,
|
|
121
|
+
body,
|
|
122
|
+
method: "post",
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
85
127
|
const COMMON_SELECTORS = {
|
|
86
128
|
emailInputError: "email-input-error",
|
|
87
129
|
pane: "pane-wrapper",
|
|
@@ -192,7 +234,7 @@ const COMMON_SELECTORS = {
|
|
|
192
234
|
continueButton: "continue-button",
|
|
193
235
|
clearAllButton: "clear-all-button",
|
|
194
236
|
requiredSwitch: "required-switch",
|
|
195
|
-
customSwitch: (switchLabel) =>
|
|
237
|
+
customSwitch: (switchLabel) => `${neetoCist.hyphenate(switchLabel)}-switch`,
|
|
196
238
|
customMenuItem: (label) => `${neetoCist.hyphenate(label)}-menu-item`,
|
|
197
239
|
customInputLabel: (name = "nui") => `${neetoCist.hyphenate(name)}-input-label`,
|
|
198
240
|
customInputField: (name = "nui") => `${neetoCist.hyphenate(name)}-input-field`,
|
|
@@ -188537,7 +188579,11 @@ class ThankYouPage {
|
|
|
188537
188579
|
await this.page
|
|
188538
188580
|
.getByTestId(NEETO_EDITOR_SELECTORS.contentField)
|
|
188539
188581
|
.fill(thankYouMessage);
|
|
188540
|
-
await test$1.expect(this.page
|
|
188582
|
+
await test$1.expect(this.page
|
|
188583
|
+
.getByTestId(THANK_YOU_SELECTORS.previewEditorContent)
|
|
188584
|
+
.or(this.page
|
|
188585
|
+
.getByTestId(THANK_YOU_SELECTORS.thankYouMessageWrapper)
|
|
188586
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.contentField))).toContainText(thankYouMessage);
|
|
188541
188587
|
};
|
|
188542
188588
|
this.addRedirectUrl = async (customRedirectUrl) => {
|
|
188543
188589
|
await this.page
|
|
@@ -195487,6 +195533,7 @@ exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
|
195487
195533
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
195488
195534
|
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
195489
195535
|
exports.ROUTES = ROUTES;
|
|
195536
|
+
exports.RoleApis = RoleApis$1;
|
|
195490
195537
|
exports.RolesPage = RolesPage;
|
|
195491
195538
|
exports.SELECT_COUNTRY = SELECT_COUNTRY;
|
|
195492
195539
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
@@ -195509,6 +195556,7 @@ exports.THANK_YOU_SELECTORS = THANK_YOU_SELECTORS;
|
|
|
195509
195556
|
exports.THEMES_SELECTORS = THEMES_SELECTORS;
|
|
195510
195557
|
exports.THIRD_PARTY_ROUTES = THIRD_PARTY_ROUTES;
|
|
195511
195558
|
exports.TOASTR_MESSAGES = TOASTR_MESSAGES;
|
|
195559
|
+
exports.TagsApi = TagsApi$1;
|
|
195512
195560
|
exports.TagsPage = TagsPage;
|
|
195513
195561
|
exports.TeamMembers = TeamMembers;
|
|
195514
195562
|
exports.ThankYouPage = ThankYouPage;
|