@bigbinary/neeto-playwright-commons 1.22.37 → 1.22.39
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 +33 -1
- package/index.cjs.js.map +1 -1
- package/index.d.ts +6 -0
- package/index.js +33 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -138,7 +138,7 @@ const PROFILE_LINKS = {
|
|
|
138
138
|
class ApiKeysApi {
|
|
139
139
|
constructor(neetoPlaywrightUtilities) {
|
|
140
140
|
this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
|
|
141
|
-
this.API_KEYS_BASE_URL = `
|
|
141
|
+
this.API_KEYS_BASE_URL = `neeto_api_keys${BASE_URL}`;
|
|
142
142
|
this.create = (label, type = "general") => this.neetoPlaywrightUtilities.apiRequest({
|
|
143
143
|
url: `${this.API_KEYS_BASE_URL}/api_keys`,
|
|
144
144
|
method: "post",
|
|
@@ -3754,6 +3754,7 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
3754
3754
|
videoEmbedSubmit: "neeto-editor-embed-cancel",
|
|
3755
3755
|
videoWrapper: "neeto-editor-video-wrapper",
|
|
3756
3756
|
paragraphOption: fixedMenuSelector("font-size-option-body2"),
|
|
3757
|
+
calloutOption: fixedMenuSelector("callout-option"),
|
|
3757
3758
|
attachmentPreview: "ne-attachments-wrapper",
|
|
3758
3759
|
imageUploadLinkButton: "neeto-editor-media-uploader-link-tab",
|
|
3759
3760
|
errorText: "neeto-editor-error-text",
|
|
@@ -3767,6 +3768,11 @@ const NEETO_EDITOR_SELECTORS = {
|
|
|
3767
3768
|
videoUploadOption: optionSelector("video-upload"),
|
|
3768
3769
|
todoListOption: optionSelector("todoList"),
|
|
3769
3770
|
editorMenuWrapper: "neeto-editor-fixed-menu-wrapper",
|
|
3771
|
+
dataEmojiType: (type) => `[data-emoji="${type}"]`,
|
|
3772
|
+
//Use data-cy once https://github.com/neetozone/neeto-editor/issues/1651 is resolved
|
|
3773
|
+
calloutContent: ".callout-content",
|
|
3774
|
+
//Use data-cy once https://github.com/neetozone/neeto-editor/issues/1648 is resolved
|
|
3775
|
+
calloutTypeOption: ".neeto-editor-callout-dropdown__type-option",
|
|
3770
3776
|
editorMediaUploaderTab: "neeto-editor-media-uploader-local-tab",
|
|
3771
3777
|
dynamicVariableSelector: (variable) => `dynamic-variables-list-item-${joinHyphenCase(variable)}`,
|
|
3772
3778
|
neetoEditorFixedMenuFontSize: "neeto-editor-fixed-menu-font-size-option",
|
|
@@ -192879,6 +192885,30 @@ class EditorPage {
|
|
|
192879
192885
|
await test$1.expect(this.contentField.getByText(neetoCist.truncate(value, 25))).toBeVisible();
|
|
192880
192886
|
}
|
|
192881
192887
|
};
|
|
192888
|
+
this.verifyCalloutSelector = async (isButtonInMoreMenu) => {
|
|
192889
|
+
isButtonInMoreMenu && (await this.moreMenuSelector.click());
|
|
192890
|
+
const calloutTypes = ["default", "info", "warning", "error", "success"];
|
|
192891
|
+
const calloutContentField = this.contentField.locator(NEETO_EDITOR_SELECTORS.calloutContent);
|
|
192892
|
+
const calloutTypeOption = this.page.locator(NEETO_EDITOR_SELECTORS.calloutTypeOption);
|
|
192893
|
+
await this.moveCursorAtBottom();
|
|
192894
|
+
for (const [index, type] of calloutTypes.entries()) {
|
|
192895
|
+
await this.calloutSelector.click();
|
|
192896
|
+
const calloutType = calloutTypeOption.filter({ hasText: type });
|
|
192897
|
+
await test$1.expect(calloutType).toBeVisible({ timeout: 10000 });
|
|
192898
|
+
await calloutType.click();
|
|
192899
|
+
await Promise.all([
|
|
192900
|
+
test$1.expect(calloutTypeOption).toBeHidden(),
|
|
192901
|
+
test$1.expect(this.contentField.locator(NEETO_EDITOR_SELECTORS.dataEmojiType(type))).toBeVisible(),
|
|
192902
|
+
]);
|
|
192903
|
+
const randomText = faker.faker.lorem.word(10);
|
|
192904
|
+
await this.page.keyboard.type(randomText);
|
|
192905
|
+
// The index is important here as it determines which callout content field to interact with
|
|
192906
|
+
// eslint-disable-next-line playwright/no-nth-methods
|
|
192907
|
+
await test$1.expect(calloutContentField.nth(index)).toContainText(randomText);
|
|
192908
|
+
await this.moveCursorAtBottom();
|
|
192909
|
+
}
|
|
192910
|
+
return [{ key: "callout" }];
|
|
192911
|
+
};
|
|
192882
192912
|
this.buttonsAndVerifications = {
|
|
192883
192913
|
"font-size": () => this.verifyFontSize(),
|
|
192884
192914
|
emoji: isButtonInMoreMenu => this.verifyEmojiSelector(isButtonInMoreMenu),
|
|
@@ -192904,6 +192934,7 @@ class EditorPage {
|
|
|
192904
192934
|
undo: isButtonInMoreMenu => this.verifyUndoSelector(isButtonInMoreMenu),
|
|
192905
192935
|
redo: isButtonInMoreMenu => this.verifyRedoSelector(isButtonInMoreMenu),
|
|
192906
192936
|
table: isButtonInMoreMenu => this.verifyTableSelector(isButtonInMoreMenu),
|
|
192937
|
+
callout: isButtonInMoreMenu => this.verifyCalloutSelector(isButtonInMoreMenu),
|
|
192907
192938
|
"video-upload": isButtonInMoreMenu => this.verifyVideoUploadOption({
|
|
192908
192939
|
filePath: this.videoPath,
|
|
192909
192940
|
isButtonInMoreMenu,
|
|
@@ -192980,6 +193011,7 @@ class EditorPage {
|
|
|
192980
193011
|
.getByTestId(COMMON_SELECTORS.dropdownIcon);
|
|
192981
193012
|
this.contentField = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.contentField);
|
|
192982
193013
|
this.dynamicVariablesButton = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.dynamicVariablesButton);
|
|
193014
|
+
this.calloutSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.calloutOption);
|
|
192983
193015
|
this.undoSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.undoOption);
|
|
192984
193016
|
this.redoSelector = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.redoOption);
|
|
192985
193017
|
this.tableOption = this.editorWrapper.getByTestId(NEETO_EDITOR_SELECTORS.tableOption);
|