@bigbinary/neeto-commons-frontend 2.0.30 → 2.0.31
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/cypress-commands.d.ts +53 -0
- package/cypress-utils.cjs.js +777 -0
- package/cypress-utils.d.ts +275 -0
- package/cypress-utils.js +746 -0
- package/initializers.cjs.js +1 -0
- package/initializers.js +1 -0
- package/package.json +10 -1
- package/react-utils.cjs.js +61 -22
- package/react-utils.d.ts +1 -1
- package/react-utils.js +61 -22
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
// selecotrs ------------------------------------------------
|
|
2
|
+
|
|
3
|
+
type CommonSelectors = {
|
|
4
|
+
alertTitle: string;
|
|
5
|
+
alertModalSubmitButton: string;
|
|
6
|
+
checkbox: string;
|
|
7
|
+
checkboxLabel: string;
|
|
8
|
+
dropdownContainer: string;
|
|
9
|
+
dropdownIcon: string;
|
|
10
|
+
heading: string;
|
|
11
|
+
paneBody: string;
|
|
12
|
+
paneHeader: string;
|
|
13
|
+
selectOption: string;
|
|
14
|
+
toastMessage: string;
|
|
15
|
+
toastCloseButton: string;
|
|
16
|
+
windowAlert: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type MemberSelectors = {
|
|
20
|
+
addMember: string;
|
|
21
|
+
admin: string;
|
|
22
|
+
agent: string;
|
|
23
|
+
agents: string;
|
|
24
|
+
activeMembersHeading: string;
|
|
25
|
+
accountActivatedToastMessage: string;
|
|
26
|
+
activateMember: string;
|
|
27
|
+
activateMemberAlertMessage: string;
|
|
28
|
+
deactivateAccountToastMessage: string;
|
|
29
|
+
deactivateMember: string;
|
|
30
|
+
deactivateMemberAlertMessage: string;
|
|
31
|
+
editMember: string;
|
|
32
|
+
memberAddedMessage: string;
|
|
33
|
+
members: string;
|
|
34
|
+
newHeading: string;
|
|
35
|
+
updatedMemberRole: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type LoginSelectors = {
|
|
39
|
+
appleAuthenticationButton: string;
|
|
40
|
+
emailTextField: string;
|
|
41
|
+
googleAuthenticationButton: string;
|
|
42
|
+
githubAuthenticationButton: string;
|
|
43
|
+
loginViaEmailButton: string;
|
|
44
|
+
otpField: string;
|
|
45
|
+
passwordTextField: string;
|
|
46
|
+
rememberMeCheckBox: string;
|
|
47
|
+
submitButton: string;
|
|
48
|
+
twitterAuthenticationButton: string;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
type ProfileSelectors = {
|
|
52
|
+
logoutLink: string;
|
|
53
|
+
profileOptionsContainer: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type SignUpSelectors = {
|
|
57
|
+
emailTextField: string;
|
|
58
|
+
firstNameTextField: string;
|
|
59
|
+
lastNameTextField: string;
|
|
60
|
+
organizationNameTextField: string;
|
|
61
|
+
organizationSubmitButton: string;
|
|
62
|
+
otpTextBox: string;
|
|
63
|
+
profileSubmitButton: string;
|
|
64
|
+
signupViaEmailButton: string;
|
|
65
|
+
submitButton: string;
|
|
66
|
+
subdomainNameTextField: string;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
// texts ------------------------------------------------
|
|
70
|
+
type CommonTexts = {
|
|
71
|
+
activate: string;
|
|
72
|
+
block: string;
|
|
73
|
+
copiedToClipboard: string;
|
|
74
|
+
crossSiteScript: string;
|
|
75
|
+
deactivate: string;
|
|
76
|
+
delete: string;
|
|
77
|
+
delete1: string;
|
|
78
|
+
edit: string;
|
|
79
|
+
invalidEmailMessage: string;
|
|
80
|
+
invalidSearchInput: string;
|
|
81
|
+
logout: string;
|
|
82
|
+
new: string;
|
|
83
|
+
takeAction: string;
|
|
84
|
+
unblock: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type MemberText = {
|
|
88
|
+
addMember: string;
|
|
89
|
+
admin: string;
|
|
90
|
+
agent: string;
|
|
91
|
+
agents: string;
|
|
92
|
+
activeMembersHeading: string;
|
|
93
|
+
accountActivatedToastMessage: string;
|
|
94
|
+
activateMember: string;
|
|
95
|
+
activateMemberAlertMessage: string;
|
|
96
|
+
addMemberToProducts: string;
|
|
97
|
+
deactivateAccountToastMessage: string;
|
|
98
|
+
deactivateMember: string;
|
|
99
|
+
deactivateMemberAlertMessage: string;
|
|
100
|
+
editMember: string;
|
|
101
|
+
inviteMessage: string;
|
|
102
|
+
memberAddedMessage: string;
|
|
103
|
+
members: string;
|
|
104
|
+
newHeading: string;
|
|
105
|
+
updatedMemberRole: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
type SignUpTexts = {
|
|
109
|
+
email: string;
|
|
110
|
+
profile: string;
|
|
111
|
+
tryItFree: string;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
type Environment = {
|
|
115
|
+
development: string;
|
|
116
|
+
staging: string;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// utils ------------------------------------------------
|
|
120
|
+
|
|
121
|
+
// Utils: auth
|
|
122
|
+
|
|
123
|
+
function verifySSOLoginPage(): Void;
|
|
124
|
+
|
|
125
|
+
function logout(homeUrl: string): Void;
|
|
126
|
+
|
|
127
|
+
// Utils: date
|
|
128
|
+
|
|
129
|
+
function currentDate(): String;
|
|
130
|
+
|
|
131
|
+
function futureDate(numberOfDays: number = 1): String;
|
|
132
|
+
|
|
133
|
+
function pastDate(numberOfDays: number = 1): String;
|
|
134
|
+
|
|
135
|
+
// Utils: common
|
|
136
|
+
export function dataCy(dataCyId: string): String;
|
|
137
|
+
|
|
138
|
+
export function setListCount(countSelector: string, alias: string): Void;
|
|
139
|
+
|
|
140
|
+
export function verifyListCount(countSelector: string, count: number): String;
|
|
141
|
+
|
|
142
|
+
export function getUrl(path: string): String;
|
|
143
|
+
|
|
144
|
+
export function getTestTitle(): String;
|
|
145
|
+
|
|
146
|
+
export function initializeCredentials(props: {
|
|
147
|
+
businessName: string;
|
|
148
|
+
currentUserName: string;
|
|
149
|
+
email: string;
|
|
150
|
+
firstName: string;
|
|
151
|
+
lastName: string;
|
|
152
|
+
domain: string;
|
|
153
|
+
subdomainName: string;
|
|
154
|
+
skipSetup: boolean;
|
|
155
|
+
}): String;
|
|
156
|
+
|
|
157
|
+
// Utils: organization
|
|
158
|
+
|
|
159
|
+
export function createOrganization(props: {
|
|
160
|
+
baseUrl: string;
|
|
161
|
+
businessName: string;
|
|
162
|
+
email: string;
|
|
163
|
+
firstName: string;
|
|
164
|
+
lastName: string;
|
|
165
|
+
subdomainName: string;
|
|
166
|
+
}): Void;
|
|
167
|
+
|
|
168
|
+
// Utils: validation
|
|
169
|
+
|
|
170
|
+
function verifyCrossSiteScript(
|
|
171
|
+
inputSelector: string,
|
|
172
|
+
submitSelector: string
|
|
173
|
+
): Void;
|
|
174
|
+
|
|
175
|
+
// Utils: members
|
|
176
|
+
|
|
177
|
+
function addMemberViaRequest(props: {
|
|
178
|
+
email: string;
|
|
179
|
+
role: string;
|
|
180
|
+
requestCount: number;
|
|
181
|
+
appName: string;
|
|
182
|
+
}): Void;
|
|
183
|
+
|
|
184
|
+
function addMemberViaUI(email: string, role: string = "Agent"): Void;
|
|
185
|
+
|
|
186
|
+
function activateMember(props: {
|
|
187
|
+
email: string;
|
|
188
|
+
skipSearchRequest: boolean;
|
|
189
|
+
}): Void;
|
|
190
|
+
|
|
191
|
+
function activateMemberViaRequest(email: string, requestCount: number): Void;
|
|
192
|
+
|
|
193
|
+
function checkColumnCheckBox(fieldSelector: string): Void;
|
|
194
|
+
|
|
195
|
+
function deactivateMember(props: {
|
|
196
|
+
email: string;
|
|
197
|
+
skipSearchRequest: boolean;
|
|
198
|
+
}): Void;
|
|
199
|
+
|
|
200
|
+
function deactivateMemberViaRequest(email: string, requestCount: number): Void;
|
|
201
|
+
|
|
202
|
+
function editMember(props: {
|
|
203
|
+
email: string;
|
|
204
|
+
role: string;
|
|
205
|
+
skipSearchRequest: boolean;
|
|
206
|
+
}): Void;
|
|
207
|
+
|
|
208
|
+
function interceptMemberApi(alias: string, times: number = 1): Void;
|
|
209
|
+
|
|
210
|
+
function navigateToMembersPage(waitForRequest: boolean = true): Void;
|
|
211
|
+
|
|
212
|
+
function navigateToNewMemberPanel(waitForRequest: boolean = true): Void;
|
|
213
|
+
|
|
214
|
+
function unCheckColumnCheckBox(fieldSelector: string): Void;
|
|
215
|
+
|
|
216
|
+
function verifyActivatedMember(props: {
|
|
217
|
+
email: string;
|
|
218
|
+
skipFetchRequest: boolean;
|
|
219
|
+
skipSearchRequest: boolean;
|
|
220
|
+
}): Void;
|
|
221
|
+
|
|
222
|
+
function verifyActivateAlert(props: {
|
|
223
|
+
email: string;
|
|
224
|
+
skipSearchRequest: boolean;
|
|
225
|
+
}): Void;
|
|
226
|
+
|
|
227
|
+
function verifyDeactivatedMember(props: {
|
|
228
|
+
email: string;
|
|
229
|
+
skipFetchRequest: boolean;
|
|
230
|
+
skipSearchRequest: boolean;
|
|
231
|
+
}): Void;
|
|
232
|
+
|
|
233
|
+
function verifyMemberDetails(props: {
|
|
234
|
+
email: string;
|
|
235
|
+
role: string;
|
|
236
|
+
skipSearchRequest: boolean;
|
|
237
|
+
}): Void;
|
|
238
|
+
|
|
239
|
+
// exporting all utils
|
|
240
|
+
|
|
241
|
+
export const authUtils = { verifySSOLoginPage, logout };
|
|
242
|
+
export const dateUtils = { currentDate, futureDate, pastDate };
|
|
243
|
+
export const memberUtils = {
|
|
244
|
+
addMemberViaRequest,
|
|
245
|
+
addMemberViaUI,
|
|
246
|
+
activateMember,
|
|
247
|
+
checkColumnCheckBox,
|
|
248
|
+
deactivateMember,
|
|
249
|
+
deactivateMemberViaRequest,
|
|
250
|
+
editMember,
|
|
251
|
+
interceptMemberApi,
|
|
252
|
+
navigateToMembersPage,
|
|
253
|
+
navigateToNewMemberPanel,
|
|
254
|
+
unCheckColumnCheckBox,
|
|
255
|
+
verifyActivatedMember,
|
|
256
|
+
verifyActivateAlert,
|
|
257
|
+
verifyDeactivatedMember,
|
|
258
|
+
verifyMemberDetails,
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// exporting all selectors
|
|
262
|
+
|
|
263
|
+
export declare const commonSelectors: CommonSelectors;
|
|
264
|
+
export declare const memberSelectors: MemberSelectors;
|
|
265
|
+
export declare const loginSelectors: LoginSelectors;
|
|
266
|
+
export declare const profileSelectors: ProfileSelectors;
|
|
267
|
+
export declare const signUpSelectors: SignUpSelectors;
|
|
268
|
+
|
|
269
|
+
// exporting all texts
|
|
270
|
+
|
|
271
|
+
export declare const commonTexts: CommonTexts;
|
|
272
|
+
export declare const memberTexts: MemberText;
|
|
273
|
+
export declare const signUpTexts: SignUpTexts;
|
|
274
|
+
export declare const environment: Environment;
|
|
275
|
+
export declare const isStagingEnv: Boolean;
|