@bigbinary/neeto-playwright-commons 1.2.0 → 1.3.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.cjs.js +339 -144
- package/index.cjs.js.map +1 -1
- package/index.d.ts +194 -20
- package/index.js +313 -128
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var test = require('@playwright/test');
|
|
6
|
-
var dayjs = require('dayjs');
|
|
7
6
|
var require$$0$3 = require('fs');
|
|
8
7
|
var require$$2 = require('os');
|
|
9
8
|
var require$$0 = require('path');
|
|
@@ -11,29 +10,29 @@ var require$$0$1 = require('util');
|
|
|
11
10
|
var require$$0$2 = require('stream');
|
|
12
11
|
var require$$0$4 = require('events');
|
|
13
12
|
var ramda = require('ramda');
|
|
13
|
+
var dayjs = require('dayjs');
|
|
14
14
|
var require$$3 = require('crypto');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
17
|
|
|
18
18
|
function _interopNamespace(e) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
if (e && e.__esModule) return e;
|
|
20
|
+
var n = Object.create(null);
|
|
21
|
+
if (e) {
|
|
22
|
+
Object.keys(e).forEach(function (k) {
|
|
23
|
+
if (k !== 'default') {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
25
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return e[k]; }
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
n["default"] = e;
|
|
33
|
+
return Object.freeze(n);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
37
36
|
var require$$0__default$3 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
|
|
38
37
|
var require$$0__namespace = /*#__PURE__*/_interopNamespace(require$$0$3);
|
|
39
38
|
var require$$2__default = /*#__PURE__*/_interopDefaultLegacy(require$$2);
|
|
@@ -41,130 +40,9 @@ var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
|
41
40
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$1);
|
|
42
41
|
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
43
42
|
var require$$0__default$4 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
|
|
43
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
44
44
|
var require$$3__default = /*#__PURE__*/_interopDefaultLegacy(require$$3);
|
|
45
45
|
|
|
46
|
-
const COMMON_SELECTORS = {
|
|
47
|
-
toastMessage: "toastr-message-container",
|
|
48
|
-
toastIcon: ".Toastify__toast-icon",
|
|
49
|
-
toastCloseButton: "toastr-close-button",
|
|
50
|
-
dropdownIcon: "nui-dropdown-icon",
|
|
51
|
-
checkbox: "nui-checkbox-input",
|
|
52
|
-
spinner: ".neeto-ui-spinner",
|
|
53
|
-
input: "nui-input-field",
|
|
54
|
-
alertModalSubmitButton: "alert-submit-button",
|
|
55
|
-
selectContainer: "nui-select-container",
|
|
56
|
-
subheaderText: "subheader-left",
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
class CustomCommands {
|
|
60
|
-
constructor(page, request) {
|
|
61
|
-
this.interceptMultipleResponses = ({ responseUrl = "", times = 1, baseUrl, }) => Promise.all([...new Array(times)].map(() => this.page.waitForResponse((response) => {
|
|
62
|
-
var _a, _b, _c;
|
|
63
|
-
if (response.request().resourceType() === "xhr" &&
|
|
64
|
-
response.status() === 200 &&
|
|
65
|
-
response.url().includes(responseUrl) &&
|
|
66
|
-
response
|
|
67
|
-
.url()
|
|
68
|
-
.startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : process.env.BASE_URL) !== null && _a !== void 0 ? _a : "") &&
|
|
69
|
-
!this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
|
|
70
|
-
this.responses.push((_c = response.headers()) === null || _c === void 0 ? void 0 : _c["x-request-id"]);
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
return false;
|
|
74
|
-
}, { timeout: 10000 })));
|
|
75
|
-
this.recursiveMethod = async (callback, condition, timeout, startTime) => {
|
|
76
|
-
if (Date.now() - timeout >= startTime) {
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
else if (await condition()) {
|
|
80
|
-
return await callback();
|
|
81
|
-
}
|
|
82
|
-
return await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
83
|
-
};
|
|
84
|
-
this.executeRecursively = async ({ callback, condition, timeout = 5000, }) => {
|
|
85
|
-
const startTime = Date.now();
|
|
86
|
-
await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
87
|
-
};
|
|
88
|
-
this.verifySuccessToast = async ({ message, closeAfterVerification = true, }) => {
|
|
89
|
-
if (message) {
|
|
90
|
-
await test.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toHaveValue(message);
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
await test.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toHaveValue("👍");
|
|
94
|
-
closeAfterVerification &&
|
|
95
|
-
(await this.page
|
|
96
|
-
.getByTestId(COMMON_SELECTORS.toastCloseButton)
|
|
97
|
-
.click());
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
this.reloadAndWait = async (requestCount) => {
|
|
101
|
-
const reloadRequests = this.interceptMultipleResponses({
|
|
102
|
-
times: requestCount,
|
|
103
|
-
});
|
|
104
|
-
await this.page.reload();
|
|
105
|
-
await reloadRequests;
|
|
106
|
-
};
|
|
107
|
-
this.apiRequest = async ({ url, headers: additionalHeaders, body: data, method = "get", params = {}, ...otherOptions }) => {
|
|
108
|
-
const csrfToken = await this.page
|
|
109
|
-
.locator("[name='csrf-token']")
|
|
110
|
-
.getAttribute("content");
|
|
111
|
-
const requestOptions = {
|
|
112
|
-
headers: {
|
|
113
|
-
...additionalHeaders,
|
|
114
|
-
"accept-encoding": "gzip",
|
|
115
|
-
"x-csrf-token": csrfToken !== null && csrfToken !== void 0 ? csrfToken : "",
|
|
116
|
-
},
|
|
117
|
-
data,
|
|
118
|
-
params,
|
|
119
|
-
...otherOptions,
|
|
120
|
-
};
|
|
121
|
-
const httpMethodsHandlers = {
|
|
122
|
-
get: () => this.request.get(url, requestOptions),
|
|
123
|
-
post: () => this.request.post(url, requestOptions),
|
|
124
|
-
put: () => this.request.put(url, requestOptions),
|
|
125
|
-
delete: () => this.request.delete(url, requestOptions),
|
|
126
|
-
};
|
|
127
|
-
return await httpMethodsHandlers[method]();
|
|
128
|
-
};
|
|
129
|
-
this.verifyFieldValue = values => {
|
|
130
|
-
const verifyEachFieldValue = ({ field, value, }) => test.expect(this.page.getByTestId(field)).toHaveValue(value);
|
|
131
|
-
return Array.isArray(values)
|
|
132
|
-
? Promise.all(values.map(value => verifyEachFieldValue(value)))
|
|
133
|
-
: verifyEachFieldValue(values);
|
|
134
|
-
};
|
|
135
|
-
this.page = page;
|
|
136
|
-
this.responses = [];
|
|
137
|
-
this.request = request;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
const commands = {
|
|
142
|
-
neetoPlaywrightUtilities: async ({ page, request }, use) => {
|
|
143
|
-
const commands = new CustomCommands(page, request);
|
|
144
|
-
await use(commands);
|
|
145
|
-
},
|
|
146
|
-
page: async ({ page }, use) => {
|
|
147
|
-
await page.goto("/");
|
|
148
|
-
await page.waitForLoadState();
|
|
149
|
-
await use(page);
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
const ENVIRONMENT = {
|
|
154
|
-
development: "development",
|
|
155
|
-
staging: "staging",
|
|
156
|
-
review: "review",
|
|
157
|
-
};
|
|
158
|
-
const IS_STAGING_ENV = process.env.TEST_ENV === "staging";
|
|
159
|
-
const STORAGE_STATE = "./e2e/auth/user.json";
|
|
160
|
-
const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
|
|
161
|
-
const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
|
|
162
|
-
const CREDENTIALS = {
|
|
163
|
-
name: "Oliver Smith",
|
|
164
|
-
email: "oliver@example.com",
|
|
165
|
-
password: "welcome",
|
|
166
|
-
};
|
|
167
|
-
|
|
168
46
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
169
47
|
|
|
170
48
|
var tasks = {};
|
|
@@ -6863,6 +6741,21 @@ function assertPatternsInput(input) {
|
|
|
6863
6741
|
}
|
|
6864
6742
|
var out = FastGlob;
|
|
6865
6743
|
|
|
6744
|
+
const ENVIRONMENT = {
|
|
6745
|
+
development: "development",
|
|
6746
|
+
staging: "staging",
|
|
6747
|
+
review: "review",
|
|
6748
|
+
};
|
|
6749
|
+
const IS_STAGING_ENV = process.env.TEST_ENV === "staging";
|
|
6750
|
+
const STORAGE_STATE = "./e2e/auth/user.json";
|
|
6751
|
+
const GLOBAL_TRANSLATIONS_PATTERN = "../node_modules/@bigbinary/**/translations/en.json";
|
|
6752
|
+
const PROJECT_TRANSLATIONS_PATH = "../app/javascript/src/translations/en.json";
|
|
6753
|
+
const CREDENTIALS = {
|
|
6754
|
+
name: "Oliver Smith",
|
|
6755
|
+
email: "oliver@example.com",
|
|
6756
|
+
password: "welcome",
|
|
6757
|
+
};
|
|
6758
|
+
|
|
6866
6759
|
const joinString = (string1, string2, string3 = "", separator = " ") => {
|
|
6867
6760
|
if (string3 === "") {
|
|
6868
6761
|
return string1 + separator + string2;
|
|
@@ -6907,6 +6800,166 @@ const readTranslations = () => {
|
|
|
6907
6800
|
});
|
|
6908
6801
|
return translations;
|
|
6909
6802
|
};
|
|
6803
|
+
const hyphenize = input => {
|
|
6804
|
+
const fallbackString = "";
|
|
6805
|
+
if (typeof input === "number")
|
|
6806
|
+
return String(input);
|
|
6807
|
+
if (input && typeof input === "string" && input.replace) {
|
|
6808
|
+
return input
|
|
6809
|
+
.replace(/[\s_]/g, "-")
|
|
6810
|
+
.replace(/([a-z])([A-Z])/g, "$1-$2")
|
|
6811
|
+
.replace(/-+/g, "-")
|
|
6812
|
+
.toLowerCase();
|
|
6813
|
+
}
|
|
6814
|
+
return fallbackString;
|
|
6815
|
+
};
|
|
6816
|
+
const joinHyphenCase = (...args) => args.join(" ").replace(/\s+/g, "-").toLowerCase();
|
|
6817
|
+
|
|
6818
|
+
const COMMON_SELECTORS = {
|
|
6819
|
+
spinner: ".neeto-ui-spinner",
|
|
6820
|
+
subheaderText: "subheader-left",
|
|
6821
|
+
alertTitle: "alert-title",
|
|
6822
|
+
alertModalMessage: "alert-message",
|
|
6823
|
+
alertModalSubmitButton: "alert-submit-button",
|
|
6824
|
+
checkbox: "nui-checkbox-input",
|
|
6825
|
+
checkboxLabel: "nui-checkbox-label",
|
|
6826
|
+
dropdownContainer: "nui-dropdown-container",
|
|
6827
|
+
dropdownIcon: "nui-dropdown-icon",
|
|
6828
|
+
heading: "main-header",
|
|
6829
|
+
paneBody: "pane-body",
|
|
6830
|
+
paneHeader: "pane-header",
|
|
6831
|
+
profileSidebar: "profile-section",
|
|
6832
|
+
selectOption: (label) => `${hyphenize(label)}-select-option`,
|
|
6833
|
+
toastMessage: "toastr-message-container",
|
|
6834
|
+
toastCloseButton: "toastr-close-button",
|
|
6835
|
+
windowAlert: "#alert-box",
|
|
6836
|
+
body: "body",
|
|
6837
|
+
toastIcon: ".Toastify__toast-icon",
|
|
6838
|
+
paneModalCrossIcon: "pane-close-button",
|
|
6839
|
+
inputField: "nui-input-field",
|
|
6840
|
+
alertConfirmationText: "alert-confirmation-text",
|
|
6841
|
+
alertCancelButton: "alert-cancel-button",
|
|
6842
|
+
alertModalCrossIcon: "modal-close-button",
|
|
6843
|
+
saveChangesButton: "save-changes-button",
|
|
6844
|
+
cancelButton: "cancel-button",
|
|
6845
|
+
inputFieldError: "nui-input-error",
|
|
6846
|
+
selectDropDownError: "nui-select-error",
|
|
6847
|
+
subTitleHeading: "menubar-subtitle-heading",
|
|
6848
|
+
noDataTitle: "no-data-title",
|
|
6849
|
+
noDataDescription: "no-data-description",
|
|
6850
|
+
backdrop: "neeto-backdrop",
|
|
6851
|
+
menuBarHeading: "menubar-heading",
|
|
6852
|
+
dropdownWrapper: "nui-select-container-wrapper",
|
|
6853
|
+
toggleButton: "menubar-toggle-button",
|
|
6854
|
+
tooltip: "tooltip-box",
|
|
6855
|
+
articlePageTitle: ".serene-article__title",
|
|
6856
|
+
tabItem: "tab-item",
|
|
6857
|
+
labelInputError: "label-input-error",
|
|
6858
|
+
urlInputError: "url-input-error",
|
|
6859
|
+
noDataPrimaryButton: "no-data-primary-button",
|
|
6860
|
+
modalHeader: "modal-header",
|
|
6861
|
+
nameInputError: "name-input-error",
|
|
6862
|
+
selectContainer: "nui-select-container",
|
|
6863
|
+
dropdownMenu: "nui-select-menu",
|
|
6864
|
+
sidebarToggle: "neeto-molecules-sidebar-toggler",
|
|
6865
|
+
subheader: "subheader",
|
|
6866
|
+
settingsLink: "Settings",
|
|
6867
|
+
ticketFieldTextInput: (label) => `${hyphenize(label)}-text-input`,
|
|
6868
|
+
};
|
|
6869
|
+
|
|
6870
|
+
class CustomCommands {
|
|
6871
|
+
constructor(page, request) {
|
|
6872
|
+
this.interceptMultipleResponses = ({ responseUrl = "", times = 1, baseUrl, }) => Promise.all([...new Array(times)].map(() => this.page.waitForResponse((response) => {
|
|
6873
|
+
var _a, _b, _c;
|
|
6874
|
+
if (response.request().resourceType() === "xhr" &&
|
|
6875
|
+
response.status() === 200 &&
|
|
6876
|
+
response.url().includes(responseUrl) &&
|
|
6877
|
+
response
|
|
6878
|
+
.url()
|
|
6879
|
+
.startsWith((_a = baseUrl !== null && baseUrl !== void 0 ? baseUrl : process.env.BASE_URL) !== null && _a !== void 0 ? _a : "") &&
|
|
6880
|
+
!this.responses.includes((_b = response.headers()) === null || _b === void 0 ? void 0 : _b["x-request-id"])) {
|
|
6881
|
+
this.responses.push((_c = response.headers()) === null || _c === void 0 ? void 0 : _c["x-request-id"]);
|
|
6882
|
+
return true;
|
|
6883
|
+
}
|
|
6884
|
+
return false;
|
|
6885
|
+
}, { timeout: 10000 })));
|
|
6886
|
+
this.recursiveMethod = async (callback, condition, timeout, startTime) => {
|
|
6887
|
+
if (Date.now() - timeout >= startTime) {
|
|
6888
|
+
return false;
|
|
6889
|
+
}
|
|
6890
|
+
else if (await condition()) {
|
|
6891
|
+
return await callback();
|
|
6892
|
+
}
|
|
6893
|
+
return await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
6894
|
+
};
|
|
6895
|
+
this.executeRecursively = async ({ callback, condition, timeout = 5000, }) => {
|
|
6896
|
+
const startTime = Date.now();
|
|
6897
|
+
await this.recursiveMethod(callback, condition, timeout, startTime);
|
|
6898
|
+
};
|
|
6899
|
+
this.verifySuccessToast = async ({ message, closeAfterVerification = true, }) => {
|
|
6900
|
+
if (message) {
|
|
6901
|
+
await test.expect(this.page.getByTestId(COMMON_SELECTORS.toastMessage)).toHaveValue(message);
|
|
6902
|
+
}
|
|
6903
|
+
else {
|
|
6904
|
+
await test.expect(this.page.locator(COMMON_SELECTORS.toastIcon)).toHaveValue("👍");
|
|
6905
|
+
closeAfterVerification &&
|
|
6906
|
+
(await this.page
|
|
6907
|
+
.getByTestId(COMMON_SELECTORS.toastCloseButton)
|
|
6908
|
+
.click());
|
|
6909
|
+
}
|
|
6910
|
+
};
|
|
6911
|
+
this.reloadAndWait = async (requestCount) => {
|
|
6912
|
+
const reloadRequests = this.interceptMultipleResponses({
|
|
6913
|
+
times: requestCount,
|
|
6914
|
+
});
|
|
6915
|
+
await this.page.reload();
|
|
6916
|
+
await reloadRequests;
|
|
6917
|
+
};
|
|
6918
|
+
this.apiRequest = async ({ url, headers: additionalHeaders, body: data, method = "get", params = {}, ...otherOptions }) => {
|
|
6919
|
+
const csrfToken = await this.page
|
|
6920
|
+
.locator("[name='csrf-token']")
|
|
6921
|
+
.getAttribute("content");
|
|
6922
|
+
const requestOptions = {
|
|
6923
|
+
headers: {
|
|
6924
|
+
...additionalHeaders,
|
|
6925
|
+
"accept-encoding": "gzip",
|
|
6926
|
+
"x-csrf-token": csrfToken !== null && csrfToken !== void 0 ? csrfToken : "",
|
|
6927
|
+
},
|
|
6928
|
+
data,
|
|
6929
|
+
params,
|
|
6930
|
+
...otherOptions,
|
|
6931
|
+
};
|
|
6932
|
+
const httpMethodsHandlers = {
|
|
6933
|
+
get: () => this.request.get(url, requestOptions),
|
|
6934
|
+
post: () => this.request.post(url, requestOptions),
|
|
6935
|
+
put: () => this.request.put(url, requestOptions),
|
|
6936
|
+
delete: () => this.request.delete(url, requestOptions),
|
|
6937
|
+
};
|
|
6938
|
+
return await httpMethodsHandlers[method]();
|
|
6939
|
+
};
|
|
6940
|
+
this.verifyFieldValue = values => {
|
|
6941
|
+
const verifyEachFieldValue = ({ field, value, }) => test.expect(this.page.getByTestId(field)).toHaveValue(value);
|
|
6942
|
+
return Array.isArray(values)
|
|
6943
|
+
? Promise.all(values.map(value => verifyEachFieldValue(value)))
|
|
6944
|
+
: verifyEachFieldValue(values);
|
|
6945
|
+
};
|
|
6946
|
+
this.page = page;
|
|
6947
|
+
this.responses = [];
|
|
6948
|
+
this.request = request;
|
|
6949
|
+
}
|
|
6950
|
+
}
|
|
6951
|
+
|
|
6952
|
+
const commands = {
|
|
6953
|
+
neetoPlaywrightUtilities: async ({ page, request }, use) => {
|
|
6954
|
+
const commands = new CustomCommands(page, request);
|
|
6955
|
+
await use(commands);
|
|
6956
|
+
},
|
|
6957
|
+
page: async ({ page }, use) => {
|
|
6958
|
+
await page.goto("/");
|
|
6959
|
+
await page.waitForLoadState();
|
|
6960
|
+
await use(page);
|
|
6961
|
+
},
|
|
6962
|
+
};
|
|
6910
6963
|
|
|
6911
6964
|
const generateStagingData = (product = "invoice") => {
|
|
6912
6965
|
const timestamp = dayjs__default["default"]().format("YYYYMMDDHH");
|
|
@@ -6948,12 +7001,19 @@ const i18n = {
|
|
|
6948
7001
|
const BASE_URL = "/api/v1";
|
|
6949
7002
|
const ROUTES = {
|
|
6950
7003
|
neetoAuth: "https://app.neetoauth.net",
|
|
7004
|
+
neetoAuthSignup: "https://app.neetoauth.net/signups/new",
|
|
6951
7005
|
profile: "/profile",
|
|
6952
7006
|
login: `${BASE_URL}/login`,
|
|
6953
7007
|
signup: `${BASE_URL}/signups`,
|
|
6954
7008
|
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
6955
7009
|
countries: `${BASE_URL}/countries`,
|
|
6956
7010
|
neetoApps: `${BASE_URL}/neeto_apps`,
|
|
7011
|
+
teamMembers: {
|
|
7012
|
+
all: "/team_members*/**",
|
|
7013
|
+
bulkUpdate: "/team_members/teams/bulk_update",
|
|
7014
|
+
index: "/team_members/teams",
|
|
7015
|
+
show: (id) => `/team_members/teams/${id}`,
|
|
7016
|
+
},
|
|
6957
7017
|
};
|
|
6958
7018
|
|
|
6959
7019
|
const SIGNUP_SELECTORS = {
|
|
@@ -6985,10 +7045,9 @@ class OrganizationPage {
|
|
|
6985
7045
|
const defaultOtp = "123456";
|
|
6986
7046
|
const appNameInLowerCase = appName.toLowerCase();
|
|
6987
7047
|
const isNeetoAuth = appNameInLowerCase === "neetoauth";
|
|
6988
|
-
const authUrl = "https://app.neetoauth.net/signups/new";
|
|
6989
7048
|
isNeetoAuth
|
|
6990
|
-
? await this.page.goto(
|
|
6991
|
-
: await this.page.goto(`${
|
|
7049
|
+
? await this.page.goto(ROUTES.neetoAuthSignup)
|
|
7050
|
+
: await this.page.goto(`${ROUTES.neetoAuthSignup}?redirect_uri=${appNameInLowerCase}.net`);
|
|
6992
7051
|
await this.page.getByTestId(SIGNUP_SELECTORS.emailTextField).fill(email);
|
|
6993
7052
|
const signup = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
6994
7053
|
responseUrl: ROUTES.signup,
|
|
@@ -7090,6 +7149,62 @@ class OrganizationPage {
|
|
|
7090
7149
|
}
|
|
7091
7150
|
}
|
|
7092
7151
|
|
|
7152
|
+
const NEETO_EDITOR_SELECTORS = {
|
|
7153
|
+
boldOption: "neeto-editor-fixed-menu-bold-option",
|
|
7154
|
+
italicOption: "neeto-editor-fixed-menu-italic-option",
|
|
7155
|
+
underlineOption: "neeto-editor-fixed-menu-underline-option",
|
|
7156
|
+
strikeOption: "neeto-editor-fixed-menu-strike-option",
|
|
7157
|
+
codeBlockOption: "neeto-editor-fixed-menu-code-option",
|
|
7158
|
+
highlightOption: "neeto-editor-fixed-menu-highlight-option",
|
|
7159
|
+
linkInput: "neeto-editor-fixed-menu-link-option-input",
|
|
7160
|
+
linkSubmitButton: "neeto-editor-fixed-menu-link-option-link-button",
|
|
7161
|
+
commandList: (index) => `neeto-editor-command-list-item-${index}`,
|
|
7162
|
+
imageUploadUrlSubmitButton: "neeto-editor-media-upload-url-submit",
|
|
7163
|
+
imageUploadUrlInputTextField: "neeto-editor-media-upload-url-input",
|
|
7164
|
+
uploadInput: "neeto-editor-media-uploader-input",
|
|
7165
|
+
editorMenuBarWrapper: "neeto-editor-fixed-menu-wrapper",
|
|
7166
|
+
undoOption: "neeto-editor-fixed-menu-undo-option",
|
|
7167
|
+
redoOption: "neeto-editor-fixed-menu-redo-option",
|
|
7168
|
+
imageWrapper: "neeto-editor-image-wrapper",
|
|
7169
|
+
};
|
|
7170
|
+
|
|
7171
|
+
const NEETO_FILTERS_SELECTORS = {
|
|
7172
|
+
emailSelectContainer: "email-select-container-wrapper",
|
|
7173
|
+
filterPaneHeading: "neeto-filters-pane-header",
|
|
7174
|
+
neetoFiltersEmailBlock: "neeto-filters-email-block",
|
|
7175
|
+
neetoFiltersRoleBlock: "neeto-filters-role-block",
|
|
7176
|
+
neetoFiltersBarClearButton: "neeto-filters-bar-clear-btn",
|
|
7177
|
+
neetoFiltersNameFilterField: "neeto-filters-name-filter",
|
|
7178
|
+
neetoFilterNameBlock: "neeto-filters-name-block",
|
|
7179
|
+
roleSelectContainer: "role-select-container-wrapper",
|
|
7180
|
+
filterButton: "neeto-filters-toggle-btn",
|
|
7181
|
+
filtersClearButton: "neeto-filters-clear-btn",
|
|
7182
|
+
filterDoneButton: "neeto-filters-done-btn",
|
|
7183
|
+
filteredMembersCount: "ntm-filtered-members-count",
|
|
7184
|
+
allMenubarBlock: "ntm-members-menubar-all-block",
|
|
7185
|
+
filtersEmailFilter: "neeto-filters-email-filter",
|
|
7186
|
+
paneModalCrossIcon: "neeto-filters-close-button",
|
|
7187
|
+
};
|
|
7188
|
+
|
|
7189
|
+
const HELP_CENTER_SELECTORS = {
|
|
7190
|
+
helpButton: "help-button",
|
|
7191
|
+
documentationButton: "help-link-help-center-button",
|
|
7192
|
+
keyboardShortcutButton: "help-link-keyboard-shortcut-button",
|
|
7193
|
+
chatButton: "help-link-live-chat-button",
|
|
7194
|
+
whatsNewButton: "help-link-changelog-button",
|
|
7195
|
+
whatsNewWidgetInfo: "h1",
|
|
7196
|
+
whatsNewWidgetCloseButton: ".nc-widget-header__btn",
|
|
7197
|
+
keyboardShortcutPaneHeading: "keyboard-shortcuts-pane-title",
|
|
7198
|
+
keyboardShortcutPaneCrossIcon: "keyboard-shortcuts-pane-close-button",
|
|
7199
|
+
};
|
|
7200
|
+
const CHAT_WIDGET_SELECTORS = {
|
|
7201
|
+
chatWidgetHomeCard: "neeto-chat-widget-cta-title",
|
|
7202
|
+
widgetSubmitButton: "neeto-chat-widget-pre-chat-submit-btn",
|
|
7203
|
+
chatBubbleMessage: "neeto-chat-widget-chat-message-bubble",
|
|
7204
|
+
chatCloseButton: ".neeto-chat-widget-icon--close",
|
|
7205
|
+
widgetIframe: "#neetochat-iframe",
|
|
7206
|
+
};
|
|
7207
|
+
|
|
7093
7208
|
const LOGIN_SELECTORS = {
|
|
7094
7209
|
appleAuthenticationButton: "apple-authentication-button",
|
|
7095
7210
|
emailTextField: "login-email-text-field",
|
|
@@ -7102,7 +7217,77 @@ const LOGIN_SELECTORS = {
|
|
|
7102
7217
|
twitterAuthenticationButton: "twitter-authentication-button",
|
|
7103
7218
|
};
|
|
7104
7219
|
|
|
7105
|
-
const
|
|
7220
|
+
const MEMBER_SELECTORS = {
|
|
7221
|
+
membersTab: "members-nav-tab",
|
|
7222
|
+
newButton: "ntm-add-member-button",
|
|
7223
|
+
continueButton: "ntm-manage-member-continue-button",
|
|
7224
|
+
submitButton: "ntm-manage-member-submit-button",
|
|
7225
|
+
searchTextField: "ntm-search-members-input",
|
|
7226
|
+
deactivatedAgentsButton: "ntm-members-menubar-deactivated-block",
|
|
7227
|
+
activatedMembersButton: "ntm-members-menubar-active-block",
|
|
7228
|
+
columnCheckBox: "neeto-ui-columns-checkbox",
|
|
7229
|
+
roleLabel: (role) => `${joinHyphenCase(role)}-radio-label`,
|
|
7230
|
+
dropDownIcon: "ntm-members-table-row-dropdown-button",
|
|
7231
|
+
editButton: "ntm-edit-member-button",
|
|
7232
|
+
menuBarHeading: "ntm-members-menubar-heading",
|
|
7233
|
+
activateOrDeactivateMember: "ntm-deactivate-member-button",
|
|
7234
|
+
columnsButton: "columns-dropdown-button",
|
|
7235
|
+
columnsDropdownContainer: "columns-dropdown-container",
|
|
7236
|
+
emailDropdownItemLabel: "email-checkbox-label",
|
|
7237
|
+
roleDropdownItemLabel: "role-checkbox-label",
|
|
7238
|
+
inviteStatusDropdownItemLabel: "invite-status-checkbox-label",
|
|
7239
|
+
heading: "ntm-manage-members-pane-header",
|
|
7240
|
+
activateButton: "ntm-activate-members-button",
|
|
7241
|
+
deactivateButton: "ntm-deactivate-members-button",
|
|
7242
|
+
rolesButton: "ntm-manage-member-roles-button",
|
|
7243
|
+
statusTag: "ntm-member-status-tag",
|
|
7244
|
+
};
|
|
7245
|
+
const MEMBER_FORM_SELECTORS = {
|
|
7246
|
+
emailTextField: "email-select-input-field",
|
|
7247
|
+
firstNameTextField: "ntm-edit-member-first-name-text-field",
|
|
7248
|
+
lastNameTextField: "ntm-edit-member-last-name-text-field",
|
|
7249
|
+
emailInput: "ntm-manage-member-email-input",
|
|
7250
|
+
emailErrorField: "emails-input-error",
|
|
7251
|
+
cancelButton: "ntm-manage-member-cancel-button",
|
|
7252
|
+
};
|
|
7253
|
+
|
|
7254
|
+
const ROLES_SELECTORS = {
|
|
7255
|
+
newButton: "ntm-add-role-button",
|
|
7256
|
+
proceedButton: "ntm-add-role-submit-button",
|
|
7257
|
+
cancelButton: "ntm-add-role-cancel-button",
|
|
7258
|
+
tableHeaderRoleName: "ntm-roles-table-role-header",
|
|
7259
|
+
nameTextField: "ntm-add-role-name-text-field",
|
|
7260
|
+
searchTextField: "ntm-search-roles-input",
|
|
7261
|
+
updateRolePaneHeading: "ntm-add-role-title",
|
|
7262
|
+
updateRoleCancelButton: "ntm-add-role-cancel-button",
|
|
7263
|
+
descriptionTextField: "ntm-add-role-description-text-field",
|
|
7264
|
+
permissionCategoryTitle: "ntm-roles-permission-category-title",
|
|
7265
|
+
headerColumn: "ntm-roles-table-header",
|
|
7266
|
+
dropDownIcon: "ntm-roles-table-header-role-dropdown-button",
|
|
7267
|
+
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
7268
|
+
};
|
|
7269
|
+
|
|
7270
|
+
const TAGS_SELECTORS = {
|
|
7271
|
+
newTagButton: "add-new-tag-button",
|
|
7272
|
+
tagNameTextField: "tag-name-text-field",
|
|
7273
|
+
editButton: "tags-edit-button",
|
|
7274
|
+
deleteButton: "tags-delete-button",
|
|
7275
|
+
cancelButton: "neeto-tags-manage-tag-cancel-button",
|
|
7276
|
+
submitButton: "neeto-tags-manage-tag-submit-button",
|
|
7277
|
+
searchTextField: "neeto-tags-search-text-input-field",
|
|
7278
|
+
descriptionTextArea: "tag-description-text-area",
|
|
7279
|
+
};
|
|
7280
|
+
const MERGE_TAGS_SELECTORS = {
|
|
7281
|
+
mergeTagsButton: "neeto-tags-merge-tags-button",
|
|
7282
|
+
mergeButton: "neeto-tags-merge-button",
|
|
7283
|
+
sourceSearchTextField: "neeto-tags-merge-source-search-text-input-field",
|
|
7284
|
+
sourceTagsList: "neeto-tags-merge-source-tags-list",
|
|
7285
|
+
destinationTagsList: "neeto-tags-merge-destination-tags-list",
|
|
7286
|
+
destinationSearchTextField: "neeto-tags-merge-destination-search-text-input-field",
|
|
7287
|
+
cancelButton: "neeto-tags-merge-cancel-button",
|
|
7288
|
+
proceedButton: "neeto-tags-merge-proceed-button",
|
|
7289
|
+
disabledTag: ".neeto-ui-cursor-not-allowed",
|
|
7290
|
+
};
|
|
7106
7291
|
|
|
7107
7292
|
const initializeCredentials = (product) => {
|
|
7108
7293
|
const { user } = readFileSyncIfExists();
|
|
@@ -7596,25 +7781,35 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
7596
7781
|
};
|
|
7597
7782
|
|
|
7598
7783
|
exports.BASE_URL = BASE_URL;
|
|
7784
|
+
exports.CHAT_WIDGET_SELECTORS = CHAT_WIDGET_SELECTORS;
|
|
7599
7785
|
exports.COMMON_SELECTORS = COMMON_SELECTORS;
|
|
7600
|
-
exports.COMMON_TEXTS = COMMON_TEXTS;
|
|
7601
7786
|
exports.CREDENTIALS = CREDENTIALS;
|
|
7602
7787
|
exports.CustomCommands = CustomCommands;
|
|
7603
7788
|
exports.ENVIRONMENT = ENVIRONMENT;
|
|
7604
7789
|
exports.GLOBAL_TRANSLATIONS_PATTERN = GLOBAL_TRANSLATIONS_PATTERN;
|
|
7790
|
+
exports.HELP_CENTER_SELECTORS = HELP_CENTER_SELECTORS;
|
|
7605
7791
|
exports.IS_STAGING_ENV = IS_STAGING_ENV;
|
|
7606
7792
|
exports.LOGIN_SELECTORS = LOGIN_SELECTORS;
|
|
7793
|
+
exports.MEMBER_FORM_SELECTORS = MEMBER_FORM_SELECTORS;
|
|
7794
|
+
exports.MEMBER_SELECTORS = MEMBER_SELECTORS;
|
|
7795
|
+
exports.MERGE_TAGS_SELECTORS = MERGE_TAGS_SELECTORS;
|
|
7796
|
+
exports.NEETO_EDITOR_SELECTORS = NEETO_EDITOR_SELECTORS;
|
|
7797
|
+
exports.NEETO_FILTERS_SELECTORS = NEETO_FILTERS_SELECTORS;
|
|
7607
7798
|
exports.OrganizationPage = OrganizationPage;
|
|
7608
7799
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
7800
|
+
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
7609
7801
|
exports.ROUTES = ROUTES;
|
|
7610
7802
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
7611
7803
|
exports.STORAGE_STATE = STORAGE_STATE;
|
|
7804
|
+
exports.TAGS_SELECTORS = TAGS_SELECTORS;
|
|
7612
7805
|
exports.clearCredentials = clearCredentials;
|
|
7613
7806
|
exports.commands = commands;
|
|
7614
7807
|
exports.definePlaywrightConfig = definePlaywrightConfig;
|
|
7615
7808
|
exports.generateStagingData = generateStagingData;
|
|
7809
|
+
exports.hyphenize = hyphenize;
|
|
7616
7810
|
exports.i18n = i18n;
|
|
7617
7811
|
exports.initializeCredentials = initializeCredentials;
|
|
7812
|
+
exports.joinHyphenCase = joinHyphenCase;
|
|
7618
7813
|
exports.joinString = joinString;
|
|
7619
7814
|
exports.login = login;
|
|
7620
7815
|
exports.loginWithoutSSO = loginWithoutSSO;
|