Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20/02 Daily promotion #39380

Merged
merged 35 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cd519bb
fix: Fix from for promise failure (#39295)
sagar-qa007 Feb 17, 2025
22688f9
chore: AppIDE Folder Structure (#39165)
hetunandu Feb 17, 2025
5b9153c
feat: Implement infra code for infinite scroll implementation. (#39225)
rahulbarwal Feb 17, 2025
c0e073e
fix: infinite render loop in List Widget when hiding/unhiding with se…
jacquesikot Feb 17, 2025
e40564d
feat: add function calling config form (#39252)
znamenskii-ilia Feb 17, 2025
19cd1ec
fix: omit assignRequest (#39319)
znamenskii-ilia Feb 17, 2025
b910304
fix: fix enum (#39320)
znamenskii-ilia Feb 17, 2025
07187a7
fix: fix enum (#39321)
znamenskii-ilia Feb 17, 2025
f30ef2e
chore: Removed immur dependancy (#39324)
sagar-qa007 Feb 18, 2025
e4ed590
chore: Code split for logout success handler (#39296)
abhvsn Feb 18, 2025
d921110
chore: add postSaveHook (#39306)
nsarupr Feb 18, 2025
dc923c9
chore: add wds multiselect component (#39300)
jsartisan Feb 18, 2025
88d3599
chore: Split canvas widget reducers (#39327)
ashit-rath Feb 18, 2025
242840d
chore: git pkg - mod fixes (#39255)
brayn003 Feb 18, 2025
95e8e37
fix: UQI dropdown search issue fixed (#39330)
sneha122 Feb 18, 2025
f05e3be
fix: file upload fixed when using Base64 type in FilePicker and multi…
NilanshBansal Feb 18, 2025
e4d5a52
Updated Label Config
Nikhil-Nandagopal Feb 18, 2025
6beeb25
chore: Migrate Tenant to Organization (#38891)
trishaanand Feb 18, 2025
7b61634
chore: Cleanup unnecessary script (#39346)
trishaanand Feb 18, 2025
af6540f
fix: cypress test for multipart/form-data (#39356)
NilanshBansal Feb 19, 2025
a74c108
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
a3f9320
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
aac6948
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
52139da
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
016e566
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
6051043
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
64aa3d2
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
1739ae5
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
c11a5cc
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
9a16ee3
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
084ba0f
Updated Label Config
Nikhil-Nandagopal Feb 19, 2025
8d4f616
chore: git pkg - package integration with git (#39342)
brayn003 Feb 19, 2025
0fdac20
feat: added an ads entity context menu template component (#39358)
alex-golovanov Feb 20, 2025
9728e8b
chore: allow tags for few metrics (#39359)
ApekshaBhosale Feb 20, 2025
6dfbfe2
chore: Fix appsmith store hydration from localstorage in view mode (#…
ashit-rath Feb 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/config.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ app/client/yalc.lock
.idea
.fleet/*
app/client/.fleet/*
.lens

# Observability related local storage
utils/observability/tempo-data/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ describe("Branding", { tags: ["@tag.Settings"] }, () => {
let favicon;
let shades = {};

it("1. check if localStorage is populated with tenantConfig values", () => {
it("1. check if localStorage is populated with organizationConfig values", () => {
if (CURRENT_REPO === REPO.CE) {
const tenantConfig = localStorage.getItem("tenantConfig");
const organizationConfig = localStorage.getItem("organizationConfig");

expect(tenantConfig).to.be.null;
expect(organizationConfig).to.be.null;
}

if (CURRENT_REPO === REPO.EE) {
const tenantConfig = localStorage.getItem("tenantConfig");
const organizationConfig = localStorage.getItem("organizationConfig");

expect(tenantConfig).to.not.be.null;
expect(organizationConfig).to.not.be.null;
}
});

Expand Down Expand Up @@ -123,10 +123,10 @@ describe("Branding", { tags: ["@tag.Settings"] }, () => {
);
});

it("4. Check if localStorage is populated with tenantConfig values & form cannot be submitted", () => {
it("4. Check if localStorage is populated with organizationConfig values & form cannot be submitted", () => {
if (CURRENT_REPO === REPO.CE) {
const tenantConfig = localStorage.getItem("tenantConfig");
expect(tenantConfig).to.be.null;
const organizationConfig = localStorage.getItem("organizationConfig");
expect(organizationConfig).to.be.null;
cy.get(locators.submitButton).should("be.disabled");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,19 @@ describe("Slug URLs", { tags: ["@tag.AppUrl"] }, () => {

it("4. Checks redirect url", () => {
cy.url().then((url) => {
homePage.Signout(true);
const redirectUrl = `${url}?embed=true&a=b`;
cy.stub(agHelper, "VisitNAssert").as("visitStub");

// Call your function that handles redirection
agHelper.VisitNAssert(redirectUrl);
agHelper.AssertURL(`?redirectUrl=${encodeURIComponent(redirectUrl)}`);

// Assert that the stubbed function was called with the correct redirectUrl
cy.get("@visitStub").should("have.been.calledWith", redirectUrl);
cy.wrap(redirectUrl).then((redirectUrl) => {
const encodedRedirectUrl = `?redirectUrl=${encodeURIComponent(redirectUrl)}`;
cy.log(encodedRedirectUrl);
agHelper.AssertURL(encodedRedirectUrl);
});
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@ describe(
agHelper.Sleep(1000);
propPane.SelectColorFromColorPicker("iconcolor", -15);
agHelper.AssertCSS(
widgetLocators.recorderComplete,
widgetLocators.recorderPrompt,
"background-color",
"rgb(255, 193, 61)",
);
propPane.EnterJSContext("Box shadow", "Small");
agHelper
.GetElement(widgetLocators.recorderComplete)
.GetElement(widgetLocators.recorderPrompt)
.should("have.css", "box-shadow")
.and("not.eq", "none");
propPane.EnterJSContext("Border radius", "none");
agHelper.AssertCSS(
widgetLocators.recorderComplete,
widgetLocators.recorderPrompt,
"border-radius",
"3px",
0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,58 @@ describe(
deployMode.NavigateBacktoEditor();
});

it("2. Toggle JS - Validate isVisible", function () {
it("2. Validate isVisible when list has selected item (#37683)", () => {
// Define selectors for widgets
const widgetSelector = (name: string) => `[data-widgetname-cy="${name}"]`;
const containerWidgetSelector = `[type="CONTAINER_WIDGET"]`;

// Drag and drop the Button widget onto the canvas
// entityExplorer.DragDropWidgetNVerify("listwidgetv2", 300, 300);
entityExplorer.DragDropWidgetNVerify("buttonwidget");

// Set up the button to make the list visible when clicked
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
propPane.EnterJSContext("onClick", `{{List1.setVisibility(true)}}`, true);

// Set up the list widget to become invisible when an item is clicked
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.EnterJSContext(
"onItemClick",
`{{List1.setVisibility(false)}}`,
true,
);

// Deploy the application to test the visibility functionality
deployMode.DeployApp();

// Simulate a click on the first item in the list to hide the list
agHelper
.GetElement(widgetSelector("List1"))
.find(containerWidgetSelector)
.first()
.click({ force: true });
agHelper.WaitUntilEleDisappear(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
);

// Assert that the list widget is not visible after clicking an item
agHelper.AssertElementAbsence(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
);

// Click the button to make the list visible again
agHelper.GetNClick(widgetSelector("Button1"));

// Assert that the list widget is visible after clicking the button
agHelper.AssertElementVisibility(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
);

// Navigate back to the editor after testing
deployMode.NavigateBacktoEditor();
});

it("3. Toggle JS - Validate isVisible", function () {
// Open Property pane
agHelper.AssertElementVisibility(
locators._widgetInDeployed(draggableWidgets.LIST_V2),
Expand All @@ -61,7 +112,7 @@ describe(
deployMode.NavigateBacktoEditor();
});

it("3. Renaming the widget from Property pane and Entity explorer ", function () {
it("4. Renaming the widget from Property pane and Entity explorer ", function () {
// Open Property pane
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
// Change the list widget name from property pane and Verify it
Expand All @@ -73,7 +124,7 @@ describe(
agHelper.AssertElementVisibility(locators._widgetName("List1"));
});

it("4. Item Spacing Validation ", function () {
it("5. Item Spacing Validation ", function () {
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
propPane.Search("item spacing");
propPane.UpdatePropertyFieldValue("Item Spacing (px)", "-1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import EditorNavigation, {
AppSidebarButton,
AppSidebar,
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";

describe(
"Validate API request body panel",
Expand Down Expand Up @@ -99,6 +100,7 @@ describe(
});

it("7. Checks MultiPart form data for a File Type upload + Bug 12476", () => {
PageList.AddNewPage();
const imageNameToUpload = "ConcreteHouse.jpg";
agHelper.AddDsl("multiPartFormDataDsl");

Expand All @@ -111,7 +113,7 @@ describe(
apiPage.EnterBodyFormData(
"MULTIPART_FORM_DATA",
"file",
"{{FilePicker1.files[0]}}",
"{{FilePicker1.files[0].data}}",
"File",
);

Expand Down Expand Up @@ -141,7 +143,7 @@ describe(
EditorNavigation.SelectEntityByName("MultipartAPI", EntityType.Api);

apiPage.ToggleOnPageLoadRun(false); //Bug 12476
EditorNavigation.SelectEntityByName("Page1", EntityType.Page);
EditorNavigation.SelectEntityByName("Page2", EntityType.Page);
deployMode.DeployApp(locators._buttonByText("Select Files"));
agHelper.ClickButton("Select Files");
agHelper.UploadFile(imageNameToUpload);
Expand Down
34 changes: 16 additions & 18 deletions app/client/cypress/support/Objects/FeatureFlags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { LICENSE_FEATURE_FLAGS } from "../Constants";
import { ObjectsRegistry } from "./Registry";
import produce from "immer";

const defaultFlags = {
rollout_remove_feature_walkthrough_enabled: false, // remove this flag from here when it's removed from code
Expand Down Expand Up @@ -40,12 +39,13 @@ export const getConsolidatedDataApi = (
res.statusCode === 500
) {
const originalResponse = res?.body;
const updatedResponse = produce(originalResponse, (draft: any) => {
draft.data.featureFlags.data = {
...flags,
};
});
return res.send(updatedResponse);
try {
const updatedResponse = JSON.parse(JSON.stringify(originalResponse));
updatedResponse.data.featureFlags.data = { ...flags };
return res.send(updatedResponse);
} catch (e) {
cy.log(`vamsi error `, e);
}
}
});
}).as("getConsolidatedData");
Expand Down Expand Up @@ -90,18 +90,16 @@ export const featureFlagInterceptForLicenseFlags = () => {
delete req.headers["if-none-match"];
if (res.statusCode === 200) {
const originalResponse = res?.body;
const updatedResponse = produce(originalResponse, (draft: any) => {
draft.data.featureFlags.data = {};
Object.keys(originalResponse.data.featureFlags.data).forEach(
(flag) => {
if (LICENSE_FEATURE_FLAGS.includes(flag)) {
draft.data.featureFlags.data[flag] =
originalResponse.data.featureFlags.data[flag];
}
},
);
draft.data.featureFlags.data["release_app_sidebar_enabled"] = true;
const updatedResponse = JSON.parse(JSON.stringify(originalResponse));
updatedResponse.data.featureFlags.data = {};
Object.keys(originalResponse.data.featureFlags.data).forEach((flag) => {
if (LICENSE_FEATURE_FLAGS.includes(flag)) {
updatedResponse.data.featureFlags.data[flag] =
originalResponse.data.featureFlags.data[flag];
}
});
updatedResponse.data.featureFlags.data["release_app_sidebar_enabled"] =
true;
return res.send(updatedResponse);
}
});
Expand Down
6 changes: 1 addition & 5 deletions app/client/cypress/support/Pages/HomePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,8 @@ export class HomePage {

//Maps to LogOut in command.js
public LogOutviaAPI() {
let httpMethod = "POST";
if (CURRENT_REPO === REPO.EE) {
httpMethod = "GET";
}
cy.request({
method: httpMethod,
method: "POST",
url: "/api/v1/logout",
headers: {
"X-Requested-By": "Appsmith",
Expand Down
10 changes: 2 additions & 8 deletions app/client/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ Cypress.Commands.add("LogOut", (toCheckgetPluginForm = true) => {

// Logout is a POST request in CE
let httpMethod = "POST";
if (CURRENT_REPO === REPO.EE) {
httpMethod = "GET";
}

if (CURRENT_REPO === REPO.CE)
toCheckgetPluginForm &&
Expand Down Expand Up @@ -582,11 +579,8 @@ Cypress.Commands.add("startServerAndRoutes", () => {
cy.intercept("GET", "/api/v1/users/profile").as("getUser");
cy.intercept("GET", "/api/v1/plugins?workspaceId=*").as("getPlugins");

if (CURRENT_REPO === REPO.CE) {
cy.intercept("POST", "/api/v1/logout").as("postLogout");
} else if (CURRENT_REPO === REPO.EE) {
cy.intercept("GET", "/api/v1/logout").as("postLogout");
}
cy.intercept("POST", "/api/v1/logout").as("postLogout");

cy.intercept("GET", "/api/v1/datasources?workspaceId=*").as("getDataSources");
cy.intercept("GET", "/api/v1/pages?*mode=EDIT").as("getPagesForCreateApp");
cy.intercept("GET", "/api/v1/pages?*mode=PUBLISHED").as("getPagesForViewApp");
Expand Down
2 changes: 2 additions & 0 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"@types/d3-geo": "^3.1.0",
"@types/google.maps": "^3.51.0",
"@types/react-page-visibility": "^6.4.1",
"@types/react-window-infinite-loader": "^1.0.9",
"@types/web": "^0.0.99",
"@uppy/core": "^1.16.0",
"@uppy/dashboard": "^1.16.0",
Expand Down Expand Up @@ -203,6 +204,7 @@
"react-virtuoso": "^4.5.0",
"react-webcam": "^7.0.1",
"react-window": "^1.8.6",
"react-window-infinite-loader": "^1.0.10",
"react-zoom-pan-pinch": "^1.6.1",
"redux": "^4.0.1",
"redux-form": "^8.2.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* eslint-disable no-console */
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";

import { MenuItem } from "../../Menu";
import { EntityContextMenu } from "./EntityContextMenu";

const meta: Meta<typeof EntityContextMenu> = {
title: "ADS/Templates/Entity Context Menu",
component: EntityContextMenu,
};

export default meta;

type Story = StoryObj<typeof EntityContextMenu>;

export const Basic: Story = {
args: {
tooltipContent: "More actions",
children: (
<>
<MenuItem onClick={console.log} startIcon="edit-line">
Rename
</MenuItem>
<MenuItem onClick={console.log} startIcon="copy-control">
Copy
</MenuItem>
<MenuItem onClick={console.log} startIcon="delete">
Delete
</MenuItem>
</>
),
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from "styled-components";

import { MenuContent as ADSMenuContent } from "../../Menu";

export const MenuContent = styled(ADSMenuContent)`
width: 220px;
max-height: unset;
`;

export const ButtonContainer = styled.div`
position: relative;
`;
Loading
Loading