@bigbinary/neeto-commons-frontend 2.0.30 → 2.0.32

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