diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/appTitle.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/appTitle.cy.js index 34f303769f..994138348a 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/appTitle.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/components/appTitle.cy.js @@ -43,8 +43,10 @@ describe("Editor title", () => { cy.apiDeleteApp(); }); it("should verify titles", () => { - cy.url().should("include", "/my-workspace"); - cy.title().should("eq", "Dashboard | ToolJet"); + cy.url().should("include", "/tjs-workspace"); + // cy.title().should("eq", "Dashboard | ToolJet"); + cy.title().should("eq", "ToolJet"); + cy.log(data.appName); cy.openApp(); @@ -54,12 +56,20 @@ describe("Editor title", () => { cy.openInCurrentTab(commonWidgetSelector.previewButton); cy.url().should("include", `/applications/${Cypress.env("appId")}`); - cy.title().should("eq", `Preview - ${data.appName} | ToolJet`); + cy.title().should("eq", `${data.appName} | ToolJet`); + // cy.title().should("eq", `Preview - ${data.appName} | ToolJet`); + cy.go("back"); cy.releaseApp(); - cy.url().then((url) => cy.visit(`/applications/${url.split("/").pop()}`)); + cy.url().then((url) => { + const appId = url.split("/").filter(Boolean).pop(); + cy.log(appId); + cy.visit(`/applications/${appId}`); + }); cy.url().should("include", `/applications/${Cypress.env("appId")}`); - cy.title().should("eq", `${data.appName}`); + cy.title().should("eq", `${data.appName} | ToolJet`); + // cy.title().should("eq", `${data.appName}`); }); }); + diff --git a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/globalSetingsHappyPath.cy.js b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/globalSetingsHappyPath.cy.js index 195262cfdc..3802f068ed 100644 --- a/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/globalSetingsHappyPath.cy.js +++ b/cypress-tests/cypress/e2e/happyPath/appbuilder/commonTestcases/globalSetingsHappyPath.cy.js @@ -35,13 +35,13 @@ describe("Editor- Global Settings", () => { "have.text", "Global settings" ); - cy.get( - '[data-cy="label-hide-header-for-launched-apps"]' - ).verifyVisibleElement("have.text", "Hide header for launched apps"); - cy.get('[data-cy="label-maintenance-mode"]').verifyVisibleElement( - "have.text", - "Maintenance mode" - ); + // cy.get( + // '[data-cy="label-hide-header-for-launched-apps"]' + // ).verifyVisibleElement("have.text", "Hide header for launched apps"); + // cy.get('[data-cy="label-maintenance-mode"]').verifyVisibleElement( + // "have.text", + // "Maintenance mode" + // ); cy.hideTooltip(); cy.get('[data-cy="label-max-canvas-width"]').verifyVisibleElement( "have.text", @@ -60,7 +60,7 @@ describe("Editor- Global Settings", () => { ); verifyWidgetColorCss( - ".canvas-area", + '[data-cy="real-canvas"]', "background-color", data.backgroundColor, true @@ -87,24 +87,25 @@ describe("Editor- Global Settings", () => { cy.get("[data-cy='left-sidebar-settings-button']").click(); cy.get('[data-cy="toggle-maintenance-mode"]').realClick(); cy.get('[data-cy="modal-confirm-button"]').click(); - cy.verifyToastMessage( - commonSelectors.toastMessage, - "Application is on maintenance.", - false - ); + // cy.verifyToastMessage( + // commonSelectors.toastMessage, + // "Application is on maintenance.", + // false + // ); cy.forceClickOnCanvas(); cy.wait(500); cy.waitForAutoSave(); - //Fix this after the release. 2.9.0 - // cy.get('[data-cy="button-release"]').click(); - // cy.get('[data-cy="yes-button"]').click(); - // cy.get('[data-cy="editor-page-logo"]').click(); - // cy.get(`[data-cy="${data.appName.toLowerCase()}-card"]`) - // .realHover() - // .find('[data-cy="launch-button"]') - // .invoke("attr", "class") - // .should("contains", "disabled-btn"); - + // Fix this after the release. 2.9.0 + cy.get('[data-cy="button-release"]').click(); + cy.get('[data-cy="yes-button"]').click(); + cy.get('[data-cy="editor-page-logo"]').click(); + cy.get('[data-cy="back-to-app-option"]').click(); + cy.get(`[data-cy="${data.appName.toLowerCase()}-card"]`) + .realHover().within(() => { + cy.get('[data-cy="launch-button"]').should('have.text', 'Maintenance') + .invoke("attr", "class") + .should("contains", "disabled-btn"); + }) cy.apiDeleteApp(); }); }); diff --git a/cypress-tests/cypress/support/utils/button.js b/cypress-tests/cypress/support/utils/button.js index ddace2f305..66e340965c 100644 --- a/cypress-tests/cypress/support/utils/button.js +++ b/cypress-tests/cypress/support/utils/button.js @@ -40,7 +40,7 @@ export const verifyControlComponentAction = (widgetName, value) => { export const addBasicData = (data) => { openEditorSidebar(buttonText.defaultWidgetName); - verifyAndModifyParameter(buttonText.buttonTextLabel, data.widgetName); + verifyAndModifyParameter('Label', data.widgetName); openAccordion(commonWidgetText.accordionEvents); addDefaultEventHandler(data.alertMessage); diff --git a/frontend/src/AppBuilder/AppCanvas/RenderWidget.jsx b/frontend/src/AppBuilder/AppCanvas/RenderWidget.jsx index 7862db5676..e8976cd764 100644 --- a/frontend/src/AppBuilder/AppCanvas/RenderWidget.jsx +++ b/frontend/src/AppBuilder/AppCanvas/RenderWidget.jsx @@ -152,18 +152,17 @@ const RenderWidget = ({ ? null : ['hover', 'focus'] : !resolvedGeneralProperties?.tooltip?.toString().trim() - ? null - : ['hover', 'focus'] + ? null + : ['hover', 'focus'] } overlay={(props) => renderTooltip({ props, text: inCanvas - ? `${ - shouldAddBoxShadowAndVisibility.includes(component?.component) - ? resolvedProperties?.tooltip - : resolvedGeneralProperties?.tooltip - }` + ? `${shouldAddBoxShadowAndVisibility.includes(component?.component) + ? resolvedProperties?.tooltip + : resolvedGeneralProperties?.tooltip + }` : `${t(`widget.${component?.name}.description`, component?.description)}`, }) } @@ -191,6 +190,7 @@ const RenderWidget = ({ onComponentClick={onComponentClick} darkMode={darkMode} componentName={componentName} + dataCy={`draggable-widget-${componentName}`} />