@bigbinary/neeto-playwright-commons 1.9.1 → 1.9.3
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 +256 -56
- package/index.cjs.js.map +1 -1
- package/index.d.ts +272 -6
- package/index.js +252 -56
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -7,12 +7,12 @@ var child_process = require('child_process');
|
|
|
7
7
|
var fs$d = require('fs');
|
|
8
8
|
var ramda = require('ramda');
|
|
9
9
|
var require$$0$2 = require('util');
|
|
10
|
+
var Path = require('path');
|
|
10
11
|
var faker = require('@faker-js/faker');
|
|
11
12
|
var MailosaurClient = require('mailosaur');
|
|
12
13
|
var dayjs = require('dayjs');
|
|
13
14
|
var require$$1$1 = require('tty');
|
|
14
15
|
var require$$0$3 = require('os');
|
|
15
|
-
var Path = require('path');
|
|
16
16
|
var Stream$4 = require('stream');
|
|
17
17
|
var require$$0$4 = require('events');
|
|
18
18
|
var playwrightI18nextFixture = require('playwright-i18next-fixture');
|
|
@@ -53,11 +53,11 @@ var test__default = /*#__PURE__*/_interopDefaultLegacy(test$1);
|
|
|
53
53
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs$d);
|
|
54
54
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs$d);
|
|
55
55
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0$2);
|
|
56
|
+
var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);
|
|
56
57
|
var MailosaurClient__default = /*#__PURE__*/_interopDefaultLegacy(MailosaurClient);
|
|
57
58
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
58
59
|
var require$$1__default = /*#__PURE__*/_interopDefaultLegacy(require$$1$1);
|
|
59
60
|
var require$$0__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$0$3);
|
|
60
|
-
var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path);
|
|
61
61
|
var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream$4);
|
|
62
62
|
var require$$0__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$0$4);
|
|
63
63
|
var http__default = /*#__PURE__*/_interopDefaultLegacy(http$1);
|
|
@@ -72,6 +72,58 @@ var require$$1__default$1 = /*#__PURE__*/_interopDefaultLegacy(require$$1$2);
|
|
|
72
72
|
var require$$4__default = /*#__PURE__*/_interopDefaultLegacy(require$$4$1);
|
|
73
73
|
var require$$3__default$2 = /*#__PURE__*/_interopDefaultLegacy(require$$3$2);
|
|
74
74
|
|
|
75
|
+
const BASE_URL = "/api/v1";
|
|
76
|
+
const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
|
|
77
|
+
const ROUTES = {
|
|
78
|
+
neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
|
|
79
|
+
neetoAuth: NEETO_AUTH_BASE_URL(),
|
|
80
|
+
loginLink: "/login",
|
|
81
|
+
profile: "/profile",
|
|
82
|
+
admin: "/admin",
|
|
83
|
+
myProfile: "/my/profile",
|
|
84
|
+
authSettings: "/settings",
|
|
85
|
+
webhooks: "/webhooks",
|
|
86
|
+
login: `${BASE_URL}/login`,
|
|
87
|
+
signup: `${BASE_URL}/signups`,
|
|
88
|
+
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
89
|
+
countries: `${BASE_URL}/countries`,
|
|
90
|
+
neetoApps: `${BASE_URL}/neeto_apps`,
|
|
91
|
+
directUploads: "/direct_uploads",
|
|
92
|
+
teamMembers: {
|
|
93
|
+
all: "/team_members*/**",
|
|
94
|
+
bulkUpdate: "/team_members/teams/bulk_update",
|
|
95
|
+
index: "/team_members/teams",
|
|
96
|
+
show: (id) => `/team_members/teams/${id}`,
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
const API_ROUTES = {
|
|
100
|
+
teamMembers: {
|
|
101
|
+
all: "/team_members*/**",
|
|
102
|
+
bulkUpdate: "/team_members/teams/bulk_update",
|
|
103
|
+
index: "/team_members/teams",
|
|
104
|
+
show: (id) => `/team_members/teams/${id}`,
|
|
105
|
+
},
|
|
106
|
+
integrations: {
|
|
107
|
+
zapier: {
|
|
108
|
+
api_keys: "/neeto_integrations/zapier/api_keys",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
const THIRD_PARTY_ROUTES = {
|
|
113
|
+
webhooks: { site: "https://webhook.site/" },
|
|
114
|
+
slack: {
|
|
115
|
+
loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
|
|
116
|
+
},
|
|
117
|
+
zapier: {
|
|
118
|
+
login: "https://zapier.com/app/login",
|
|
119
|
+
logOut: "https://zapier.com/logout",
|
|
120
|
+
zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
const NEETO_ROUTES = {
|
|
124
|
+
imageUploader: "/neeto_image_uploader_engine",
|
|
125
|
+
};
|
|
126
|
+
|
|
75
127
|
const NEETO_FILTERS_SELECTORS = {
|
|
76
128
|
emailSelectContainer: "email-select-container-wrapper",
|
|
77
129
|
filterPaneHeading: "neeto-filters-pane-header",
|
|
@@ -91,6 +143,34 @@ const NEETO_FILTERS_SELECTORS = {
|
|
|
91
143
|
searchTermBlock: "neeto-filters-search-term-block",
|
|
92
144
|
};
|
|
93
145
|
|
|
146
|
+
const NEETO_IMAGE_UPLOADER_SELECTORS = {
|
|
147
|
+
imageUploaderWrapper: "image-uploader-wrapper",
|
|
148
|
+
browseText: "neeto-image-uploader-browse-text",
|
|
149
|
+
fileInput: "neeto-image-uploader-file-input",
|
|
150
|
+
uploadedImage: "uploaded-image",
|
|
151
|
+
uploadNewAsset: "upload-new-asset",
|
|
152
|
+
basicImageUploaderRemoveButton: "basic-image-uploader-remove-button",
|
|
153
|
+
removeButton: "image-uploader-remove-button",
|
|
154
|
+
openImageLibraryButton: "image-uploader-open-image-library-button",
|
|
155
|
+
openAssetLibraryButton: "open-asset-library-button",
|
|
156
|
+
imageEditorBackButton: "image-editor-back-button",
|
|
157
|
+
aspectRatioWidthInput: "aspect-ratio-width-input",
|
|
158
|
+
aspectRatioHeightInput: "aspect-ratio-height-input",
|
|
159
|
+
cropSubmitButton: "neeto-image-uploader-crop-submit-button",
|
|
160
|
+
restrictionMessage: "neeto-image-uploader-restriction-message",
|
|
161
|
+
progressBar: "neeto-image-uploader-progress-bar",
|
|
162
|
+
myImagesTab: "neeto-image-uploader-my-images-tab",
|
|
163
|
+
unsplashTab: "neeto-image-uploader-unsplash-tab",
|
|
164
|
+
nthLibraryImage: (index) => `niu-library-image-${index}`,
|
|
165
|
+
nthUnsplashImage: (index) => `niu-unsplash-image-${index}`,
|
|
166
|
+
unsplashSearchInput: "niu-unsplash-image-picker-search-input",
|
|
167
|
+
imageEditorUploadedImage: "image-editor-uploaded-image",
|
|
168
|
+
selectOriginalImageSwitch: "select-original-image-switch",
|
|
169
|
+
lockAspectRatioSwitch: "lock-aspect-ratio-switch",
|
|
170
|
+
widthInputField: "width-input-field",
|
|
171
|
+
heightInputField: "height-input-field",
|
|
172
|
+
};
|
|
173
|
+
|
|
94
174
|
const ENVIRONMENT = {
|
|
95
175
|
development: "development",
|
|
96
176
|
staging: "staging",
|
|
@@ -204,6 +284,9 @@ const getByDataQA = ramda.curry((page, dataQa) => {
|
|
|
204
284
|
});
|
|
205
285
|
|
|
206
286
|
const COMMON_SELECTORS = {
|
|
287
|
+
emailInputError: "email-input-error",
|
|
288
|
+
pane: "pane-wrapper",
|
|
289
|
+
sideBar: "sidebar",
|
|
207
290
|
copyButton: "copy-button",
|
|
208
291
|
spinner: ".neeto-ui-spinner",
|
|
209
292
|
subheaderText: "subheader-left",
|
|
@@ -2547,6 +2630,12 @@ var lib$7 = {
|
|
|
2547
2630
|
|
|
2548
2631
|
var qs$1 = /*@__PURE__*/getDefaultExportFromCjs(lib$7);
|
|
2549
2632
|
|
|
2633
|
+
const getImagePathAndName = (localImagePath) => {
|
|
2634
|
+
const imagePath = Path__default["default"].join(__dirname, localImagePath);
|
|
2635
|
+
const imageName = Path__default["default"].basename(localImagePath, Path__default["default"].extname(localImagePath));
|
|
2636
|
+
return { imagePath, imageName };
|
|
2637
|
+
};
|
|
2638
|
+
|
|
2550
2639
|
class CustomCommands {
|
|
2551
2640
|
constructor(page, request, baseURL = process.env.BASE_URL) {
|
|
2552
2641
|
this.interceptMultipleResponses = ({ responseUrl = "", responseStatus = 200, times = 1, baseUrl, customPageContext, timeout = 35000, } = {}) => {
|
|
@@ -2597,15 +2686,15 @@ class CustomCommands {
|
|
|
2597
2686
|
await pageContext.reload();
|
|
2598
2687
|
await reloadRequests;
|
|
2599
2688
|
};
|
|
2600
|
-
this.waitForPageLoad = async ({
|
|
2689
|
+
this.waitForPageLoad = async ({ visibilityTimeout = 35000, customPageContext, } = {}) => {
|
|
2601
2690
|
const pageContext = customPageContext !== null && customPageContext !== void 0 ? customPageContext : this.page;
|
|
2602
2691
|
await pageContext.waitForLoadState("load");
|
|
2603
2692
|
await Promise.all([
|
|
2604
2693
|
test$1.expect(pageContext.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden({
|
|
2605
|
-
timeout:
|
|
2694
|
+
timeout: visibilityTimeout,
|
|
2606
2695
|
}),
|
|
2607
2696
|
test$1.expect(pageContext.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
2608
|
-
timeout:
|
|
2697
|
+
timeout: visibilityTimeout,
|
|
2609
2698
|
}),
|
|
2610
2699
|
]);
|
|
2611
2700
|
};
|
|
@@ -2632,14 +2721,14 @@ class CustomCommands {
|
|
|
2632
2721
|
};
|
|
2633
2722
|
this.selectOptionFromDropdown = async ({ selectValueContainer, selectMenu, value, options = {}, }) => {
|
|
2634
2723
|
Object.assign({
|
|
2635
|
-
|
|
2724
|
+
visibilityTimeout: 2000,
|
|
2636
2725
|
textAssertionTimeout: 1000,
|
|
2637
2726
|
retryTimeout: 20000,
|
|
2638
2727
|
}, options);
|
|
2639
2728
|
await test$1.expect(async () => {
|
|
2640
2729
|
await this.page.getByTestId(selectValueContainer).click();
|
|
2641
2730
|
await test$1.expect(this.page.getByTestId(selectMenu)).toBeVisible({
|
|
2642
|
-
timeout: options.
|
|
2731
|
+
timeout: options.visibilityTimeout,
|
|
2643
2732
|
});
|
|
2644
2733
|
await this.page.getByTestId(selectMenu).getByText(value).click();
|
|
2645
2734
|
await test$1.expect(this.page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
|
|
@@ -2661,6 +2750,20 @@ class CustomCommands {
|
|
|
2661
2750
|
await test$1.expect(this.page.getByTestId(countSelector)).toContainText(countText);
|
|
2662
2751
|
}).toPass({ timeout: 15000 });
|
|
2663
2752
|
};
|
|
2753
|
+
this.uploadImage = async (localImagePath) => {
|
|
2754
|
+
const { imageName, imagePath } = getImagePathAndName(localImagePath);
|
|
2755
|
+
await this.page
|
|
2756
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.browseText)
|
|
2757
|
+
.click();
|
|
2758
|
+
const uploadFile = this.interceptMultipleResponses({
|
|
2759
|
+
responseUrl: ROUTES.directUploads,
|
|
2760
|
+
});
|
|
2761
|
+
await this.page
|
|
2762
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.fileInput)
|
|
2763
|
+
.setInputFiles(imagePath);
|
|
2764
|
+
await uploadFile;
|
|
2765
|
+
await test$1.expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadedImage)).toHaveAttribute("src", new RegExp(imageName), { timeout: 20000 });
|
|
2766
|
+
};
|
|
2664
2767
|
this.page = page;
|
|
2665
2768
|
this.responses = [];
|
|
2666
2769
|
this.request = request;
|
|
@@ -12591,54 +12694,6 @@ class EmbedBase {
|
|
|
12591
12694
|
}
|
|
12592
12695
|
}
|
|
12593
12696
|
|
|
12594
|
-
const BASE_URL = "/api/v1";
|
|
12595
|
-
const NEETO_AUTH_BASE_URL = (subdomain = "app") => `https://${subdomain}.neetoauth.net`;
|
|
12596
|
-
const ROUTES = {
|
|
12597
|
-
neetoAuthSignup: `${NEETO_AUTH_BASE_URL()}/signups/new`,
|
|
12598
|
-
neetoAuth: NEETO_AUTH_BASE_URL(),
|
|
12599
|
-
loginLink: "/login",
|
|
12600
|
-
profile: "/profile",
|
|
12601
|
-
admin: "/admin",
|
|
12602
|
-
myProfile: "/my/profile",
|
|
12603
|
-
authSettings: "/settings",
|
|
12604
|
-
webhooks: "/webhooks",
|
|
12605
|
-
login: `${BASE_URL}/login`,
|
|
12606
|
-
signup: `${BASE_URL}/signups`,
|
|
12607
|
-
subdomainAvailability: `${BASE_URL}/subdomain_availability`,
|
|
12608
|
-
countries: `${BASE_URL}/countries`,
|
|
12609
|
-
neetoApps: `${BASE_URL}/neeto_apps`,
|
|
12610
|
-
teamMembers: {
|
|
12611
|
-
all: "/team_members*/**",
|
|
12612
|
-
bulkUpdate: "/team_members/teams/bulk_update",
|
|
12613
|
-
index: "/team_members/teams",
|
|
12614
|
-
show: (id) => `/team_members/teams/${id}`,
|
|
12615
|
-
},
|
|
12616
|
-
};
|
|
12617
|
-
const API_ROUTES = {
|
|
12618
|
-
teamMembers: {
|
|
12619
|
-
all: "/team_members*/**",
|
|
12620
|
-
bulkUpdate: "/team_members/teams/bulk_update",
|
|
12621
|
-
index: "/team_members/teams",
|
|
12622
|
-
show: (id) => `/team_members/teams/${id}`,
|
|
12623
|
-
},
|
|
12624
|
-
integrations: {
|
|
12625
|
-
zapier: {
|
|
12626
|
-
api_keys: "/neeto_integrations/zapier/api_keys",
|
|
12627
|
-
},
|
|
12628
|
-
},
|
|
12629
|
-
};
|
|
12630
|
-
const THIRD_PARTY_ROUTES = {
|
|
12631
|
-
webhooks: { site: "https://webhook.site/" },
|
|
12632
|
-
slack: {
|
|
12633
|
-
loginWithPassword: (workspace) => `https://${workspace}.slack.com/sign_in_with_password`,
|
|
12634
|
-
},
|
|
12635
|
-
zapier: {
|
|
12636
|
-
login: "https://zapier.com/app/login",
|
|
12637
|
-
logOut: "https://zapier.com/logout",
|
|
12638
|
-
zapEditor: (zapId) => `https://zapier.com/editor/${zapId}`,
|
|
12639
|
-
},
|
|
12640
|
-
};
|
|
12641
|
-
|
|
12642
12697
|
const CHAT_WIDGET_TEXTS = {
|
|
12643
12698
|
newConversation: "New Conversation",
|
|
12644
12699
|
welcomeChatBubble: "Hi! I'm here to assist you with any questions you may have. What can I do for you?",
|
|
@@ -13523,6 +13578,147 @@ class ZapierPage extends IntegrationBase {
|
|
|
13523
13578
|
}
|
|
13524
13579
|
}
|
|
13525
13580
|
|
|
13581
|
+
class ImageUploader {
|
|
13582
|
+
constructor({ page, neetoPlaywrightUtilities, }) {
|
|
13583
|
+
this.submitCroppedImage = async () => {
|
|
13584
|
+
const cropImage = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
13585
|
+
responseUrl: ROUTES.directUploads,
|
|
13586
|
+
});
|
|
13587
|
+
await this.page
|
|
13588
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.cropSubmitButton)
|
|
13589
|
+
.click();
|
|
13590
|
+
await cropImage;
|
|
13591
|
+
};
|
|
13592
|
+
this.removeImage = async () => {
|
|
13593
|
+
await this.page
|
|
13594
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.imageUploaderWrapper)
|
|
13595
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
13596
|
+
.click();
|
|
13597
|
+
await this.page
|
|
13598
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.removeButton)
|
|
13599
|
+
.click();
|
|
13600
|
+
await test$1.expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadedImage)).toBeHidden();
|
|
13601
|
+
};
|
|
13602
|
+
this.openImageLibrary = async () => {
|
|
13603
|
+
const fetchImages = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
13604
|
+
responseUrl: NEETO_ROUTES.imageUploader,
|
|
13605
|
+
});
|
|
13606
|
+
await this.page
|
|
13607
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.openAssetLibraryButton)
|
|
13608
|
+
.click();
|
|
13609
|
+
await fetchImages;
|
|
13610
|
+
};
|
|
13611
|
+
this.cropImage = async ({ toggleAspectRatioLock = false, width = "100", height = "100", aspectRatioHeight = "9", aspectRatioWidth = "16", } = {}) => {
|
|
13612
|
+
toggleAspectRatioLock &&
|
|
13613
|
+
(await this.page
|
|
13614
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.lockAspectRatioSwitch)
|
|
13615
|
+
.click());
|
|
13616
|
+
await this.page
|
|
13617
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.aspectRatioHeightInput)
|
|
13618
|
+
.fill(aspectRatioHeight);
|
|
13619
|
+
await this.page
|
|
13620
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.aspectRatioWidthInput)
|
|
13621
|
+
.fill(aspectRatioWidth);
|
|
13622
|
+
await this.page
|
|
13623
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.widthInputField)
|
|
13624
|
+
.fill(width);
|
|
13625
|
+
await this.page
|
|
13626
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.heightInputField)
|
|
13627
|
+
.fill(height);
|
|
13628
|
+
};
|
|
13629
|
+
this.uploadNewImageFromLibrary = async ({ localImagePath, toggleOrginalImage = false, toggleAspectRatioLock = false, aspectRatioHeight = "9", aspectRatioWidth = "16", width = "100", height = "100", }) => {
|
|
13630
|
+
await this.openImageLibrary();
|
|
13631
|
+
const fileUploaderPromise = this.page.waitForEvent("filechooser");
|
|
13632
|
+
await this.page
|
|
13633
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.uploadNewAsset)
|
|
13634
|
+
.click();
|
|
13635
|
+
const fileUploader = await fileUploaderPromise;
|
|
13636
|
+
const { imagePath, imageName } = getImagePathAndName(localImagePath);
|
|
13637
|
+
await fileUploader.setFiles(imagePath);
|
|
13638
|
+
await test$1.expect(this.page.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.imageEditorUploadedImage)).toHaveAttribute("src", new RegExp(imageName), { timeout: 20000 });
|
|
13639
|
+
toggleOrginalImage
|
|
13640
|
+
? await this.page
|
|
13641
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.selectOriginalImageSwitch)
|
|
13642
|
+
.click()
|
|
13643
|
+
: await this.cropImage({
|
|
13644
|
+
toggleAspectRatioLock,
|
|
13645
|
+
aspectRatioHeight,
|
|
13646
|
+
aspectRatioWidth,
|
|
13647
|
+
width,
|
|
13648
|
+
height,
|
|
13649
|
+
});
|
|
13650
|
+
await this.submitCroppedImage();
|
|
13651
|
+
};
|
|
13652
|
+
this.selectImageFromWeb = async ({ nthImage = 0, searchTerm = "", toggleOrginalImage = false, toggleAspectRatioLock = false, aspectRatioHeight = "9", aspectRatioWidth = "16", width = "100", height = "100", } = {}) => {
|
|
13653
|
+
await this.openImageLibrary();
|
|
13654
|
+
const switchImageTab = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
13655
|
+
responseUrl: NEETO_ROUTES.imageUploader,
|
|
13656
|
+
});
|
|
13657
|
+
await this.page
|
|
13658
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.unsplashTab)
|
|
13659
|
+
.click();
|
|
13660
|
+
await switchImageTab;
|
|
13661
|
+
if (neetoCist.isNotEmpty(searchTerm)) {
|
|
13662
|
+
await this.page
|
|
13663
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.unsplashSearchInput)
|
|
13664
|
+
.fill(searchTerm);
|
|
13665
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
13666
|
+
timeout: 10000,
|
|
13667
|
+
});
|
|
13668
|
+
}
|
|
13669
|
+
await this.page
|
|
13670
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.nthUnsplashImage(nthImage))
|
|
13671
|
+
.click();
|
|
13672
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
13673
|
+
timeout: 10000,
|
|
13674
|
+
});
|
|
13675
|
+
toggleOrginalImage
|
|
13676
|
+
? await this.page
|
|
13677
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.selectOriginalImageSwitch)
|
|
13678
|
+
.click()
|
|
13679
|
+
: await this.cropImage({
|
|
13680
|
+
toggleAspectRatioLock,
|
|
13681
|
+
aspectRatioHeight,
|
|
13682
|
+
aspectRatioWidth,
|
|
13683
|
+
width,
|
|
13684
|
+
height,
|
|
13685
|
+
});
|
|
13686
|
+
await this.submitCroppedImage();
|
|
13687
|
+
};
|
|
13688
|
+
this.selectImageFromLibrary = async ({ nthImage = 0, searchTerm = "", toggleOrginalImage = false, toggleAspectRatioLock = false, aspectRatioHeight = "9", aspectRatioWidth = "16", width = "100", height = "100", } = {}) => {
|
|
13689
|
+
await this.openImageLibrary();
|
|
13690
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
13691
|
+
timeout: 10000,
|
|
13692
|
+
});
|
|
13693
|
+
if (neetoCist.isNotEmpty(searchTerm)) {
|
|
13694
|
+
await this.page
|
|
13695
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.unsplashSearchInput)
|
|
13696
|
+
.fill(searchTerm);
|
|
13697
|
+
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.spinner)).toBeHidden({
|
|
13698
|
+
timeout: 10000,
|
|
13699
|
+
});
|
|
13700
|
+
}
|
|
13701
|
+
await this.page
|
|
13702
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.nthLibraryImage(nthImage))
|
|
13703
|
+
.click();
|
|
13704
|
+
toggleOrginalImage
|
|
13705
|
+
? await this.page
|
|
13706
|
+
.getByTestId(NEETO_IMAGE_UPLOADER_SELECTORS.selectOriginalImageSwitch)
|
|
13707
|
+
.click()
|
|
13708
|
+
: await this.cropImage({
|
|
13709
|
+
toggleAspectRatioLock,
|
|
13710
|
+
aspectRatioHeight,
|
|
13711
|
+
aspectRatioWidth,
|
|
13712
|
+
width,
|
|
13713
|
+
height,
|
|
13714
|
+
});
|
|
13715
|
+
await this.submitCroppedImage();
|
|
13716
|
+
};
|
|
13717
|
+
this.page = page;
|
|
13718
|
+
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
13719
|
+
}
|
|
13720
|
+
}
|
|
13721
|
+
|
|
13526
13722
|
const LOGIN_SELECTORS = {
|
|
13527
13723
|
appleAuthenticationButton: "apple-authentication-button",
|
|
13528
13724
|
emailTextField: "login-email-text-field",
|
|
@@ -13901,7 +14097,7 @@ const ROLES_SELECTORS = {
|
|
|
13901
14097
|
tableHeaderRoleTitle: "ntm-roles-table-header-role-title",
|
|
13902
14098
|
permissionCheckbox: "ntm-roles-permission-checkbox",
|
|
13903
14099
|
editRoleButton: "ntm-roles-table-edit-role-button",
|
|
13904
|
-
deleteRoleButton: "
|
|
14100
|
+
deleteRoleButton: "ntm-roles-table-delete-role-button",
|
|
13905
14101
|
permissionCard: "ntm-roles-permission-card",
|
|
13906
14102
|
};
|
|
13907
14103
|
|
|
@@ -147545,6 +147741,7 @@ exports.HelpAndProfilePage = HelpAndProfilePage;
|
|
|
147545
147741
|
exports.INTEGRATIONS_TEXTS = INTEGRATIONS_TEXTS;
|
|
147546
147742
|
exports.INTEGRATION_SELECTORS = INTEGRATION_SELECTORS;
|
|
147547
147743
|
exports.IS_STAGING_ENV = IS_STAGING_ENV;
|
|
147744
|
+
exports.ImageUploader = ImageUploader;
|
|
147548
147745
|
exports.IntegrationBase = IntegrationBase;
|
|
147549
147746
|
exports.KEYBOARD_SHORTCUTS_SELECTORS = KEYBOARD_SHORTCUTS_SELECTORS;
|
|
147550
147747
|
exports.LOGIN_SELECTORS = LOGIN_SELECTORS;
|
|
@@ -147556,6 +147753,8 @@ exports.MailosaurUtils = MailosaurUtils;
|
|
|
147556
147753
|
exports.NEETO_AUTH_BASE_URL = NEETO_AUTH_BASE_URL;
|
|
147557
147754
|
exports.NEETO_EDITOR_SELECTORS = NEETO_EDITOR_SELECTORS;
|
|
147558
147755
|
exports.NEETO_FILTERS_SELECTORS = NEETO_FILTERS_SELECTORS;
|
|
147756
|
+
exports.NEETO_IMAGE_UPLOADER_SELECTORS = NEETO_IMAGE_UPLOADER_SELECTORS;
|
|
147757
|
+
exports.NEETO_ROUTES = NEETO_ROUTES;
|
|
147559
147758
|
exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;
|
|
147560
147759
|
exports.OrganizationPage = OrganizationPage;
|
|
147561
147760
|
exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
@@ -147593,6 +147792,7 @@ exports.generateRandomBypassEmail = generateRandomBypassEmail;
|
|
|
147593
147792
|
exports.generateStagingData = generateStagingData;
|
|
147594
147793
|
exports.getByDataQA = getByDataQA;
|
|
147595
147794
|
exports.getGlobalUserState = getGlobalUserState;
|
|
147795
|
+
exports.getImagePathAndName = getImagePathAndName;
|
|
147596
147796
|
exports.headerUtils = headerUtils;
|
|
147597
147797
|
exports.hexToRGB = hexToRGB;
|
|
147598
147798
|
exports.hyphenize = hyphenize;
|