diff --git a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts index 8cb94c4995..11b13c9da6 100644 --- a/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts +++ b/app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Widgets_Sidebar.ts @@ -3,7 +3,6 @@ import { agHelper, locators, } from "../../../../support/Objects/ObjectsCore"; -import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; describe( "Entity explorer tests related to widgets and validation", @@ -111,6 +110,11 @@ describe( // check that all widgets are present within their tags const widgetsInThisTag: string[] = []; + // click the see more button for building blocks first to show all widgets + cy.wrap($widgetTag) + .find(entityExplorer._widgetSeeMoreButton) + .click({ force: true }); + cy.wrap($widgetTag) .find(entityExplorer._widgetCardTitle) .each(($widgetName) => { @@ -134,10 +138,10 @@ describe( }); }); - it("3. All widgets should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => { + it("3. All widgets other than building blocks should be ordered alphabetically within their tags, except Essential widgets, which should be sorted by their static rank.", () => { agHelper .GetElement( - `${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets})`, + `${entityExplorer._widgetTagsList}:not(${entityExplorer._widgetTagSuggestedWidgets}):not(${entityExplorer._widgetTagBuildingBlocks})`, ) .each(($widgetTag) => { const widgetsInThisTag: string[] = []; @@ -192,6 +196,12 @@ describe( agHelper.AssertElementExist(".t--widget-card-draggable-customwidget"); agHelper.ClearTextField(entityExplorer._widgetSearchInput); + // click to show all building blocks + agHelper.GetElement(entityExplorer._widgetTagsList).each(($widgetTag) => { + cy.wrap($widgetTag) + .find(entityExplorer._widgetSeeMoreButton) + .click({ force: true }); + }); agHelper.AssertElementLength( entityExplorer._widgetCards, diff --git a/app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_spec.js b/app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_spec.js index 114649375e..597673d113 100644 --- a/app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_spec.js +++ b/app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_spec.js @@ -95,12 +95,12 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () { cy.get("@pricingPage").should("be.called"); cy.wait(2000); cy.go(-1); - cy.stubPricingPage(); + cy.stubCustomerPortalPage(); cy.get(adminsSettings.branding).click(); cy.url().should("contain", adminSettingsHelper.routes.BRANDING); cy.get(adminsSettings.brandingSubmitButton).should("be.disabled"); cy.xpath(adminsSettings.upgrade).click(); - cy.get("@pricingPage").should("be.called"); + cy.get("@customerPortalPage").should("be.called"); cy.wait(2000); cy.go(-1); } @@ -119,11 +119,14 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () { }); cy.get(adminsSettings.accessControl).click(); cy.url().should("contain", adminSettingsHelper.routes.ACCESS_CONTROL); - cy.stubPricingPage(); + cy.stubCustomerPortalPage(); cy.xpath(adminsSettings.upgrade).click(); - cy.get("@pricingPage").should("be.called"); + cy.get("@customerPortalPage").should("be.called"); cy.wait(2000); - cy.go(-1); + agHelper.VisitNAssert( + adminSettingsHelper.routes.GENERAL, + "getEnvVariables", + ); cy.get(adminsSettings.auditLogs).within(() => { cy.get(adminsSettings.businessTag) .should("exist") @@ -131,11 +134,14 @@ describe("Admin settings page", { tags: ["@tag.Settings"] }, function () { }); cy.get(adminsSettings.auditLogs).click(); cy.url().should("contain", adminSettingsHelper.routes.AUDIT_LOGS); - cy.stubPricingPage(); + cy.stubCustomerPortalPage(); cy.xpath(adminsSettings.upgrade).click(); - cy.get("@pricingPage").should("be.called"); + cy.get("@customerPortalPage").should("be.called"); cy.wait(2000); - cy.go(-1); + agHelper.VisitNAssert( + adminSettingsHelper.routes.GENERAL, + "getEnvVariables", + ); cy.get(adminsSettings.provisioning).within(() => { cy.get(adminsSettings.enterpriseTag) .should("exist") diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts index f792022482..65c8e2f64a 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/ConnectionErrors_Spec.ts @@ -25,8 +25,8 @@ describe( agHelper.RenameWithInPane(dataSourceName, false); dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing endpoint."); agHelper.ValidateToastMessage("Missing username for authentication."); + agHelper.ValidateToastMessage("Missing hostname."); agHelper.ClearTextField(dataSources._databaseName); dataSources.TestDatasource(false); agHelper.ValidateToastMessage("Missing database name."); @@ -81,7 +81,7 @@ describe( agHelper.RenameWithInPane(dataSourceName, false); dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing endpoint and url"); + agHelper.ValidateToastMessage("Host value cannot be empty"); agHelper.ValidateToastMessage("Missing username for authentication."); agHelper.ValidateToastMessage("Missing password for authentication."); agHelper.ClearTextField(dataSources._databaseName); @@ -135,7 +135,9 @@ describe( agHelper.RenameWithInPane(dataSourceName, false); dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing endpoint(s)"); + agHelper.ValidateToastMessage( + "Connection timed out. Please check if the datasource configuration fields have been filled correctly.", + ); dataSources.ValidateNSelectDropdown( "Use mongo connection string URI", "No", @@ -166,7 +168,9 @@ describe( "Replica set", ); dataSources.TestDatasource(false); - agHelper.ValidateToastMessage("Missing endpoint(s)"); + agHelper.ValidateToastMessage( + "REPLICA_SET connections should not be given a port. If you are trying to specify all the shards, please add more than one.", + ); agHelper.UpdateInputValue( dataSources._host(), dataManager.dsValues[dataManager.defaultEnviorment].mongo_host, diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts index 15065d4d10..fffbcc65e3 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Oracle_Spec.ts @@ -30,7 +30,7 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { }); }); - it("1. Tc #2354, #2204 - Oracle placeholder & mandatory mark verification", () => { + it("1. Tc #2354, #2204 - Oracle placeholder, port default value & mandatory mark verification", () => { dataSources.NavigateToDSCreateNew(); dataSources.CreatePlugIn("Oracle"); agHelper.GetNAssertContains(locators._dsName, "Untitled datasource"); @@ -45,6 +45,7 @@ describe("Validate Oracle DS", { tags: ["@tag.Datasource"] }, () => { "placeholder", "myapp.abcde.oracle.net", ); + agHelper.AssertAttribute(dataSources._port, "value", "1521"); agHelper.AssertAttribute( dataSources._databaseName, "placeholder", diff --git a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts index 586e07d7b9..2745330884 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts +++ b/app/client/cypress/e2e/Regression/ServerSide/Datasources/Redis_Basic_Spec.ts @@ -14,7 +14,7 @@ describe("Validate Redis DS", { tags: ["@tag.Datasource"] }, () => { }); }); - it("Create HAST set (Multiple key value pair under single key name) in redis DB, Read, Delete", () => { + it("1. Create HAST set (Multiple key value pair under single key name) in redis DB, Read, Delete", () => { let hSetReceipe = `HSET recipe:1 name "Vegetable Stir Fry" ingredients "2 cups mixed vegetables (broccoli, carrots, bell peppers, mushrooms, snow peas), 2 cloves garlic, minced" instructions "1. Heat vegetable oil in a large skillet over medium-high heat. 2. Add mixed vegetables and garlic to the skillet and cook for 3-4 minutes. 3. In a small bowl, whisk together soy sauce and cornstarch. 4. Pour the soy sauce mixture over the vegetables and stir until the vegetables are coated. 5. Cook for an additional 1-2 minutes. 6. Serve hot." difficulty "easy"`; let hGetKeys = "HGET recipe:1 name"; let hMGet = "HMGET recipe:1 difficulty name"; // getting multiple keys @@ -90,20 +90,19 @@ describe("Validate Redis DS", { tags: ["@tag.Datasource"] }, () => { dataSources.EnterQuery(hGetKeys); dataSources.RunQueryNVerifyResponseViews(); //5 keys, 5 values dataSources.AssertQueryTableResponse(0, "null"); - }); - after("Delete the query & datasource", () => { + // Delete the query & datasource agHelper.ActionContextMenuWithInPane({ action: "Delete", entityType: entityItems.Query, }); dataSources.DeleteDatasourceFromWithinDS(dsName); - //commenting below since after query delete, we run into risk of not seeing the datasource in EntityExplorer - // EditorNavigation.SelectEntityByName(dsName, EntityType.Datasource); - // entityExplorer.ActionContextMenuByEntityName({ - // entityNameinLeftSidebar: dsName, - // action: "Delete", - // entityType: entityItems.Datasource, - // }); + }); + + it("2. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Redis"); + + agHelper.AssertAttribute(dataSources._port, "value", "6379"); }); }); diff --git a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js index 44d4129505..89a387b62a 100644 --- a/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js +++ b/app/client/cypress/e2e/Regression/ServerSide/QueryPane/EmptyDataSource_spec.js @@ -23,7 +23,7 @@ describe( dataSources.RunQuery({ toValidateResponse: false }); cy.wait(500); cy.get("[data-testid=t--query-error]").contains( - "[Missing endpoint., Missing username for authentication.]", + "[Missing username for authentication., Missing hostname.]", ); agHelper.ActionContextMenuWithInPane({ action: "Delete", diff --git a/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js index c745197d53..a87849fdd3 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/ArangoDataSourceStub_spec.js @@ -47,5 +47,12 @@ describe( .then(($dbName) => expect($dbName).to.eq("_system")); dataSources.SaveDSFromDialog(false); }); + + it("5. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("ArangoDB"); + + agHelper.AssertAttribute(dataSources._port, "value", "8529"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js index d213eebea2..7a95ee2f39 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/ElasticSearchDatasource_spec.js @@ -1,6 +1,6 @@ const datasource = require("../../../locators/DatasourcesEditor.json"); -import { dataSources } from "../../../support/Objects/ObjectsCore"; +import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; let elasticSearchName; @@ -31,5 +31,12 @@ describe( dataSources.SaveDSFromDialog(false); }); + + it("2. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Elasticsearch"); + + agHelper.AssertAttribute(dataSources._port, "value", "9200"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts b/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts index d0168eba7b..356d71264c 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/MongoDatasourceURI_spec.ts @@ -43,5 +43,12 @@ describe( dataSources.DeleteDatasourceFromWithinDS(dsName); }); }); + + it("4. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("MongoDB"); + + agHelper.AssertAttribute(dataSources._port, "value", "27017"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts b/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts index 18fba758aa..1fb99aff2e 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts +++ b/app/client/cypress/e2e/Sanity/Datasources/MsSQL_Basic_Spec.ts @@ -343,6 +343,13 @@ describe( table.WaitUntilTableLoad(); }); + it("7. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Microsoft SQL Server"); + + agHelper.AssertAttribute(dataSources._port, "value", "1433"); + }); + after("Verify Deletion of the datasource", () => { cy.intercept("DELETE", "/api/v1/datasources/*").as("deleteDatasource"); //Since intercept from before is not working dataSources.DeleteDatasourceFromWithinDS(dsName, 409); //since CRUD pages are still active diff --git a/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js b/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js index 6d92465b06..aae11a813a 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/MySQL_spec.js @@ -45,5 +45,12 @@ describe( cy.deleteQueryUsingContext(); cy.deleteDatasource(datasourceName); }); + + it("4. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("MySQL"); + + agHelper.AssertAttribute(dataSources._port, "value", "3306"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/PostgresDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/PostgresDatasource_spec.js index f46834586d..d9140f5ad0 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/PostgresDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/PostgresDatasource_spec.js @@ -42,5 +42,12 @@ describe( cy.deleteQueryUsingContext(); cy.deleteDatasource(datasourceName); }); + + it("4. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("PostgreSQL"); + + agHelper.AssertAttribute(dataSources._port, "value", "5432"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js b/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js index 24b74f15a4..1a757cbb02 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/RedshiftDataSourceStub_spec.js @@ -1,5 +1,6 @@ const datasource = require("../../../locators/DatasourcesEditor.json"); let datasourceName; +import { agHelper, dataSources } from "../../../support/Objects/ObjectsCore"; import { ObjectsRegistry } from "../../../support/Objects/Registry"; describe( @@ -49,5 +50,12 @@ describe( cy.deleteQueryUsingContext(); cy.deleteDatasource(datasourceName); }); + + it("4. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("Redshift"); + + agHelper.AssertAttribute(dataSources._port, "value", "5439"); + }); }, ); diff --git a/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js b/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js index 863809a1a8..9576cca08a 100644 --- a/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js +++ b/app/client/cypress/e2e/Sanity/Datasources/SMTPDatasource_spec.js @@ -126,5 +126,12 @@ describe( expect(thisTestEmail.attachments.length).equal(1); }); }); + + it("4. Verify the default port for the datasource", function () { + dataSources.NavigateToDSCreateNew(); + dataSources.CreatePlugIn("SMTP"); + + agHelper.AssertAttribute(dataSources._port, "value", "25"); + }); }, ); diff --git a/app/client/cypress/fixtures/PartialImportExport/CustomJsLibsExportedOnly.json b/app/client/cypress/fixtures/PartialImportExport/CustomJsLibsExportedOnly.json index 6b5f9a4fc1..f0a5f23afb 100644 --- a/app/client/cypress/fixtures/PartialImportExport/CustomJsLibsExportedOnly.json +++ b/app/client/cypress/fixtures/PartialImportExport/CustomJsLibsExportedOnly.json @@ -1 +1 @@ -{"clientSchemaVersion":1,"serverSchemaVersion":7,"customJSLibList":[{"name":"jsonwebtoken","accessor":["jsonwebtoken"],"url":"/libraries/jsonwebtoken@8.5.1.js","version":"8.5.1","defs":"{\"!name\":\"LIB/jsonwebtoken\",\"jsonwebtoken\":{\"decode\":{\"!type\":\"fn()\",\"prototype\":{}},\"verify\":{\"!type\":\"fn()\",\"prototype\":{}},\"sign\":{\"!type\":\"fn()\",\"prototype\":{}},\"JsonWebTokenError\":{\"!type\":\"fn()\",\"prototype\":{\"message\":{\"!type\":\"string\"},\"toString\":{\"!type\":\"fn()\"}}},\"NotBeforeError\":{\"!type\":\"fn()\",\"prototype\":{}},\"TokenExpiredError\":{\"!type\":\"fn()\",\"prototype\":{}}}}","userPermissions":[],"uidString":"jsonwebtoken_/libraries/jsonwebtoken@8.5.1.js","new":true}],"widgets":""} \ No newline at end of file +{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"customJSLibList":[{"name":"jsonwebtoken","accessor":["jsonwebtoken"],"url":"/libraries/jsonwebtoken@8.5.1.js","version":"8.5.1","defs":"{\"!name\":\"LIB/jsonwebtoken\",\"jsonwebtoken\":{\"decode\":{\"!type\":\"fn()\",\"prototype\":{}},\"verify\":{\"!type\":\"fn()\",\"prototype\":{}},\"sign\":{\"!type\":\"fn()\",\"prototype\":{}},\"JsonWebTokenError\":{\"!type\":\"fn()\",\"prototype\":{\"message\":{\"!type\":\"string\"},\"toString\":{\"!type\":\"fn()\"}}},\"NotBeforeError\":{\"!type\":\"fn()\",\"prototype\":{}},\"TokenExpiredError\":{\"!type\":\"fn()\",\"prototype\":{}}}}","userPermissions":[],"uidString":"jsonwebtoken_/libraries/jsonwebtoken@8.5.1.js","new":true}],"widgets":""} \ No newline at end of file diff --git a/app/client/cypress/fixtures/PartialImportExport/DatasourceExportedOnly.json b/app/client/cypress/fixtures/PartialImportExport/DatasourceExportedOnly.json index df9f764cc7..ace9be3e09 100644 --- a/app/client/cypress/fixtures/PartialImportExport/DatasourceExportedOnly.json +++ b/app/client/cypress/fixtures/PartialImportExport/DatasourceExportedOnly.json @@ -1 +1 @@ -{"clientSchemaVersion":1,"serverSchemaVersion":7,"datasourceList":[{"datasourceConfiguration":{"connection":{"mode":"READ_WRITE","ssl":{"authType":"DEFAULT"}},"endpoints":[{"host":"mockdb.internal.appsmith.com"}]},"name":"Users","pluginId":"postgres-plugin","messages":[],"isAutoGenerated":false,"isMock":true,"isValid":true,"embedded":false,"new":true}],"widgets":""} \ No newline at end of file +{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"datasourceList":[{"datasourceConfiguration":{"connection":{"mode":"READ_WRITE","ssl":{"authType":"DEFAULT"}},"endpoints":[{"host":"mockdb.internal.appsmith.com"}]},"name":"Users","pluginId":"postgres-plugin","messages":[],"isAutoGenerated":false,"isMock":true,"isValid":true,"new":true}],"widgets":""} \ No newline at end of file diff --git a/app/client/cypress/fixtures/PartialImportExport/JSExportedOnly.json b/app/client/cypress/fixtures/PartialImportExport/JSExportedOnly.json index 34972281d5..a622e9fa00 100644 --- a/app/client/cypress/fixtures/PartialImportExport/JSExportedOnly.json +++ b/app/client/cypress/fixtures/PartialImportExport/JSExportedOnly.json @@ -1 +1 @@ -{"clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[],"actionCollectionList":[{"id":"Home_JSObject1","unpublishedCollection":{"name":"JSObject1","pageId":"Home","pluginId":"js-plugin","pluginType":"JS","actions":[],"archivedActions":[],"body":"export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\taddNumbers (a, b) {\n\t\treturn a+b;\n\t},\n\tasync myFun2 () {\n\t\t//\tuse async-await or promises\n\t\t//\tawait storeValue('varName', 'hello world')\n\t}\n}","variables":[{"name":"myVar1","value":"[]"},{"name":"myVar2","value":"{}"}],"userPermissions":[],"userExecutableName":"JSObject1"},"new":false}],"widgets":""} \ No newline at end of file +{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[],"actionCollectionList":[{"id":"Home_JSObject1","unpublishedCollection":{"name":"JSObject1","pageId":"Home","pluginId":"js-plugin","pluginType":"JS","actions":[],"archivedActions":[],"body":"export default {\n\tmyVar1: [],\n\tmyVar2: {},\n\taddNumbers (a, b) {\n\t\treturn a+b;\n\t},\n\tasync myFun2 () {\n\t\t//\tuse async-await or promises\n\t\t//\tawait storeValue('varName', 'hello world')\n\t}\n}","variables":[{"name":"myVar1","value":"[]"},{"name":"myVar2","value":"{}"}],"userPermissions":[]},"new":false}],"widgets":""} \ No newline at end of file diff --git a/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json b/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json index 4ae84647d4..80f8a761be 100644 --- a/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json +++ b/app/client/cypress/fixtures/PartialImportExport/QueriesExportedOnly.json @@ -1 +1 @@ -{"clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[{"id":"Home_SelectQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"SelectQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"SELECT * FROM public.\"users\"\nWHERE \"gender\" ilike '%{{data_table.searchText || \"\"}}%'\nORDER BY \"{{data_table.sortOrder.column || 'id'}}\" {{data_table.sortOrder.order || 'ASC'}}\nLIMIT {{data_table.pageSize}}\nOFFSET {{(data_table.pageNo - 1) * data_table.pageSize}};","selfReferencingDataPaths":[],"pluginSpecifiedTemplates":[{"value":false}]},"executeOnLoad":true,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.sortOrder.column || 'id'","data_table.sortOrder.order || 'ASC'","data_table.pageSize","data_table.searchText || \"\"","(data_table.pageNo - 1) * data_table.pageSize"],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[],"validName":"SelectQuery"},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[]},"new":false},{"id":"Home_InsertQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"InsertQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"INSERT INTO public.\"users\" (\n\t\"gender\",\n\t\"latitude\",\n\t\"longitude\",\n\t\"dob\",\n\t\"phone\",\n\t\"email\",\n\t\"image\",\n\t\"country\",\n\t\"name\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nVALUES (\n\t'{{insert_form.formData.gender}}',\n\t'{{insert_form.formData.latitude}}',\n\t'{{insert_form.formData.longitude}}',\n\t'{{insert_form.formData.dob}}',\n\t'{{insert_form.formData.phone}}',\n\t'{{insert_form.formData.email}}',\n\t'{{insert_form.formData.image}}',\n\t'{{insert_form.formData.country}}',\n\t'{{insert_form.formData.name}}',\n\t'{{insert_form.formData.created_at}}',\n\t'{{insert_form.formData.updated_at}}'\n);","selfReferencingDataPaths":[],"pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["insert_form.formData.dob","insert_form.formData.image","insert_form.formData.gender","insert_form.formData.email","insert_form.formData.name","insert_form.formData.longitude","insert_form.formData.updated_at","insert_form.formData.phone","insert_form.formData.latitude","insert_form.formData.created_at","insert_form.formData.country"],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[],"validName":"InsertQuery"},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[]},"new":false},{"id":"Home_UpdateQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"UpdateQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"UPDATE public.\"users\" SET\n\t\t\"gender\" = '{{update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender}}',\n\t\t\"latitude\" = '{{update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude}}',\n \"longitude\" = '{{update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude}}',\n\t\t\"dob\" = '{{update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob}}',\n\t\t\"phone\" = '{{update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone}}',\n\t\t\"email\" = '{{update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email}}',\n\t\t\"image\" = '{{update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image}}',\n\t\t\"country\" = '{{update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country}}',\n\t\t\"name\" = '{{update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name}}',\n\t\t\"created_at\" = '{{update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at}}',\n\t\t\"updated_at\" = '{{update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at}}'\n\tWHERE \"id\" = {{data_table.selectedRow.id}};","selfReferencingDataPaths":[],"pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude","update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image","data_table.selectedRow.id","update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country","update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude","update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at","update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email","update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at","update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob","update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name","update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender","update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone"],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[],"validName":"UpdateQuery"},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[]},"new":false},{"id":"Home_DeleteQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"DeleteQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"DELETE FROM public.\"users\"\n WHERE \"id\" = {{data_table.triggeredRow.id}};","selfReferencingDataPaths":[],"pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.triggeredRow.id"],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[],"validName":"DeleteQuery"},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[],"selfReferencingDataPaths":[]},"new":false}],"widgets":""} \ No newline at end of file +{"artifactJsonType":"APPLICATION","clientSchemaVersion":1,"serverSchemaVersion":7,"actionList":[{"id":"Home_InsertQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"InsertQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"INSERT INTO public.\"users\" (\n\t\"gender\",\n\t\"latitude\",\n\t\"longitude\",\n\t\"dob\",\n\t\"phone\",\n\t\"email\",\n\t\"image\",\n\t\"country\",\n\t\"name\",\n\t\"created_at\",\n\t\"updated_at\"\n)\nVALUES (\n\t'{{insert_form.formData.gender}}',\n\t'{{insert_form.formData.latitude}}',\n\t'{{insert_form.formData.longitude}}',\n\t'{{insert_form.formData.dob}}',\n\t'{{insert_form.formData.phone}}',\n\t'{{insert_form.formData.email}}',\n\t'{{insert_form.formData.image}}',\n\t'{{insert_form.formData.country}}',\n\t'{{insert_form.formData.name}}',\n\t'{{insert_form.formData.created_at}}',\n\t'{{insert_form.formData.updated_at}}'\n);","pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["insert_form.formData.dob","insert_form.formData.image","insert_form.formData.gender","insert_form.formData.email","insert_form.formData.name","insert_form.formData.longitude","insert_form.formData.updated_at","insert_form.formData.phone","insert_form.formData.latitude","insert_form.formData.created_at","insert_form.formData.country"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[]},"new":false},{"id":"Home_DeleteQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"DeleteQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"DELETE FROM public.\"users\"\n WHERE \"id\" = {{data_table.triggeredRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.triggeredRow.id"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[]},"new":false},{"id":"Home_UpdateQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"UpdateQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"UPDATE public.\"users\" SET\n\t\t\"gender\" = '{{update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender}}',\n\t\t\"latitude\" = '{{update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude}}',\n \"longitude\" = '{{update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude}}',\n\t\t\"dob\" = '{{update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob}}',\n\t\t\"phone\" = '{{update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone}}',\n\t\t\"email\" = '{{update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email}}',\n\t\t\"image\" = '{{update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image}}',\n\t\t\"country\" = '{{update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country}}',\n\t\t\"name\" = '{{update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name}}',\n\t\t\"created_at\" = '{{update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at}}',\n\t\t\"updated_at\" = '{{update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at}}'\n\tWHERE \"id\" = {{data_table.selectedRow.id}};","pluginSpecifiedTemplates":[{"value":true}]},"executeOnLoad":false,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["update_form.fieldState.latitude.isVisible ? update_form.formData.latitude : update_form.sourceData.latitude","update_form.fieldState.image.isVisible ? update_form.formData.image : update_form.sourceData.image","data_table.selectedRow.id","update_form.fieldState.country.isVisible ? update_form.formData.country : update_form.sourceData.country","update_form.fieldState.longitude.isVisible ? update_form.formData.longitude : update_form.sourceData.longitude","update_form.fieldState.updated_at.isVisible ? update_form.formData.updated_at : update_form.sourceData.updated_at","update_form.fieldState.email.isVisible ? update_form.formData.email : update_form.sourceData.email","update_form.fieldState.created_at.isVisible ? update_form.formData.created_at : update_form.sourceData.created_at","update_form.fieldState.dob.isVisible ? update_form.formData.dob : update_form.sourceData.dob","update_form.fieldState.name.isVisible ? update_form.formData.name : update_form.sourceData.name","update_form.fieldState.gender.isVisible ? update_form.formData.gender : update_form.sourceData.gender","update_form.fieldState.phone.isVisible ? update_form.formData.phone : update_form.sourceData.phone"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[]},"new":false},{"id":"Home_SelectQuery","pluginType":"DB","pluginId":"postgres-plugin","unpublishedAction":{"name":"SelectQuery","datasource":{"userPermissions":[],"name":"Users","pluginId":"postgres-plugin","messages":[],"isValid":true,"new":true},"pageId":"Home","actionConfiguration":{"timeoutInMillisecond":10000,"paginationType":"NONE","encodeParamsToggle":true,"body":"SELECT * FROM public.\"users\"\nWHERE \"gender\" ilike '%{{data_table.searchText || \"\"}}%'\nORDER BY \"{{data_table.sortOrder.column || 'id'}}\" {{data_table.sortOrder.order || 'ASC'}}\nLIMIT {{data_table.pageSize}}\nOFFSET {{(data_table.pageNo - 1) * data_table.pageSize}};","pluginSpecifiedTemplates":[{"value":false}]},"executeOnLoad":true,"isValid":true,"invalids":[],"messages":[],"jsonPathKeys":["data_table.sortOrder.column || 'id'","data_table.sortOrder.order || 'ASC'","data_table.pageSize","data_table.searchText || \"\"","(data_table.pageNo - 1) * data_table.pageSize"],"confirmBeforeExecute":false,"userPermissions":[]},"publishedAction":{"datasource":{"userPermissions":[],"messages":[],"isValid":true,"new":true},"messages":[],"confirmBeforeExecute":false,"userPermissions":[]},"new":false}],"widgets":""} \ No newline at end of file diff --git a/app/client/cypress/support/Pages/EntityExplorer.ts b/app/client/cypress/support/Pages/EntityExplorer.ts index b96c9dd114..b8760c1d13 100644 --- a/app/client/cypress/support/Pages/EntityExplorer.ts +++ b/app/client/cypress/support/Pages/EntityExplorer.ts @@ -69,6 +69,8 @@ export class EntityExplorer { _widgetSearchInput = "#entity-explorer-search"; _widgetCardTitle = ".t--widget-card-draggable span.ads-v2-text"; _widgetTagSuggestedWidgets = ".widget-tag-collapisble-suggested"; + _widgetTagBuildingBlocks = ".widget-tag-collapisble-building-blocks"; + _widgetSeeMoreButton = "[data-testid='t--explorer-ui-entity-tag-see-more']"; public ActionContextMenuByEntityName({ action = "Delete", diff --git a/app/client/cypress/support/commands.js b/app/client/cypress/support/commands.js index ce0769a313..a888f44863 100644 --- a/app/client/cypress/support/commands.js +++ b/app/client/cypress/support/commands.js @@ -2076,6 +2076,14 @@ Cypress.Commands.add("stubPricingPage", () => { }); }); +Cypress.Commands.add("stubCustomerPortalPage", () => { + cy.window().then((win) => { + cy.stub(win, "open", (url) => { + win.location.href = "https://customer.appsmith.com?"; + }).as("customerPortalPage"); + }); +}); + /** * @param testID * @returns diff --git a/app/client/cypress/support/dataSourceCommands.js b/app/client/cypress/support/dataSourceCommands.js index de7c760c87..4d7ba23f5f 100644 --- a/app/client/cypress/support/dataSourceCommands.js +++ b/app/client/cypress/support/dataSourceCommands.js @@ -93,7 +93,9 @@ Cypress.Commands.add( : datasourceFormData["postgres-databaseName"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["postgres-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["postgres-port"]); cy.get(datasourceEditor.databaseName).clear().type(databaseName); cy.get(datasourceEditor.username).type( datasourceFormData["postgres-username"], @@ -113,7 +115,9 @@ Cypress.Commands.add( const headerValue = "Bearer token"; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["postgres-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["postgres-port"]); cy.get(datasourceEditor.sectionAuthentication).click(); cy.get(datasourceEditor.username).type( datasourceFormData["postgres-username"], @@ -136,7 +140,9 @@ Cypress.Commands.add( : datasourceFormData["mysql-databaseName"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["mysql-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["mysql-port"]); cy.get(datasourceEditor.databaseName).clear().type(databaseName); cy.get(datasourceEditor.username).type( datasourceFormData["mysql-username"], @@ -158,7 +164,9 @@ Cypress.Commands.add( : datasourceFormData["mssql-databaseName"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["mssql-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["mssql-port"]); cy.get(datasourceEditor.databaseName).clear().type(databaseName); cy.get(datasourceEditor.username).type( datasourceFormData["mssql-username"], @@ -180,7 +188,9 @@ Cypress.Commands.add( : datasourceFormData["arango-databaseName"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["arango-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["arango-port"]); cy.get(datasourceEditor.databaseName).clear().type(databaseName); cy.get(datasourceEditor.username).type( @@ -203,7 +213,9 @@ Cypress.Commands.add( : datasourceFormData["redshift-databaseName"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["redshift-port"]); + cy.get(datasourceEditor.port) + .clear() + .type(datasourceFormData["redshift-port"]); cy.get(datasourceEditor.databaseName).clear().type(databaseName); cy.get(datasourceEditor.username).type( datasourceFormData["redshift-username"], @@ -250,7 +262,7 @@ Cypress.Commands.add( ? datasourceFormData["smtp-host"] + " " : datasourceFormData["smtp-host"]; cy.get(datasourceEditor.host).type(hostAddress); - cy.get(datasourceEditor.port).type(datasourceFormData["smtp-port"]); + cy.get(datasourceEditor.port).clear().type(datasourceFormData["smtp-port"]); cy.get(datasourceEditor.sectionAuthentication).click(); cy.get(datasourceEditor.username).type(datasourceFormData["smtp-username"]); cy.get(datasourceEditor.password).type(datasourceFormData["smtp-password"]); diff --git a/app/client/src/api/TemplatesApi.ts b/app/client/src/api/TemplatesApi.ts index bdadb44fde..d7750e89a7 100644 --- a/app/client/src/api/TemplatesApi.ts +++ b/app/client/src/api/TemplatesApi.ts @@ -22,6 +22,8 @@ export interface Template { datasources: string[]; pages: ApplicationPagePayload[]; allowPageImport: boolean; + templateGridColumnSize?: number; + templateGridRowSize?: number; } export type FetchTemplatesResponse = ApiResponse; diff --git a/app/client/src/assets/icons/templates/building-block-explorer-drop-target-arrow.svg b/app/client/src/assets/icons/templates/building-block-explorer-drop-target-arrow.svg new file mode 100644 index 0000000000..0c7860a552 --- /dev/null +++ b/app/client/src/assets/icons/templates/building-block-explorer-drop-target-arrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/app/client/src/assets/icons/templates/building-block-explorer-drop-target-icon.svg b/app/client/src/assets/icons/templates/building-block-explorer-drop-target-icon.svg new file mode 100644 index 0000000000..f88168aef6 --- /dev/null +++ b/app/client/src/assets/icons/templates/building-block-explorer-drop-target-icon.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/app/client/src/ce/AppRouter.tsx b/app/client/src/ce/AppRouter.tsx index 53b1d6525b..84ac386866 100644 --- a/app/client/src/ce/AppRouter.tsx +++ b/app/client/src/ce/AppRouter.tsx @@ -73,6 +73,7 @@ export function Routes() { const user = useSelector(getCurrentUserSelector); const tenantPermissions = useSelector(getTenantPermissions); const isFeatureEnabled = useFeatureFlag(FEATURE_FLAG.license_gac_enabled); + useFeatureFlagOverride(); return ( @@ -150,7 +151,6 @@ export default function AppRouter() { const safeCrashCode: ERROR_CODES | undefined = useSelector(getSafeCrashCode); const isConsolidatedPageLoading = useSelector(getIsConsolidatedPageLoading); const dispatch = useDispatch(); - useFeatureFlagOverride(); useEffect(() => { dispatch(initCurrentPage()); diff --git a/app/client/src/ce/api/ApplicationApi.tsx b/app/client/src/ce/api/ApplicationApi.tsx index ef1f72ce58..14eea015f5 100644 --- a/app/client/src/ce/api/ApplicationApi.tsx +++ b/app/client/src/ce/api/ApplicationApi.tsx @@ -13,6 +13,7 @@ import type { LayoutSystemTypeConfig, LayoutSystemTypes, } from "layoutSystems/types"; +import type { ActionViewMode } from "entities/Action"; export type EvaluationVersion = number; @@ -267,6 +268,11 @@ export interface ImportBuildingBlockToApplicationRequest { templateId: string; } +export interface ImportBuildingBlockToApplicationResponse { + widgetDsl: string; + onPageLoadActions: Omit[]; +} + export class ApplicationApi extends Api { static baseURL = "v1/applications"; static publishURLPath = (applicationId: string) => @@ -489,7 +495,9 @@ export class ApplicationApi extends Api { static async importBuildingBlockToApplication( request: ImportBuildingBlockToApplicationRequest, - ) { + ): Promise< + AxiosPromise> + > { return Api.post(`${ApplicationApi.baseURL}/import/partial/block`, request); } } diff --git a/app/client/src/ce/constants/ApiConstants.tsx b/app/client/src/ce/constants/ApiConstants.tsx index beae6d8383..ea6dd956af 100644 --- a/app/client/src/ce/constants/ApiConstants.tsx +++ b/app/client/src/ce/constants/ApiConstants.tsx @@ -16,7 +16,7 @@ export enum API_STATUS_CODES { export const SERVER_ERROR_CODES = { INCORRECT_BINDING_LIST_OF_WIDGET: ["AE-JSN-4001", "AE-APP-4022"], RESOURCE_NOT_FOUND: [ - "AE-SCL-4004", + "AE-ACL-4004", "AE-BAD-4000", "AE-APP-4028", "AE-APP-4013", diff --git a/app/client/src/ce/constants/ReduxActionConstants.tsx b/app/client/src/ce/constants/ReduxActionConstants.tsx index 6bd845cfce..95dafbb317 100644 --- a/app/client/src/ce/constants/ReduxActionConstants.tsx +++ b/app/client/src/ce/constants/ReduxActionConstants.tsx @@ -700,9 +700,10 @@ const ActionTypes = { RESET_TEMPLATE_FILTERS: "RESET_TEMPLATE_FILTERS", SET_TEMPLATE_SEARCH_QUERY: "SET_TEMPLATE_SEARCH_QUERY", IMPORT_TEMPLATE_TO_APPLICATION_INIT: "IMPORT_TEMPLATE_TO_APPLICATION_INIT", - DRAG_BUILDING_BLOCK_TO_CANVAS_INIT: "DRAG_BUILDING_BLOCK_TO_CANVAS_INIT", - DRAG_BUILDING_BLOCK_TO_CANVAS_SUCCESS: - "DRAG_BUILDING_BLOCK_TO_CANVAS_SUCCESS", + DRAGGING_BUILDING_BLOCK_TO_CANVAS_INIT: + "DRAGGING_BUILDING_BLOCK_TO_CANVAS_INIT", + DRAGGING_BUILDING_BLOCK_TO_CANVAS_SUCCESS: + "DRAGGING_BUILDING_BLOCK_TO_CANVAS_SUCCESS", IMPORT_STARTER_BUILDING_BLOCK_TO_APPLICATION_INIT: "IMPORT_STARTER_BUILDING_BLOCK_TO_APPLICATION_INIT", IMPORT_STARTER_TEMPLATE_TO_APPLICATION_SUCCESS: @@ -1094,6 +1095,8 @@ export const ReduxActionErrorTypes = { IMPORT_TEMPLATE_TO_WORKSPACE_ERROR: "IMPORT_TEMPLATE_TO_WORKSPACE_ERROR", IMPORT_STARTER_BUILDING_BLOCK_TO_APPLICATION_ERROR: "IMPORT_STARTER_BUILDING_BLOCK_TO_APPLICATION_ERROR", + DRAGGING_BUILDING_BLOCK_TO_CANVAS_ERROR: + "DRAGGING_BUILDING_BLOCK_TO_CANVAS_ERROR", GET_DEFAULT_PLUGINS_ERROR: "GET_DEFAULT_PLUGINS_ERROR", GET_TEMPLATE_ERROR: "GET_TEMPLATE_ERROR", GET_TEMPLATE_FILTERS_ERROR: "GET_TEMPLATE_FILTERS_ERROR", diff --git a/app/client/src/ce/constants/messages.ts b/app/client/src/ce/constants/messages.ts index 581af18cd4..16b15c884b 100644 --- a/app/client/src/ce/constants/messages.ts +++ b/app/client/src/ce/constants/messages.ts @@ -2314,6 +2314,7 @@ export const EDITOR_PANE_TEXTS = { js_create_tab_title: () => "Create JS object", queries_create_from_existing: () => "From existing datasource", queries_create_new: () => "New API", + loading_building_blocks: () => "Loading building blocks", }; export const PARTIAL_IMPORT_EXPORT = { diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index 39dac179be..f56d574e27 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -49,7 +49,6 @@ import { import { AppIconCollection, Classes, - EditableText, MenuItem as ListItem, Text, TextType, @@ -450,9 +449,6 @@ export const WorkspaceNameWrapper = styled.div<{ disabled?: boolean }>` color: ${(props) => props.theme.colors.applications.iconColor}; } `; -export const WorkspaceRename = styled(EditableText)` - padding: 0 2px; -`; export const NoSearchResultImg = styled.img` margin: 1em; diff --git a/app/client/src/ce/pages/Upgrade/ProvisioningUpgradePage.tsx b/app/client/src/ce/pages/Upgrade/ProvisioningUpgradePage.tsx index f4d5eda917..42201f84dd 100644 --- a/app/client/src/ce/pages/Upgrade/ProvisioningUpgradePage.tsx +++ b/app/client/src/ce/pages/Upgrade/ProvisioningUpgradePage.tsx @@ -22,6 +22,7 @@ export function ProvisioningUpgradePage() { logEventData: { source: "Provisioning" }, featureName: RampFeature.Provisioning, sectionName: RampSection.AdminSettings, + isEnterprise: true, }); const header: Header = { diff --git a/app/client/src/ce/reducers/index.tsx b/app/client/src/ce/reducers/index.tsx index f7d25601de..f736df31f0 100644 --- a/app/client/src/ce/reducers/index.tsx +++ b/app/client/src/ce/reducers/index.tsx @@ -80,6 +80,7 @@ import type { LayoutElementPositionsReduxState } from "layoutSystems/anvil/integ import type { ActiveField } from "reducers/uiReducers/activeFieldEditorReducer"; import type { SelectedWorkspaceReduxState } from "@appsmith/reducers/uiReducers/selectedWorkspaceReducer"; import type { ConsolidatedPageLoadState } from "reducers/uiReducers/consolidatedPageLoadReducer"; +import type { BuildingBlocksReduxState } from "reducers/uiReducers/buildingBlockReducer"; export const reducerObject = { entities: entityReducer, @@ -104,6 +105,7 @@ export interface AppState { apiPane: ApiPaneReduxState; auth: AuthState; templates: TemplatesReduxState; + buildingBlocks: BuildingBlocksReduxState; workspaces: WorkspaceReduxState; selectedWorkspace: SelectedWorkspaceReduxState; users: UsersReduxState; diff --git a/app/client/src/ce/reducers/uiReducers/index.tsx b/app/client/src/ce/reducers/uiReducers/index.tsx index d08b032fc2..5d5312798d 100644 --- a/app/client/src/ce/reducers/uiReducers/index.tsx +++ b/app/client/src/ce/reducers/uiReducers/index.tsx @@ -8,6 +8,7 @@ import datasourcePaneReducer from "reducers/uiReducers/datasourcePaneReducer"; import authReducer from "reducers/uiReducers/authReducer"; import workspaceReducer from "@appsmith/reducers/uiReducers/workspaceReducer"; import templateReducer from "reducers/uiReducers/templateReducer"; +import buildingBlockReducer from "reducers/uiReducers/buildingBlockReducer"; import usersReducer from "reducers/uiReducers/usersReducer"; import { widgetDraggingReducer } from "reducers/uiReducers/dragResizeReducer"; import importReducer from "reducers/uiReducers/importReducer"; @@ -61,6 +62,7 @@ export const uiReducerObject = { apiPane: apiPaneReducer, auth: authReducer, templates: templateReducer, + buildingBlocks: buildingBlockReducer, workspaces: workspaceReducer, selectedWorkspace: selectedWorkspaceReducer, users: usersReducer, diff --git a/app/client/src/ce/sagas/WorkspaceSagas.ts b/app/client/src/ce/sagas/WorkspaceSagas.ts index 6fd243e9e2..d1f8c7a1ed 100644 --- a/app/client/src/ce/sagas/WorkspaceSagas.ts +++ b/app/client/src/ce/sagas/WorkspaceSagas.ts @@ -264,7 +264,7 @@ export function* saveWorkspaceSaga(action: ReduxAction) { yield put({ type: ReduxActionErrorTypes.SAVE_WORKSPACE_ERROR, payload: { - error: (error as Error).message, + error, }, }); } diff --git a/app/client/src/components/editorComponents/ActionNameEditor.tsx b/app/client/src/components/editorComponents/ActionNameEditor.tsx index 6301f9980f..6339e1c797 100644 --- a/app/client/src/components/editorComponents/ActionNameEditor.tsx +++ b/app/client/src/components/editorComponents/ActionNameEditor.tsx @@ -9,7 +9,7 @@ import { removeSpecialChars } from "utils/helpers"; import type { AppState } from "@appsmith/reducers"; import { saveActionName } from "actions/pluginActionActions"; -import { Flex, Spinner } from "design-system"; +import { Flex } from "design-system"; import { getAction, getPlugin } from "@appsmith/selectors/entitiesSelector"; import NameEditorComponent, { IconBox, @@ -116,7 +116,6 @@ function ActionNameEditor(props: ActionNameEditorProps) { updating={saveStatus.isSaving} valueTransform={removeSpecialChars} /> - {saveStatus.isSaving && } )} diff --git a/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx b/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx index b111d25a7a..2200ce1a92 100644 --- a/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/generateQuickCommands.tsx @@ -9,7 +9,7 @@ import { ENTITY_TYPE } from "entities/DataTree/dataTreeFactory"; import { EntityIcon, JsFileIconV2 } from "pages/Editor/Explorer/ExplorerIcons"; import { getAssetUrl } from "@appsmith/utils/airgapHelpers"; import type { FeatureFlags } from "@appsmith/entities/FeatureFlag"; -import { Icon } from "design-system"; +import { Button, Icon } from "design-system"; import { APPSMITH_AI } from "@appsmith/components/editorComponents/GPT/trigger"; import { DatasourceCreateEntryPoints } from "constants/Datasource"; import AnalyticsUtil from "utils/AnalyticsUtil"; @@ -121,10 +121,10 @@ export function Command(props: { ); return ( -
+
{props.icon}
-
+
@@ -137,12 +137,14 @@ export function Command(props: { ) : null}
{props.url ? ( - {createMessage(EDIT)} - + ) : null}
@@ -203,7 +205,7 @@ export const generateQuickCommands = ( ? `{{${name}.}}` : `{{${name}}}`, displayText: `${name}`, - className: "CodeMirror-commands", + className: "CodeMirror-commands group relative", data: suggestion, triggerCompletionsPostPick: suggestion.type !== ENTITY_TYPE.ACTION, render: (element: HTMLElement, _: unknown, data: CommandsCompletion) => { diff --git a/app/client/src/components/editorComponents/EditableText.tsx b/app/client/src/components/editorComponents/EditableText.tsx index 7dc9b0ca43..9ca152518c 100644 --- a/app/client/src/components/editorComponents/EditableText.tsx +++ b/app/client/src/components/editorComponents/EditableText.tsx @@ -6,7 +6,7 @@ import { } from "@blueprintjs/core"; import styled from "styled-components"; import _ from "lodash"; -import { Button, toast, Tooltip } from "design-system"; +import { Button, Spinner, toast, Tooltip } from "design-system"; export enum EditInteractionKind { SINGLE, @@ -221,13 +221,8 @@ export function EditableText(props: EditableTextProps) { [valueTransform, isInvalid], ); - const showEditIcon = !( - disabled || - minimal || - hideEditIcon || - updating || - isEditing - ); + const showEditIcon = !(disabled || minimal || hideEditIcon || isEditing); + return ( - {showEditIcon && ( -