mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge pull request #8322 from ToolJet/main
Merge main back to develop (v2.26.1)
This commit is contained in:
commit
68f68a0351
18 changed files with 313 additions and 212 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
2.26.0
|
||||
2.26.1
|
||||
|
|
|
|||
|
|
@ -76,11 +76,11 @@ module.exports = defineConfig({
|
|||
experimentalRunAllSpecs: true,
|
||||
baseUrl: "http://localhost:8082",
|
||||
specPattern: [
|
||||
"cypress/e2e/selfHost/*.cy.js",
|
||||
"cypress/e2e/authentication/*.cy.js",
|
||||
"cypress/e2e/workspace/*.cy.js",
|
||||
"cypress/e2e/ce/**/*.cy.js",
|
||||
"cypress/e2e/editor/app-version/version.cy.js"
|
||||
"cypress/e2e/editor/app-version/version.cy.js",
|
||||
"cypress/e2e/workspace/*.cy.js",
|
||||
"cypress/e2e/authentication/*.cy.js",
|
||||
"cypress/e2e/selfHost/*.cy.js",
|
||||
],
|
||||
numTestsKeptInMemory: 1,
|
||||
redirectionLimit: 15,
|
||||
|
|
@ -88,9 +88,5 @@ module.exports = defineConfig({
|
|||
experimentalMemoryManagement: true,
|
||||
video: false,
|
||||
videoUploadOnPasses: false,
|
||||
retries: {
|
||||
runMode: 2,
|
||||
openMode: 0,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -121,13 +121,14 @@ Cypress.Commands.add("apiDeleteApp", (appId = Cypress.env("appId")) => {
|
|||
Cypress.Commands.add(
|
||||
"openApp",
|
||||
(
|
||||
workspaceId = Cypress.env("workspaceId"),
|
||||
appId = Cypress.env("appId"),
|
||||
componentSelector = "[data-cy='empty-editor-text']"
|
||||
) => {
|
||||
cy.window({ log: false }).then((win) => {
|
||||
win.localStorage.setItem("walkthroughCompleted", "true");
|
||||
});
|
||||
cy.visit(`/${Cypress.env("workspaceId")}/apps/${Cypress.env("appId")}`);
|
||||
cy.visit(`/${workspaceId}/apps/${appId}`);
|
||||
cy.get(componentSelector, { timeout: 10000 });
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -193,9 +193,9 @@ Cypress.Commands.add(
|
|||
.invoke("text")
|
||||
.then((text) => {
|
||||
cy.wrap(subject).realType(createBackspaceText(text)),
|
||||
{
|
||||
delay: 0,
|
||||
};
|
||||
{
|
||||
delay: 0,
|
||||
};
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
@ -366,6 +366,19 @@ Cypress.Commands.add("getPosition", (componentName) => {
|
|||
|
||||
Cypress.Commands.add("defaultWorkspaceLogin", () => {
|
||||
cy.apiLogin();
|
||||
cy.intercept('GET', "http://localhost:3000/api/library_apps/").as("library_apps")
|
||||
cy.visit('/my-workspace');
|
||||
cy.get(commonSelectors.homePageLogo, { timeout: 10000 })
|
||||
cy.wait("@library_apps")
|
||||
})
|
||||
|
||||
Cypress.Commands.add('visitSlug', ({ actualUrl, currentUrl = 'http://localhost:8082/error/unknown' }) => {
|
||||
cy.visit(actualUrl);
|
||||
cy.wait(3000);
|
||||
|
||||
cy.url().then((url) => {
|
||||
if (url === currentUrl) {
|
||||
cy.visit(actualUrl);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,11 +17,13 @@ describe("App slug", () => {
|
|||
before(() => {
|
||||
cy.apiLogin();
|
||||
cy.apiCreateApp(data.appName);
|
||||
cy.wait(1000)
|
||||
cy.logoutApi()
|
||||
})
|
||||
|
||||
it("Verify app slug cases in global settings", () => {
|
||||
navigateToAppEditor(data.appName);
|
||||
cy.wait(2000)
|
||||
cy.openApp('my-workspace');
|
||||
|
||||
cy.get(commonSelectors.leftSideBarSettingsButton).click();
|
||||
cy.get(commonWidgetSelector.appSlugLabel).verifyVisibleElement("have.text", "Unique app slug");
|
||||
|
|
@ -53,18 +55,18 @@ describe("App slug", () => {
|
|||
releaseApp();
|
||||
|
||||
cy.openInCurrentTab(commonWidgetSelector.previewButton);
|
||||
cy.wait(1000);
|
||||
cy.wait(2000);
|
||||
cy.url().should('eq', `http://localhost:8082/applications/${data.slug}/home?version=v1`);
|
||||
cy.visit('/my-workspace');
|
||||
cy.wait(500);
|
||||
|
||||
cy.visit(`/applications/${data.slug}`);
|
||||
cy.visitSlug({ actualUrl: `http://localhost:8082/applications/${data.slug}` });
|
||||
cy.url().should('eq', `http://localhost:8082/applications/${data.slug}`);
|
||||
cy.visit('/my-workspace');
|
||||
cy.wait(500);
|
||||
|
||||
cy.apiCreateApp(data.slug);
|
||||
cy.openApp(data.slug);
|
||||
cy.openApp('my-workspace');
|
||||
|
||||
cy.get(commonSelectors.leftSideBarSettingsButton).click();
|
||||
cy.get(commonWidgetSelector.appSlugInput).clear()
|
||||
|
|
@ -77,8 +79,7 @@ describe("App slug", () => {
|
|||
data.appName = `${fake.companyName} App`;
|
||||
|
||||
cy.apiCreateApp(data.appName);
|
||||
cy.visit('/')
|
||||
navigateToAppEditor(data.appName);
|
||||
cy.openApp('my-workspace');
|
||||
|
||||
cy.get(commonSelectors.leftSideBarSettingsButton).click();
|
||||
cy.get(commonWidgetSelector.appSlugInput).clear()
|
||||
|
|
@ -117,13 +118,13 @@ describe("App slug", () => {
|
|||
cy.visit('/my-workspace');
|
||||
cy.wait(500);
|
||||
|
||||
cy.visit(`/applications/${data.slug}`);
|
||||
cy.visitSlug({ actualUrl: `/applications/${data.slug}` });
|
||||
cy.url().should('eq', `http://localhost:8082/applications/${data.slug}`);
|
||||
cy.visit('/my-workspace');
|
||||
cy.wait(500);
|
||||
|
||||
cy.apiCreateApp(data.slug);
|
||||
cy.openApp(data.slug);
|
||||
cy.openApp('my-workspace');
|
||||
releaseApp();
|
||||
cy.get(commonWidgetSelector.shareAppButton).click()
|
||||
cy.clearAndType(commonWidgetSelector.appNameSlugInput, data.slug);
|
||||
|
|
|
|||
|
|
@ -10,159 +10,204 @@ import { commonText } from "Texts/common";
|
|||
import { addNewUserMW } from "Support/utils/userPermissions";
|
||||
import { userSignUp } from "Support/utils/onboarding";
|
||||
|
||||
describe("App share functionality", () => {
|
||||
const data = {};
|
||||
data.appName = `${fake.companyName} App`;
|
||||
data.firstName = fake.firstName;
|
||||
data.lastName = fake.lastName.replaceAll("[^A-Za-z]", "");
|
||||
data.email = fake.email.toLowerCase();
|
||||
const slug = data.appName.toLowerCase().replace(/\s+/g, "-");
|
||||
const firstUserEmail = data.email;
|
||||
const envVar = Cypress.env("environment");
|
||||
beforeEach(() => {
|
||||
cy.defaultWorkspaceLogin();
|
||||
});
|
||||
before(() => {
|
||||
cy.apiLogin();
|
||||
cy.apiCreateApp(data.appName);
|
||||
cy.logoutApi();
|
||||
});
|
||||
|
||||
it("Verify private and public app share funtionality", () => {
|
||||
cy.openApp(data.appName);
|
||||
cy.dragAndDropWidget("Table", 250, 250);
|
||||
|
||||
verifyTooltip(
|
||||
commonWidgetSelector.shareAppButton,
|
||||
"Share URL is unavailable until current version is released"
|
||||
);
|
||||
cy.get('[data-cy="share-button-link"]>span').should(
|
||||
"have.class",
|
||||
"share-disabled"
|
||||
);
|
||||
releaseApp();
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
|
||||
for (const elements in commonWidgetSelector.shareModalElements) {
|
||||
cy.get(
|
||||
commonWidgetSelector.shareModalElements[elements]
|
||||
).verifyVisibleElement(
|
||||
"have.text",
|
||||
commonText.shareModalElements[elements]
|
||||
);
|
||||
}
|
||||
cy.get(commonWidgetSelector.copyAppLinkButton).should("be.visible");
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).should("be.visible");
|
||||
cy.get(commonWidgetSelector.appLink).should("be.visible");
|
||||
cy.get(commonWidgetSelector.appNameSlugInput).should("be.visible");
|
||||
// cy.get(commonWidgetSelector.iframeLink).should("be.visible");
|
||||
cy.get(commonWidgetSelector.modalCloseButton).should("be.visible");
|
||||
|
||||
cy.clearAndType(commonWidgetSelector.appNameSlugInput, `${slug}`);
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.forceClickOnCanvas();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(2500);
|
||||
cy.visit(`/applications/${slug}`);
|
||||
cy.wait(2500);
|
||||
|
||||
cy.get(commonSelectors.loginButton, { timeout: 10000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
|
||||
cy.clearAndType(commonSelectors.workEmailInputField, "dev@tooljet.io");
|
||||
cy.clearAndType(commonSelectors.passwordInputField, "password");
|
||||
cy.get(commonSelectors.loginButton).click();
|
||||
|
||||
cy.wait(500);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
cy.get(commonSelectors.viewerPageLogo).click();
|
||||
|
||||
cy.openApp(Cypress.env("appId"), '[data-cy="draggable-widget-table1"]');
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(2500);
|
||||
cy.visit(`/applications/${slug}`);
|
||||
cy.wait(2500);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
});
|
||||
|
||||
it("Verify app private and public app visibility for the same workspace user", () => {
|
||||
cy.openApp(Cypress.env("appId"), '[data-cy="draggable-widget-table1"]');
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get("body").then(($el) => {
|
||||
if (!$el.text().includes("Embedded app link", { timeout: 2000 })) {
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
}
|
||||
});
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
addNewUserMW(data.firstName, data.email);
|
||||
logout();
|
||||
|
||||
cy.visit(`/applications/${slug}`);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
|
||||
cy.defaultWorkspaceLogin();
|
||||
cy.openApp(Cypress.env("appId"), '[data-cy="draggable-widget-table1"]');
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).uncheck();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.visit(`/applications/${slug}`);
|
||||
|
||||
cy.login(data.email, "password");
|
||||
cy.get(commonSelectors.allApplicationLink).verifyVisibleElement(
|
||||
"have.text",
|
||||
commonText.allApplicationLink
|
||||
);
|
||||
});
|
||||
|
||||
it("Verify app private and public app visibility for the same instance user", () => {
|
||||
describe(
|
||||
"App share functionality",
|
||||
{
|
||||
retries: {
|
||||
runMode: 2,
|
||||
openMode: 1,
|
||||
},
|
||||
},
|
||||
() => {
|
||||
const data = {};
|
||||
data.appName = `${fake.companyName} App`;
|
||||
data.firstName = fake.firstName;
|
||||
data.lastName = fake.lastName.replaceAll("[^A-Za-z]", "");
|
||||
data.email = fake.email.toLowerCase();
|
||||
const slug = data.appName.toLowerCase().replace(/\s+/g, "-");
|
||||
const firstUserEmail = data.email;
|
||||
const envVar = Cypress.env("environment");
|
||||
beforeEach(() => {
|
||||
cy.defaultWorkspaceLogin();
|
||||
});
|
||||
|
||||
cy.logoutApi();
|
||||
userSignUp(data.firstName, data.email, "Test");
|
||||
cy.visit(`/applications/${slug}`);
|
||||
cy.wait(1000);
|
||||
it("Verify private and public app share funtionality", () => {
|
||||
data.appName = `${fake.companyName} App`;
|
||||
|
||||
cy.clearAndType(commonSelectors.workEmailInputField, data.email);
|
||||
cy.clearAndType(commonSelectors.passwordInputField, "password");
|
||||
cy.get(commonSelectors.signInButton).click();
|
||||
cy.wait(1000);
|
||||
cy.get(`[data-cy="workspace-sign-in-sub-header"]`).verifyVisibleElement(
|
||||
"have.text",
|
||||
"Sign in to your workspace - My workspace"
|
||||
);
|
||||
cy.apiCreateApp(data.appName);
|
||||
cy.openApp();
|
||||
cy.dragAndDropWidget("Table", 250, 250);
|
||||
|
||||
cy.visit("/");
|
||||
cy.wait(2000);
|
||||
logout();
|
||||
cy.defaultWorkspaceLogin();
|
||||
|
||||
cy.openApp(Cypress.env("appId"), '[data-cy="draggable-widget-table1"]');
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
verifyTooltip(
|
||||
commonWidgetSelector.shareAppButton,
|
||||
"Share URL is unavailable until current version is released"
|
||||
);
|
||||
cy.get('[data-cy="share-button-link"]>span').should(
|
||||
"have.class",
|
||||
"share-disabled"
|
||||
);
|
||||
releaseApp();
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
|
||||
logout();
|
||||
cy.visit(`/applications/${slug}`);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
cy.get(commonSelectors.viewerPageLogo).click();
|
||||
});
|
||||
});
|
||||
for (const elements in commonWidgetSelector.shareModalElements) {
|
||||
cy.get(
|
||||
commonWidgetSelector.shareModalElements[elements]
|
||||
).verifyVisibleElement(
|
||||
"have.text",
|
||||
commonText.shareModalElements[elements]
|
||||
);
|
||||
}
|
||||
cy.get(commonWidgetSelector.copyAppLinkButton).should("be.visible");
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).should("be.visible");
|
||||
cy.get(commonWidgetSelector.appLink).should("be.visible");
|
||||
cy.get(commonWidgetSelector.appNameSlugInput).should("be.visible");
|
||||
// cy.get(commonWidgetSelector.iframeLink).should("be.visible");
|
||||
cy.get(commonWidgetSelector.modalCloseButton).should("be.visible");
|
||||
|
||||
cy.clearAndType(commonWidgetSelector.appNameSlugInput, `${slug}`);
|
||||
cy.wait(4000);
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.forceClickOnCanvas();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(4000);
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
cy.visitSlug({ actualUrl: `http://localhost:8082/applications/${slug}` });
|
||||
cy.wait(3000);
|
||||
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
|
||||
cy.clearAndType(commonSelectors.workEmailInputField, "dev@tooljet.io");
|
||||
cy.clearAndType(commonSelectors.passwordInputField, "password");
|
||||
cy.get(commonSelectors.loginButton).click();
|
||||
|
||||
cy.wait(500);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
cy.get(commonSelectors.viewerPageLogo).click();
|
||||
|
||||
cy.openApp(
|
||||
"my-workspace",
|
||||
Cypress.env("appId"),
|
||||
'[data-cy="draggable-widget-table1"]'
|
||||
);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(4000);
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
cy.visitSlug({ actualUrl: `http://localhost:8082/applications/${slug}` });
|
||||
cy.wait(3000);
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
});
|
||||
|
||||
it("Verify app private and public app visibility for the same workspace user", () => {
|
||||
cy.openApp(
|
||||
"my-workspace",
|
||||
Cypress.env("appId"),
|
||||
'[data-cy="draggable-widget-table1"]'
|
||||
);
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get("body").then(($el) => {
|
||||
if (!$el.text().includes("Embedded app link", { timeout: 2000 })) {
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
}
|
||||
});
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
addNewUserMW(data.firstName, data.email);
|
||||
logout();
|
||||
cy.wait(4000);
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
|
||||
cy.visitSlug({ actualUrl: `/applications/${slug}` });
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
|
||||
cy.defaultWorkspaceLogin();
|
||||
cy.openApp(
|
||||
"my-workspace",
|
||||
Cypress.env("appId"),
|
||||
'[data-cy="draggable-widget-table1"]'
|
||||
);
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).uncheck();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(4000);
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
|
||||
cy.visitSlug({ actualUrl: `/applications/${slug}` });
|
||||
|
||||
cy.login(data.email, "password");
|
||||
cy.get(commonSelectors.allApplicationLink).verifyVisibleElement(
|
||||
"have.text",
|
||||
commonText.allApplicationLink
|
||||
);
|
||||
});
|
||||
|
||||
it("Verify app private and public app visibility for the same instance user", () => {
|
||||
data.firstName = fake.firstName;
|
||||
data.email = fake.email.toLowerCase();
|
||||
|
||||
cy.logoutApi();
|
||||
userSignUp(data.firstName, data.email, "Test");
|
||||
cy.wait(3000);
|
||||
|
||||
cy.visitSlug({ actualUrl: `/applications/${slug}` });
|
||||
cy.wait(1000);
|
||||
|
||||
cy.clearAndType(commonSelectors.workEmailInputField, data.email);
|
||||
cy.clearAndType(commonSelectors.passwordInputField, "password");
|
||||
cy.get(commonSelectors.signInButton).click();
|
||||
cy.wait(1000);
|
||||
cy.get(`[data-cy="workspace-sign-in-sub-header"]`).verifyVisibleElement(
|
||||
"have.text",
|
||||
"Sign in to your workspace - My workspace"
|
||||
);
|
||||
|
||||
cy.visit("/");
|
||||
cy.wait(2000);
|
||||
logout();
|
||||
cy.defaultWorkspaceLogin();
|
||||
|
||||
cy.openApp(
|
||||
"my-workspace",
|
||||
Cypress.env("appId"),
|
||||
'[data-cy="draggable-widget-table1"]'
|
||||
);
|
||||
cy.wait(2000);
|
||||
cy.get(commonWidgetSelector.shareAppButton).click();
|
||||
cy.get(commonWidgetSelector.makePublicAppToggle).check();
|
||||
cy.get(commonWidgetSelector.modalCloseButton).click();
|
||||
cy.get(commonSelectors.editorPageLogo).click();
|
||||
|
||||
logout();
|
||||
cy.wait(4000);
|
||||
cy.get(commonSelectors.loginButton, { timeout: 20000 }).should(
|
||||
"be.visible"
|
||||
);
|
||||
cy.visitSlug({ actualUrl: `/applications/${slug}` });
|
||||
cy.get('[data-cy="draggable-widget-table1"]').should("be.visible");
|
||||
cy.get(commonSelectors.viewerPageLogo).click();
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ describe("Workspace constants", () => {
|
|||
cy.waitForAutoSave();
|
||||
|
||||
common.pinInspector();
|
||||
cy.get(".tooltip-inner").invoke("hide");
|
||||
// cy.get(".tooltip-inner").invoke("hide");
|
||||
cy.get(commonWidgetSelector.sidebarinspector).click();
|
||||
cy.get(commonWidgetSelector.inspectorNodeComponents).click();
|
||||
cy.get(commonWidgetSelector.nodeComponent(data.constantsName)).click();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ describe("Basic components", () => {
|
|||
cy.apiLogin();
|
||||
cy.apiCreateApp(data.appName);
|
||||
cy.openApp();
|
||||
cy.modifyCanvasSize(900, 900);
|
||||
cy.modifyCanvasSize(1200, 900);
|
||||
cy.intercept("GET", "/api/comments/*").as("loadComments");
|
||||
resizeQueryPanel(0);
|
||||
});
|
||||
|
|
@ -47,7 +47,7 @@ describe("Basic components", () => {
|
|||
});
|
||||
|
||||
it("Should verify Toggle switch", () => {
|
||||
cy.dragAndDropWidget("Toggle Switch", 200, 200);
|
||||
cy.dragAndDropWidget("Toggle Switch", 300, 300);
|
||||
verifyComponent("toggleswitch1");
|
||||
|
||||
cy.resizeWidget("toggleswitch1", 650, 400, false);
|
||||
|
|
@ -63,6 +63,7 @@ describe("Basic components", () => {
|
|||
).should("have.text", "label");
|
||||
|
||||
cy.openInCurrentTab(commonWidgetSelector.previewButton);
|
||||
cy.wait(1500);
|
||||
verifyComponent("toggleswitch2");
|
||||
cy.get(
|
||||
'[data-cy="draggable-widget-toggleswitch2"] > .form-check-label'
|
||||
|
|
@ -70,12 +71,13 @@ describe("Basic components", () => {
|
|||
|
||||
cy.go("back");
|
||||
cy.waitForAppLoad();
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("toggleswitch2");
|
||||
});
|
||||
|
||||
it("Should verify Checkbox", () => {
|
||||
resizeQueryPanel("0");
|
||||
cy.dragAndDropWidget("Checkbox", 200, 200);
|
||||
cy.dragAndDropWidget("Checkbox", 300, 300);
|
||||
// cy.resizeWidget("checkbox1", 50, 200,false);
|
||||
cy.forceClickOnCanvas();
|
||||
verifyComponent("checkbox1");
|
||||
|
|
@ -96,11 +98,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("checkbox2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("checkbox2");
|
||||
});
|
||||
|
||||
it("Should verify Radio Button", () => {
|
||||
cy.dragAndDropWidget("Radio Button", 200, 200);
|
||||
cy.dragAndDropWidget("Radio Button", 300, 300);
|
||||
// cy.resizeWidget("radiobutton1", 100, 200,false);
|
||||
cy.forceClickOnCanvas();
|
||||
verifyComponent("radiobutton1");
|
||||
|
|
@ -122,11 +125,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("radiobutton2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("radiobutton2");
|
||||
});
|
||||
it("Should verify Dropdown", () => {
|
||||
resizeQueryPanel("0");
|
||||
cy.dragAndDropWidget("Dropdown", 200, 200);
|
||||
cy.dragAndDropWidget("Dropdown", 300, 300);
|
||||
cy.resizeWidget("dropdown1", 400, 500, false);
|
||||
cy.forceClickOnCanvas();
|
||||
verifyComponent("dropdown1");
|
||||
|
|
@ -147,11 +151,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("dropdown2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("dropdown2");
|
||||
});
|
||||
//pending
|
||||
it("Should verify Rating", () => {
|
||||
cy.dragAndDropWidget("Rating", 200, 200);
|
||||
cy.dragAndDropWidget("Rating", 300, 300);
|
||||
cy.get('[data-cy="draggable-widget-starrating1"]').click({ force: true });
|
||||
cy.resizeWidget("starrating1", 400, 500, false);
|
||||
cy.forceClickOnCanvas();
|
||||
|
|
@ -173,6 +178,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("starrating2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("starrating2");
|
||||
});
|
||||
|
||||
|
|
@ -197,11 +203,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("buttongroup2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("buttongroup2");
|
||||
});
|
||||
|
||||
it("Should verify Calendar", () => {
|
||||
cy.dragAndDropWidget("Calendar", 200, 200);
|
||||
cy.dragAndDropWidget("Calendar", 300, 300);
|
||||
cy.get('[data-cy="draggable-widget-calendar1"]').click({ force: true });
|
||||
cy.forceClickOnCanvas();
|
||||
verifyComponent("calendar1");
|
||||
|
|
@ -216,11 +223,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("calendar2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("calendar2");
|
||||
});
|
||||
|
||||
it("Should verify Chart", () => {
|
||||
cy.dragAndDropWidget("Chart", 200, 200);
|
||||
cy.dragAndDropWidget("Chart", 300, 300);
|
||||
cy.get('[data-cy="draggable-widget-chart1"]').click({ force: true });
|
||||
verifyComponent("chart1");
|
||||
|
||||
|
|
@ -241,6 +249,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("chart2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("chart2");
|
||||
});
|
||||
|
||||
|
|
@ -261,6 +270,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("circularprogressbar2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("circularprogressbar2");
|
||||
});
|
||||
|
||||
|
|
@ -281,6 +291,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("codeeditor2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("codeeditor2");
|
||||
});
|
||||
|
||||
|
|
@ -302,10 +313,11 @@ describe("Basic components", () => {
|
|||
verifyComponent("colorpicker2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("colorpicker2");
|
||||
});
|
||||
it("Should verify Custom Component", () => {
|
||||
cy.dragAndDropWidget("Custom Component", 200, 200);
|
||||
cy.dragAndDropWidget("Custom Component", 300, 300);
|
||||
// cy.get('[data-cy="draggable-widget-customcomponent1"]').click({
|
||||
// force: true,
|
||||
// });
|
||||
|
|
@ -334,11 +346,12 @@ describe("Basic components", () => {
|
|||
verifyComponent("customcomponent2", ["Code"]);
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("customcomponent2");
|
||||
});
|
||||
|
||||
it("Should verify Container", () => {
|
||||
cy.dragAndDropWidget("Container", 200, 200);
|
||||
cy.dragAndDropWidget("Container", 300, 300);
|
||||
cy.forceClickOnCanvas();
|
||||
verifyComponent("container1");
|
||||
|
||||
|
|
@ -353,6 +366,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("container2", ["Layout"]);
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("container2");
|
||||
});
|
||||
|
||||
|
|
@ -374,6 +388,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("daterangepicker2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("daterangepicker2");
|
||||
});
|
||||
// visible issue
|
||||
|
|
@ -396,7 +411,7 @@ describe("Basic components", () => {
|
|||
});
|
||||
|
||||
it("Should verify Form", () => {
|
||||
cy.dragAndDropWidget("Form", 200, 200);
|
||||
cy.dragAndDropWidget("Form", 300, 300);
|
||||
verifyComponent("form1");
|
||||
|
||||
cy.resizeWidget("form1", 650, 400, false);
|
||||
|
|
@ -410,12 +425,14 @@ describe("Basic components", () => {
|
|||
verifyComponent("form2");
|
||||
|
||||
cy.go("back");
|
||||
cy.waitForAppLoad();
|
||||
cy.wait(1500);
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("form2");
|
||||
});
|
||||
|
||||
it("Should verify HTML", () => {
|
||||
cy.dragAndDropWidget("HTML Viewe", 200, 200, "HTML Viewer"); // search logic WIP
|
||||
cy.dragAndDropWidget("HTML Viewe", 300, 300, "HTML Viewer"); // search logic WIP
|
||||
verifyComponent("html1");
|
||||
|
||||
cy.resizeWidget("html1", 650, 400, false);
|
||||
|
|
@ -429,6 +446,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("html2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("html2");
|
||||
});
|
||||
|
||||
|
|
@ -449,7 +467,7 @@ describe("Basic components", () => {
|
|||
});
|
||||
|
||||
it("Should verify Map", () => {
|
||||
cy.dragAndDropWidget("Map", 200, 200);
|
||||
cy.dragAndDropWidget("Map", 300, 300);
|
||||
cy.get("body").then(($body) => {
|
||||
if ($body.find(".dismissButton").length > 0) {
|
||||
cy.get(".dismissButton").click();
|
||||
|
|
@ -469,6 +487,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("map2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("map2");
|
||||
});
|
||||
|
||||
|
|
@ -477,7 +496,7 @@ describe("Basic components", () => {
|
|||
});
|
||||
|
||||
it("Should verify PDF", () => {
|
||||
cy.dragAndDropWidget("PDF", 200, 200);
|
||||
cy.dragAndDropWidget("PDF", 300, 300);
|
||||
verifyComponent("pdf1");
|
||||
|
||||
cy.resizeWidget("pdf1", 650, 400, false);
|
||||
|
|
@ -491,6 +510,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("pdf2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("pdf2");
|
||||
});
|
||||
|
||||
|
|
@ -562,11 +582,10 @@ describe("Basic components", () => {
|
|||
});
|
||||
|
||||
it("Should verify Tabs", () => {
|
||||
cy.viewport(1200, 1300);
|
||||
resizeQueryPanel("0");
|
||||
cy.dragAndDropWidget("Tabs", 200, 200);
|
||||
cy.dragAndDropWidget("Tabs", 300, 300);
|
||||
verifyComponent("tabs1");
|
||||
deleteComponentAndVerify("image1");
|
||||
// deleteComponentAndVerify("image1");
|
||||
|
||||
cy.resizeWidget("tabs1", 650, 400, false);
|
||||
|
||||
|
|
@ -579,6 +598,7 @@ describe("Basic components", () => {
|
|||
verifyComponent("tabs2");
|
||||
|
||||
cy.go("back");
|
||||
resizeQueryPanel(0);
|
||||
deleteComponentAndVerify("tabs2");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ describe("Editor- CSA", () => {
|
|||
});
|
||||
|
||||
afterEach(() => {
|
||||
cy.wait(500);
|
||||
cy.apiDeleteApp();
|
||||
});
|
||||
|
||||
|
|
@ -218,7 +219,7 @@ describe("Editor- CSA", () => {
|
|||
cy.get('[data-cy="draggable-widget-icon1"]').should("not.be.visible");
|
||||
});
|
||||
|
||||
it.only("Should verify Kanban CSA", () => {
|
||||
it("Should verify Kanban CSA", () => {
|
||||
cy.viewport(1400, 1900);
|
||||
|
||||
cy.dragAndDropWidget("Kanban", 50, 400);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ describe("Manage SSO for multi workspace", () => {
|
|||
const data = {};
|
||||
const envVar = Cypress.env("environment");
|
||||
beforeEach(() => {
|
||||
cy.appUILogin();
|
||||
cy.visit('/my-workspace');
|
||||
cy.defaultWorkspaceLogin();
|
||||
});
|
||||
it("Should verify General settings page elements", () => {
|
||||
common.navigateToManageSSO();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ data.workspaceName = `${fake.firstName}-workspace`;
|
|||
data.workspaceSlug = `${data.workspaceName.toLowerCase()}-slug`;
|
||||
describe("Workspace", () => {
|
||||
before(() => {
|
||||
cy.appUILogin();
|
||||
cy.defaultWorkspaceLogin();
|
||||
});
|
||||
|
||||
it("Should verify create and edit workspace modal and flow", () => {
|
||||
|
|
|
|||
|
|
@ -8,18 +8,27 @@ import {
|
|||
import { resizeQueryPanel } from "Support/utils/dataSource";
|
||||
|
||||
export const verifyComponent = (widgetName) => {
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName)).should("be.visible");
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName), {
|
||||
timeout: 10000,
|
||||
}).should("be.visible");
|
||||
};
|
||||
|
||||
export const deleteComponentAndVerify = (widgetName) => {
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName)).click().realHover();
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName))
|
||||
.realHover()
|
||||
.realHover();
|
||||
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName)).realHover();
|
||||
|
||||
cy.get(`[data-cy="${widgetName}-delete-button"]`).last().realClick();
|
||||
cy.get(commonWidgetSelector.draggableWidget(widgetName))
|
||||
.realHover()
|
||||
.then(() => {
|
||||
cy.get(`[data-cy="${widgetName}-delete-button"]`)
|
||||
.realHover({ position: "topRight" })
|
||||
.last()
|
||||
.realClick();
|
||||
});
|
||||
cy.verifyToastMessage(
|
||||
`[class=go3958317564]`,
|
||||
"Component deleted! (ctrl + Z to undo)"
|
||||
"Component deleted! (⌘ + Z to undo)"
|
||||
);
|
||||
cy.notVisible(commonWidgetSelector.draggableWidget(widgetName));
|
||||
};
|
||||
|
|
@ -31,11 +40,11 @@ export const verifyComponentWithOutLabel = (
|
|||
appName,
|
||||
properties = []
|
||||
) => {
|
||||
cy.dragAndDropWidget(component, 200, 200);
|
||||
cy.dragAndDropWidget(component, 300, 300);
|
||||
cy.get(`[data-cy="draggable-widget-${defaultName}"]`).click({ force: true });
|
||||
verifyComponent(defaultName);
|
||||
|
||||
cy.resizeWidget(defaultName, 650, 400, false);
|
||||
cy.resizeWidget(defaultName, 650, 600, false);
|
||||
|
||||
openEditorSidebar(defaultName);
|
||||
editAndVerifyWidgetName(fakeName, properties);
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ export const reset = () => {
|
|||
export const addNewUserMW = (firstName, email, companyName) => {
|
||||
common.navigateToManageUsers();
|
||||
users.inviteUser(firstName, email);
|
||||
cy.get(commonSelectors.workspaceName).verifyVisibleElement(
|
||||
"have.text",
|
||||
"My workspace"
|
||||
);
|
||||
// cy.get(commonSelectors.workspaceName).verifyVisibleElement(
|
||||
// "have.text",
|
||||
// "My workspace"
|
||||
// );
|
||||
updateWorkspaceName(email);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.26.0
|
||||
2.26.1
|
||||
|
|
|
|||
|
|
@ -392,7 +392,11 @@ export function Table({
|
|||
dynamicColumn = useDynamicColumn
|
||||
? resolveReferences(component.definition.properties?.columnData?.value, currentState, []) ?? []
|
||||
: [];
|
||||
if (!Array.isArray(tableData)) tableData = [];
|
||||
if (!Array.isArray(tableData)) {
|
||||
tableData = [];
|
||||
} else {
|
||||
tableData = tableData.filter((data) => data !== null && data !== undefined);
|
||||
}
|
||||
}
|
||||
|
||||
tableData = tableData || [];
|
||||
|
|
|
|||
|
|
@ -1862,8 +1862,15 @@ export const buildComponentMetaDefinition = (components = {}) => {
|
|||
|
||||
const mergedDefinition = {
|
||||
...componentMeta.definition,
|
||||
|
||||
properties: _.merge(componentMeta.definition.properties, currentComponentData?.component.definition.properties),
|
||||
properties: _.mergeWith(
|
||||
componentMeta.definition.properties,
|
||||
currentComponentData?.component?.definition?.properties,
|
||||
(objValue, srcValue) => {
|
||||
if (currentComponentData?.component?.component === 'Table' && _.isArray(objValue)) {
|
||||
return srcValue;
|
||||
}
|
||||
}
|
||||
),
|
||||
styles: _.merge(componentMeta.definition.styles, currentComponentData?.component.definition.styles),
|
||||
generalStyles: _.merge(
|
||||
componentMeta.definition.generalStyles,
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.26.0
|
||||
2.26.1
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ export class ComponentsService {
|
|||
for (const componentId in componentDiff) {
|
||||
const { component } = componentDiff[componentId];
|
||||
|
||||
const componentData = await manager.findOne(Component, componentId);
|
||||
const componentData: Component = await manager.findOne(Component, componentId);
|
||||
|
||||
if (!componentData) {
|
||||
return {
|
||||
|
|
@ -87,9 +87,14 @@ export class ComponentsService {
|
|||
const columnsUpdated = Object.keys(updatedDefinition);
|
||||
|
||||
const newComponentsData = columnsUpdated.reduce((acc, column) => {
|
||||
const newColumnData = _.merge(
|
||||
const newColumnData = _.mergeWith(
|
||||
componentData[column === 'others' ? 'displayPreferences' : column],
|
||||
updatedDefinition[column]
|
||||
updatedDefinition[column],
|
||||
(objValue, srcValue) => {
|
||||
if (componentData.type === 'Table' && _.isArray(objValue)) {
|
||||
return srcValue;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
if (column === 'others') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue