@bigbinary/neeto-playwright-commons 1.11.3 → 1.11.4
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 +152 -109
- package/index.cjs.js.map +1 -1
- package/index.d.ts +40 -25
- package/index.js +152 -109
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -385,6 +385,7 @@ const COMMON_SELECTORS = {
|
|
|
385
385
|
modalForever: "modal-footer",
|
|
386
386
|
navigationHeader: "navigation-header",
|
|
387
387
|
buttonSpinner: ".neeto-ui-btn__spinner",
|
|
388
|
+
customSelectValueContainer: (label = "nui") => `${hyphenize(label)}-select-value-container`,
|
|
388
389
|
};
|
|
389
390
|
|
|
390
391
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -3610,14 +3611,17 @@ class CustomCommands {
|
|
|
3610
3611
|
: verifyEachFieldValue(values);
|
|
3611
3612
|
};
|
|
3612
3613
|
this.searchAndVerify = async ({ searchTerm, searchInputSelector = COMMON_SELECTORS.inputField, countSelector, countText, }) => {
|
|
3613
|
-
await
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3614
|
+
await this.page.getByTestId(searchInputSelector).clear();
|
|
3615
|
+
await this.page
|
|
3616
|
+
.getByTestId(searchInputSelector)
|
|
3617
|
+
.pressSequentially(searchTerm, { delay: 100 });
|
|
3618
|
+
await test$1.expect(this.page.locator(COMMON_SELECTORS.tableSpinner)).toBeHidden({
|
|
3619
|
+
timeout: 10000,
|
|
3620
|
+
});
|
|
3621
|
+
await test$1.expect(this.page.getByTestId(NEETO_FILTERS_SELECTORS.searchTermBlock)).toBeVisible();
|
|
3622
|
+
await this.waitForPageLoad();
|
|
3623
|
+
await test$1.expect(this.page.getByRole("cell", { name: searchTerm })).toBeVisible();
|
|
3624
|
+
await test$1.expect(this.page.getByTestId(countSelector)).toContainText(countText);
|
|
3621
3625
|
};
|
|
3622
3626
|
this.uploadImage = async (localImagePath) => {
|
|
3623
3627
|
const { imageName, imagePath } = getImagePathAndName(localImagePath);
|
|
@@ -12937,7 +12941,7 @@ const TOASTR_MESSAGES = {
|
|
|
12937
12941
|
};
|
|
12938
12942
|
const ZAPIER_LIMIT_EXHAUSTED_MESSAGE = "Zapier free task limit is exhausted. Test will be aborted";
|
|
12939
12943
|
const EMOJI_LABEL = "thumbs up";
|
|
12940
|
-
const
|
|
12944
|
+
const SELECT_COUNTRY = "Select country";
|
|
12941
12945
|
|
|
12942
12946
|
const HELP_CENTER_SELECTORS = {
|
|
12943
12947
|
helpButton: "help-button",
|
|
@@ -13824,20 +13828,20 @@ const EXPANDED_FONT_SIZE = {
|
|
|
13824
13828
|
h5: "Heading 5",
|
|
13825
13829
|
};
|
|
13826
13830
|
const TEXT_MODIFIER_TAGS = {
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13831
|
+
underline: "u",
|
|
13832
|
+
strike: "s",
|
|
13833
|
+
highlight: "mark",
|
|
13830
13834
|
};
|
|
13831
13835
|
const TEXT_MODIFIER_ROLES = {
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13836
|
-
|
|
13836
|
+
bold: "strong",
|
|
13837
|
+
italic: "emphasis",
|
|
13838
|
+
code: "code",
|
|
13839
|
+
blockquote: "blockquote",
|
|
13840
|
+
codeBlock: "code",
|
|
13837
13841
|
};
|
|
13838
13842
|
const LIST_MODIFIER_TAGS = {
|
|
13839
|
-
|
|
13840
|
-
|
|
13843
|
+
bulletList: "ul",
|
|
13844
|
+
orderedList: "ol",
|
|
13841
13845
|
};
|
|
13842
13846
|
|
|
13843
13847
|
const optionSelector = (option) => `neeto-editor-fixed-menu-${option}-option`;
|
|
@@ -13898,20 +13902,20 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
13898
13902
|
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${neetoCist.hyphenate(variable)}`,
|
|
13899
13903
|
};
|
|
13900
13904
|
const NEETO_TEXT_MODIFIER_SELECTORS = {
|
|
13901
|
-
|
|
13902
|
-
|
|
13903
|
-
|
|
13905
|
+
strike: optionSelector("strike"),
|
|
13906
|
+
underline: optionSelector("underline"),
|
|
13907
|
+
highlight: optionSelector("highlight"),
|
|
13904
13908
|
};
|
|
13905
13909
|
const TEXT_MODIFIER_SELECTORS = {
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13910
|
+
bold: optionSelector("bold"),
|
|
13911
|
+
italic: optionSelector("italic"),
|
|
13912
|
+
code: optionSelector("code"),
|
|
13913
|
+
blockquote: optionSelector("blockquote"),
|
|
13914
|
+
codeBlock: optionSelector("codeBlock"),
|
|
13911
13915
|
};
|
|
13912
13916
|
const LIST_MODIFIER_SELECTORS = {
|
|
13913
|
-
|
|
13914
|
-
|
|
13917
|
+
bulletList: optionSelector("bulletList"),
|
|
13918
|
+
orderedList: optionSelector("orderedList"),
|
|
13915
13919
|
};
|
|
13916
13920
|
const FONT_SIZE_SELECTORS = {
|
|
13917
13921
|
h1: fixedMenuSelector("font-size-option-h1"),
|
|
@@ -13923,12 +13927,36 @@ const FONT_SIZE_SELECTORS = {
|
|
|
13923
13927
|
|
|
13924
13928
|
class EditorPage {
|
|
13925
13929
|
constructor(page, neetoPlaywrightUtilities, editorWrapper) {
|
|
13926
|
-
this.
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13930
|
+
this.linkUrl = faker.faker.internet.url();
|
|
13931
|
+
this.filePath = "../../../e2e/assets/images/BigBinary.png";
|
|
13932
|
+
this.imageUrl = "https://picsum.photos/200/300";
|
|
13933
|
+
this.videoUrl = "https://youtu.be/jNQXAC9IVRw";
|
|
13934
|
+
this.cannedResponseSuccessMessage = "";
|
|
13935
|
+
this.cleanString = (selector = "") => (selector === null || selector === void 0 ? void 0 : selector.replace("neeto-editor-fixed-menu-", "").replace("-option", "")) ||
|
|
13936
|
+
"";
|
|
13937
|
+
this.fixedMenuOptions = async () => {
|
|
13938
|
+
(await this.fixedMenuArrowSelector.isVisible()) &&
|
|
13939
|
+
(await this.fixedMenuArrowSelector.click());
|
|
13940
|
+
const fixedMenuButtons = await this.editorWrapper
|
|
13941
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
13942
|
+
.getByRole("button")
|
|
13943
|
+
.all();
|
|
13944
|
+
(await this.moreMenuSelector.isVisible()) && fixedMenuButtons.pop();
|
|
13945
|
+
return Promise.all(fixedMenuButtons.map(async (button) => {
|
|
13946
|
+
const dataCy = await button.getAttribute("data-cy");
|
|
13947
|
+
return this.cleanString(dataCy);
|
|
13948
|
+
}));
|
|
13949
|
+
};
|
|
13950
|
+
this.moreMenuOptions = async () => {
|
|
13951
|
+
await this.moreMenuSelector.click();
|
|
13952
|
+
const moreMenuButtons = await this.page
|
|
13953
|
+
.getByTestId(COMMON_SELECTORS.dropdownContainer)
|
|
13954
|
+
.getByRole("button")
|
|
13955
|
+
.all();
|
|
13956
|
+
return Promise.all(moreMenuButtons.map(async (button) => {
|
|
13957
|
+
const dataCy = await button.getAttribute("data-cy");
|
|
13958
|
+
return this.cleanString(dataCy);
|
|
13959
|
+
}));
|
|
13932
13960
|
};
|
|
13933
13961
|
this.verifyFontSize = async () => {
|
|
13934
13962
|
const fontSizeDropdown = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fontSize);
|
|
@@ -13943,42 +13971,24 @@ class EditorPage {
|
|
|
13943
13971
|
await fontSizeDropdown.click();
|
|
13944
13972
|
}
|
|
13945
13973
|
};
|
|
13946
|
-
this.verifyTextModifiers = async () => {
|
|
13947
|
-
const
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
|
|
13951
|
-
|
|
13952
|
-
if (await this.assertOptionVisibility(textModifierSelector)) {
|
|
13953
|
-
await textModifierSelector.click();
|
|
13954
|
-
await test$1.expect(this.contentField.getByRole(textModifierRole)).toBeVisible();
|
|
13955
|
-
await textModifierSelector.click();
|
|
13956
|
-
}
|
|
13957
|
-
}
|
|
13974
|
+
this.verifyTextModifiers = async (modifier) => {
|
|
13975
|
+
const modifierKey = modifier;
|
|
13976
|
+
const textModifierRole = TEXT_MODIFIER_ROLES[modifierKey];
|
|
13977
|
+
const textModifierSelector = this.editorWrapper.getByTestId(TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13978
|
+
await textModifierSelector.click();
|
|
13979
|
+
await test$1.expect(this.contentField.getByRole(textModifierRole)).toBeVisible();
|
|
13958
13980
|
};
|
|
13959
|
-
this.verifyTextDeskModifier = async () => {
|
|
13960
|
-
const
|
|
13961
|
-
|
|
13962
|
-
|
|
13963
|
-
|
|
13964
|
-
if (await this.assertOptionVisibility(textModifierSelector)) {
|
|
13965
|
-
await textModifierSelector.click();
|
|
13966
|
-
await test$1.expect(this.contentField.locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13967
|
-
await textModifierSelector.click();
|
|
13968
|
-
}
|
|
13969
|
-
}
|
|
13981
|
+
this.verifyTextDeskModifier = async (modifier) => {
|
|
13982
|
+
const modifierKey = modifier;
|
|
13983
|
+
const textModifierSelector = this.editorWrapper.getByTestId(NEETO_TEXT_MODIFIER_SELECTORS[modifierKey]);
|
|
13984
|
+
await textModifierSelector.click();
|
|
13985
|
+
await test$1.expect(this.contentField.locator(TEXT_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13970
13986
|
};
|
|
13971
|
-
this.verifyListModifiers = async () => {
|
|
13972
|
-
const
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
13976
|
-
if (await this.assertOptionVisibility(listModifierSelector)) {
|
|
13977
|
-
await listModifierSelector.click();
|
|
13978
|
-
await test$1.expect(this.contentField.locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13979
|
-
await listModifierSelector.click();
|
|
13980
|
-
}
|
|
13981
|
-
}
|
|
13987
|
+
this.verifyListModifiers = async (modifier) => {
|
|
13988
|
+
const modifierKey = modifier;
|
|
13989
|
+
const listModifierSelector = this.editorWrapper.getByTestId(LIST_MODIFIER_SELECTORS[modifierKey]);
|
|
13990
|
+
await listModifierSelector.click();
|
|
13991
|
+
await test$1.expect(this.contentField.locator(LIST_MODIFIER_TAGS[modifierKey])).toBeVisible();
|
|
13982
13992
|
};
|
|
13983
13993
|
this.verifyEditorLinkButton = async (linkUrl) => {
|
|
13984
13994
|
await this.editorLinkButton.click();
|
|
@@ -14001,7 +14011,6 @@ class EditorPage {
|
|
|
14001
14011
|
await this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14002
14012
|
responseUrl: ROUTES.attachment,
|
|
14003
14013
|
});
|
|
14004
|
-
await this.neetoPlaywrightUtilities.verifyToast();
|
|
14005
14014
|
await test$1.expect(this.attachmentPreview).toBeVisible();
|
|
14006
14015
|
await this.attachmentPreview
|
|
14007
14016
|
.getByTestId(COMMON_SELECTORS.dropdownIcon)
|
|
@@ -14012,9 +14021,7 @@ class EditorPage {
|
|
|
14012
14021
|
await this.page
|
|
14013
14022
|
.getByTestId(COMMON_SELECTORS.alertModalSubmitButton)
|
|
14014
14023
|
.click();
|
|
14015
|
-
await this.
|
|
14016
|
-
message: ATTACHMENT_DELETION_TOASTR_MESSAGE,
|
|
14017
|
-
});
|
|
14024
|
+
await test$1.expect(this.attachmentPreview).toBeHidden({ timeout: 10000 });
|
|
14018
14025
|
};
|
|
14019
14026
|
this.verifyImageUploadOption = async ({ imageUrl, filePath, }) => {
|
|
14020
14027
|
await this.imageUploadOption.click();
|
|
@@ -14031,6 +14038,8 @@ class EditorPage {
|
|
|
14031
14038
|
await test$1.expect(this.imageWrapper).toBeHidden({
|
|
14032
14039
|
timeout: 15000,
|
|
14033
14040
|
});
|
|
14041
|
+
(await this.imageUploadOption.isHidden()) &&
|
|
14042
|
+
(await this.moreMenuSelector.click());
|
|
14034
14043
|
await this.imageUploadOption.click();
|
|
14035
14044
|
await this.page
|
|
14036
14045
|
.getByTestId(NEETO_EDITOR_SELECTORS.imageUploadLinkButton)
|
|
@@ -14100,38 +14109,63 @@ class EditorPage {
|
|
|
14100
14109
|
await test$1.expect(this.contentField.getByText(dynamicVariable)).toBeVisible();
|
|
14101
14110
|
}
|
|
14102
14111
|
};
|
|
14103
|
-
this.
|
|
14112
|
+
this.buttonsAndVerifications = {
|
|
14113
|
+
"font-size": this.verifyFontSize,
|
|
14114
|
+
emoji: this.verifyEmojiSelector,
|
|
14115
|
+
bold: () => this.verifyTextModifiers("bold"),
|
|
14116
|
+
italic: () => this.verifyTextModifiers("italic"),
|
|
14117
|
+
code: () => this.verifyTextModifiers("code"),
|
|
14118
|
+
blockquote: () => this.verifyTextModifiers("blockquote"),
|
|
14119
|
+
codeBlock: () => this.verifyTextModifiers("codeBlock"),
|
|
14120
|
+
underline: () => this.verifyTextDeskModifier("underline"),
|
|
14121
|
+
strike: () => this.verifyTextDeskModifier("strike"),
|
|
14122
|
+
highlight: () => this.verifyTextDeskModifier("highlight"),
|
|
14123
|
+
bulletList: () => this.verifyListModifiers("bulletList"),
|
|
14124
|
+
orderedList: () => this.verifyListModifiers("orderedList"),
|
|
14125
|
+
link: () => this.verifyEditorLinkButton(this.linkUrl),
|
|
14126
|
+
attachments: () => this.verifyEditorAttachmentsButton(this.filePath),
|
|
14127
|
+
"image-upload": () => this.verifyImageUploadOption({
|
|
14128
|
+
imageUrl: this.imageUrl,
|
|
14129
|
+
filePath: this.filePath,
|
|
14130
|
+
}),
|
|
14131
|
+
"canned-responses": this.verifyCannedResponseOption,
|
|
14132
|
+
"video-embed": () => this.verifyVideoEmbedOption(this.videoUrl),
|
|
14133
|
+
};
|
|
14134
|
+
this.verifyDescriptionEditor = async ({ text, dynamicVariables, linkUrl, filePath, imageUrl, videoUrl, cannedResponseSuccessMessage, }) => {
|
|
14135
|
+
const fixedMenuButtons = await this.fixedMenuOptions();
|
|
14136
|
+
let moreMenuButtons = [];
|
|
14137
|
+
(await this.moreMenuSelector.isVisible()) &&
|
|
14138
|
+
(moreMenuButtons = await this.moreMenuOptions());
|
|
14139
|
+
const needToSkipDisabling = [
|
|
14140
|
+
"link",
|
|
14141
|
+
"attachments",
|
|
14142
|
+
"image-upload",
|
|
14143
|
+
"canned-responses",
|
|
14144
|
+
"video-embed",
|
|
14145
|
+
"emoji",
|
|
14146
|
+
];
|
|
14147
|
+
this.linkUrl = linkUrl || this.linkUrl;
|
|
14148
|
+
this.filePath = filePath || this.filePath;
|
|
14149
|
+
this.imageUrl = imageUrl || this.imageUrl;
|
|
14150
|
+
this.videoUrl = videoUrl || this.videoUrl;
|
|
14151
|
+
this.cannedResponseSuccessMessage = cannedResponseSuccessMessage;
|
|
14104
14152
|
await this.contentField.fill(text);
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
await this.
|
|
14108
|
-
|
|
14109
|
-
|
|
14153
|
+
for (const button of fixedMenuButtons) {
|
|
14154
|
+
await this.contentField.click({ clickCount: 3 });
|
|
14155
|
+
await this.buttonsAndVerifications[button]();
|
|
14156
|
+
!needToSkipDisabling.includes(button) &&
|
|
14157
|
+
(await this.editorWrapper.getByTestId(optionSelector(button)).click());
|
|
14110
14158
|
}
|
|
14111
|
-
(
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
|
|
14120
|
-
|
|
14121
|
-
(await this.assertOptionVisibility(this.imageUploadOption)) &&
|
|
14122
|
-
(await this.verifyImageUploadOption({
|
|
14123
|
-
imageUrl,
|
|
14124
|
-
filePath,
|
|
14125
|
-
}));
|
|
14126
|
-
(await this.assertOptionVisibility(this.cannedResponseOption)) &&
|
|
14127
|
-
(await this.verifyCannedResponseOption(cannedResponseSuccessMessage));
|
|
14128
|
-
(await this.assertOptionVisibility(this.videoEmbedOption)) &&
|
|
14129
|
-
(await this.verifyVideoEmbedOption(videoUrl));
|
|
14130
|
-
(await this.assertOptionVisibility(this.emojiSelector)) &&
|
|
14131
|
-
(await this.verifyEmojiSelector());
|
|
14132
|
-
dynamicVariables &&
|
|
14133
|
-
(await this.assertOptionVisibility(this.dynamicVariablesButton)) &&
|
|
14134
|
-
(await this.verifyDynamicVariables(dynamicVariables));
|
|
14159
|
+
for (const button of moreMenuButtons) {
|
|
14160
|
+
await this.contentField.click({ clickCount: 3 });
|
|
14161
|
+
await this.moreMenuSelector.click();
|
|
14162
|
+
await this.buttonsAndVerifications[button]();
|
|
14163
|
+
if (!needToSkipDisabling.includes(button)) {
|
|
14164
|
+
await this.moreMenuSelector.click();
|
|
14165
|
+
await this.editorWrapper.getByTestId(optionSelector(button)).click();
|
|
14166
|
+
}
|
|
14167
|
+
}
|
|
14168
|
+
dynamicVariables && (await this.verifyDynamicVariables(dynamicVariables));
|
|
14135
14169
|
};
|
|
14136
14170
|
this.page = page;
|
|
14137
14171
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
@@ -14139,7 +14173,6 @@ class EditorPage {
|
|
|
14139
14173
|
this.editorWrapper = this.page;
|
|
14140
14174
|
if (editorWrapper)
|
|
14141
14175
|
this.editorWrapper = editorWrapper;
|
|
14142
|
-
this.paragraphSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.paragraphOption);
|
|
14143
14176
|
this.fixedMenuArrowSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuArrow);
|
|
14144
14177
|
this.editorLinkButton = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.linkOption);
|
|
14145
14178
|
this.attachmentPreview = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.attachmentPreview);
|
|
@@ -14152,7 +14185,9 @@ class EditorPage {
|
|
|
14152
14185
|
this.videoEmbedInput = this.page.getByTestId(NEETO_EDITOR_SELECTORS.videoEmbedInput);
|
|
14153
14186
|
this.videoWrapperSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.videoWrapper);
|
|
14154
14187
|
this.emojiSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.emojiOption);
|
|
14155
|
-
this.moreMenuSelector = this.editorWrapper
|
|
14188
|
+
this.moreMenuSelector = this.editorWrapper
|
|
14189
|
+
.getByTestId(NEETO_EDITOR_SELECTORS.fixedMenuWrapper)
|
|
14190
|
+
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|
|
14156
14191
|
this.contentField = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.contentField);
|
|
14157
14192
|
this.dynamicVariablesButton = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariablesButton);
|
|
14158
14193
|
}
|
|
@@ -14701,13 +14736,14 @@ class OrganizationPage {
|
|
|
14701
14736
|
.getByTestId(SIGNUP_SELECTORS.otpTextBox)
|
|
14702
14737
|
.fill(faker.faker.string.numeric(6));
|
|
14703
14738
|
};
|
|
14704
|
-
this.setupProfile = async ({ firstName = faker.faker.person.firstName(), lastName = faker.faker.person.lastName(), } = {}) => {
|
|
14739
|
+
this.setupProfile = async ({ firstName = faker.faker.person.firstName(), lastName = faker.faker.person.lastName(), country, } = {}) => {
|
|
14705
14740
|
await this.page
|
|
14706
14741
|
.getByTestId(SIGNUP_SELECTORS.firstNameTextField)
|
|
14707
14742
|
.fill(firstName);
|
|
14708
14743
|
await this.page
|
|
14709
14744
|
.getByTestId(SIGNUP_SELECTORS.lastNameTextField)
|
|
14710
14745
|
.fill(lastName);
|
|
14746
|
+
country && (await this.changeCountry(country));
|
|
14711
14747
|
await this.page.getByTestId(COMMON_SELECTORS.checkbox).click();
|
|
14712
14748
|
const submitProfile = this.neetoPlaywrightUtilities.interceptMultipleResponses({
|
|
14713
14749
|
customPageContext: this.page,
|
|
@@ -14719,10 +14755,10 @@ class OrganizationPage {
|
|
|
14719
14755
|
await submitProfile;
|
|
14720
14756
|
await test$1.expect(this.page.getByTestId(COMMON_SELECTORS.pageLoader)).toBeHidden();
|
|
14721
14757
|
};
|
|
14722
|
-
this.loginAndOnboard = async ({ email, firstName, lastName, handleOnboarding, }) => {
|
|
14758
|
+
this.loginAndOnboard = async ({ email, firstName, lastName, country, handleOnboarding, }) => {
|
|
14723
14759
|
await this.page.goto(ROUTES.admin);
|
|
14724
14760
|
await this.loginViaSSO(email);
|
|
14725
|
-
await this.setupProfile({ firstName, lastName });
|
|
14761
|
+
await this.setupProfile({ firstName, lastName, country });
|
|
14726
14762
|
await this.page.waitForURL(new RegExp(getGlobalUserState().domain), {
|
|
14727
14763
|
waitUntil: "load",
|
|
14728
14764
|
});
|
|
@@ -14791,6 +14827,13 @@ class OrganizationPage {
|
|
|
14791
14827
|
lastName: credentials.lastName,
|
|
14792
14828
|
});
|
|
14793
14829
|
};
|
|
14830
|
+
this.changeCountry = async (country) => {
|
|
14831
|
+
const countrySelector = this.page.getByTestId(COMMON_SELECTORS.customSelectValueContainer(SELECT_COUNTRY));
|
|
14832
|
+
await countrySelector.click();
|
|
14833
|
+
await countrySelector.pressSequentially(country);
|
|
14834
|
+
await this.page.getByTestId(COMMON_SELECTORS.selectOption(country)).click();
|
|
14835
|
+
await test$1.expect(countrySelector).toContainText(country);
|
|
14836
|
+
};
|
|
14794
14837
|
this.page = page;
|
|
14795
14838
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
14796
14839
|
}
|
|
@@ -148904,7 +148947,6 @@ const definePlaywrightConfig = (overrides) => {
|
|
|
148904
148947
|
};
|
|
148905
148948
|
|
|
148906
148949
|
exports.API_ROUTES = API_ROUTES;
|
|
148907
|
-
exports.ATTACHMENT_DELETION_TOASTR_MESSAGE = ATTACHMENT_DELETION_TOASTR_MESSAGE;
|
|
148908
148950
|
exports.BASE_URL = BASE_URL;
|
|
148909
148951
|
exports.CHANGELOG_WIDGET_SELECTORS = CHANGELOG_WIDGET_SELECTORS;
|
|
148910
148952
|
exports.CHAT_WIDGET_SELECTORS = CHAT_WIDGET_SELECTORS;
|
|
@@ -148950,6 +148992,7 @@ exports.PROFILE_SECTION_SELECTORS = PROFILE_SECTION_SELECTORS;
|
|
|
148950
148992
|
exports.PROJECT_TRANSLATIONS_PATH = PROJECT_TRANSLATIONS_PATH;
|
|
148951
148993
|
exports.ROLES_SELECTORS = ROLES_SELECTORS;
|
|
148952
148994
|
exports.ROUTES = ROUTES;
|
|
148995
|
+
exports.SELECT_COUNTRY = SELECT_COUNTRY;
|
|
148953
148996
|
exports.SIGNUP_SELECTORS = SIGNUP_SELECTORS;
|
|
148954
148997
|
exports.SINGULAR = SINGULAR;
|
|
148955
148998
|
exports.SLACK_DATA_QA_SELECTORS = SLACK_DATA_QA_SELECTORS;
|