@bigbinary/neeto-playwright-commons 1.1.0

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.d.ts ADDED
@@ -0,0 +1,103 @@
1
+ import * as _playwright_test from '@playwright/test';
2
+ import { Page } from '@playwright/test';
3
+ import CustomCommands from '@utils/commands';
4
+
5
+ declare const ENVIRONMENT: {
6
+ development: string;
7
+ staging: string;
8
+ review: string;
9
+ };
10
+ declare const IS_STAGING_ENV: boolean;
11
+ declare const STORAGE_STATE = "./e2e/auth/user.json";
12
+ declare const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
13
+ declare const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
14
+
15
+ declare const BASE_URL = "/api/v1";
16
+ declare const PROFILE_PATH = "/profile";
17
+ declare const LOGIN_PATH = "/api/v1/login";
18
+ declare const SIGNUP_PATH = "/api/v1/signups";
19
+ declare const SUBDOMAIN_AVAILABILITY_PATH = "/api/v1/subdomain_availability";
20
+ declare const COUNTRIES_PATH = "/api/v1/countries";
21
+ declare const NEETO_APPS_PATH = "/api/v1/neeto_apps";
22
+
23
+ declare const COMMON_SELECTORS: {
24
+ toastMessage: string;
25
+ toastIcon: string;
26
+ toastCloseButton: string;
27
+ dropdownIcon: string;
28
+ checkbox: string;
29
+ spinner: string;
30
+ input: string;
31
+ alertModalSubmitButton: string;
32
+ selectContainer: string;
33
+ subheaderText: string;
34
+ };
35
+
36
+ declare const SIGNUP_SELECTORS: {
37
+ emailField: string;
38
+ signupButton: string;
39
+ otpInput: string;
40
+ organizationField: string;
41
+ subdomainField: string;
42
+ submitButton: string;
43
+ firstNameField: string;
44
+ lastNameField: string;
45
+ profileSubmitButton: string;
46
+ subdomainInputError: string;
47
+ };
48
+
49
+ declare const COMMON_TEXTS: {
50
+ edit: string;
51
+ };
52
+
53
+ declare const initializeCredentials: () => void;
54
+
55
+ interface KeyValue {
56
+ key: string;
57
+ value: string;
58
+ }
59
+ type JoinString = (string1: string, string2: string, string3?: string, separator?: string) => string;
60
+ interface UserContext {
61
+ user: Record<string, string>;
62
+ headers: Record<string, unknown>;
63
+ }
64
+ type ReadFileSyncIfExists = (path?: string) => UserContext & Record<string, object>;
65
+ type WriteDataToFile = (data: string) => boolean;
66
+ type UpdateCredentials = ({ key, value }: KeyValue) => boolean;
67
+ type ClearCredentials = () => void;
68
+ declare const joinString: JoinString;
69
+ declare const readFileSyncIfExists: ReadFileSyncIfExists;
70
+ declare const writeDataToFile: WriteDataToFile;
71
+ declare const updateCredentials: UpdateCredentials;
72
+ declare const clearCredentials: ClearCredentials;
73
+ declare const readTranslations: () => Record<string, unknown>;
74
+
75
+ declare const stagingData: {
76
+ firstName: string;
77
+ lastName: string;
78
+ otp: number;
79
+ domain: string;
80
+ currentUserName: string;
81
+ businessName: string;
82
+ subdomainName: string;
83
+ email: string;
84
+ };
85
+
86
+ interface Commands {
87
+ neetoPlaywrightUtilities: CustomCommands;
88
+ page: Page;
89
+ }
90
+ declare const test: _playwright_test.TestType<_playwright_test.PlaywrightTestArgs & _playwright_test.PlaywrightTestOptions & Commands, _playwright_test.PlaywrightWorkerArgs & _playwright_test.PlaywrightWorkerOptions>;
91
+
92
+ interface CurrentsOverrides {
93
+ projectId: string;
94
+ }
95
+ interface Overrides {
96
+ globalOverrides?: Record<string, any>;
97
+ useOverrides?: Record<string, any>;
98
+ projectOverrides?: Record<string, any>[];
99
+ currentsOverrides: CurrentsOverrides & Record<string, unknown>;
100
+ }
101
+ declare const definePlaywrightConfig: (overrides: Overrides) => any;
102
+
103
+ export { BASE_URL, COMMON_SELECTORS, COMMON_TEXTS, COUNTRIES_PATH, type Commands, ENVIRONMENT, GLOBAL_TRANSLATIONS_PATTERN, IS_STAGING_ENV, LOGIN_PATH, NEETO_APPS_PATH, PROFILE_PATH, PROJECT_TRANSLATIONS_PATH, SIGNUP_PATH, SIGNUP_SELECTORS, STORAGE_STATE, SUBDOMAIN_AVAILABILITY_PATH, clearCredentials, definePlaywrightConfig, initializeCredentials, joinString, readFileSyncIfExists, readTranslations, stagingData, test, updateCredentials, writeDataToFile };