From e878088bbd9447e246af6766a87a2206b8d6850b Mon Sep 17 00:00:00 2001 From: Arpit Mohan Date: Wed, 12 Feb 2025 16:04:10 +0530 Subject: [PATCH 1/4] chore: Updating mysql test dependencies in pom.xml (#39146) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > [!TIP] > _Add a TL;DR when the description is longer than 500 words or extremely technical (helps the content, marketing, and DevRel team)._ > > _Please also include relevant motivation and context. List any dependencies that are required for this change. Add links to Notion, Figma or any other documents that might be relevant to the PR._ Fixes Dependabot alert. > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /test sanity ### :mag: Cypress test results > [!IMPORTANT] > 🟣 🟣 🟣 Your tests are running. > Tests running at: > Commit: 8d7776053f692e42e52ffc037f45df3063d06d1c > Workflow: `PR Automation test suite` > Tags: `@tag.Sanity` > Spec: `` >
Mon, 10 Feb 2025 07:56:09 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No ## Summary by CodeRabbit - **Chores** - Updated the backend database connector to a newer version, enhancing stability and compatibility during testing. This internal improvement supports smoother operations and sets the stage for future reliability enhancements, though no direct user interface changes have been introduced. --- app/server/appsmith-plugins/mysqlPlugin/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/server/appsmith-plugins/mysqlPlugin/pom.xml b/app/server/appsmith-plugins/mysqlPlugin/pom.xml index e82732a17c8d..d0c86cde0a6e 100644 --- a/app/server/appsmith-plugins/mysqlPlugin/pom.xml +++ b/app/server/appsmith-plugins/mysqlPlugin/pom.xml @@ -86,9 +86,9 @@ - mysql - mysql-connector-java - 8.0.28 + com.mysql + mysql-connector-j + 9.2.0 test From be3809ff7e5ed8a1f97f0423d77a3f330998f302 Mon Sep 17 00:00:00 2001 From: sneha122 Date: Wed, 12 Feb 2025 18:23:57 +0530 Subject: [PATCH 2/4] fix: enable allow clear options for single select dropdown (#39213) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This PR enables allow clear option for single select dropdowns in the UQI. Fixes #39087 _or_ Fixes `Issue URL` > [!WARNING] > _If no issue exists, please create an issue first, and check with the maintainers if the issue is valid._ ## Automation /ok-to-test tags="@tag.Datasource" ### :mag: Cypress test results > [!TIP] > 🟒 🟒 🟒 All cypress tests have passed! πŸŽ‰ πŸŽ‰ πŸŽ‰ > Workflow run: > Commit: 36b6c9419e92d1fb3915f039d922b3211e89fc8a > Cypress dashboard. > Tags: `@tag.Datasource` > Spec: >
Wed, 12 Feb 2025 12:41:11 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Enhanced the dropdown control to allow users to clear their selection even in single-select mode, offering greater flexibility in interaction. - **Tests** - Expanded test coverage with new tests ensuring that the clear selection feature works correctly in single-select scenarios. Co-authored-by: β€œsneha122” <β€œsneha@appsmith.com”> --- .../formControls/DropDownControl.test.tsx | 74 +++++++++++++++++++ .../formControls/DropDownControl.tsx | 5 +- 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/app/client/src/components/formControls/DropDownControl.test.tsx b/app/client/src/components/formControls/DropDownControl.test.tsx index 8eb31760a523..c8c5f0b13029 100644 --- a/app/client/src/components/formControls/DropDownControl.test.tsx +++ b/app/client/src/components/formControls/DropDownControl.test.tsx @@ -220,3 +220,77 @@ describe("DropDownControl grouping tests", () => { expect(screen.getByText("Option 2")).toBeInTheDocument(); }); }); + +describe("DropdownControl Single select tests", () => { + // TODO: Fix this the next time the file is edited + // eslint-disable-next-line @typescript-eslint/no-explicit-any + let store: any; + + const initialValuesSingleSelect = { + actionConfiguration: { + testPath: "option1", + }, + }; + + const mockActionSingleSelect = { + type: "API_ACTION", + name: "Test API Action", + datasource: { + id: "datasource1", + name: "Datasource 1", + }, + actionConfiguration: { + body: "", + headers: [], + testPath: "option1", + }, + }; + + const dropDownPropsSingleSelect = { + options: mockOptions, + placeholderText: "Select Columns", + configProperty: "actionConfiguration.testPath", + controlType: "PROJECTION", + propertyValue: "", + label: "Columns", + id: "column", + formName: "", + isValid: true, + formValues: mockActionSingleSelect, + isLoading: false, + maxTagCount: 3, + isAllowClear: true, + }; + + beforeEach(() => { + store = mockStore({ + form: { + TestForm: { + values: initialValuesSingleSelect, + }, + }, + appState: {}, + }); + }); + it("should clear selected option", async () => { + render( + + + + + , + ); + + const clearAllButton = document.querySelector(".rc-select-clear"); + + expect(clearAllButton).toBeInTheDocument(); + + fireEvent.click(clearAllButton!); + + await waitFor(() => { + const options = screen.queryAllByText(/Option.../); + + expect(options.length).toBe(0); + }); + }); +}); diff --git a/app/client/src/components/formControls/DropDownControl.tsx b/app/client/src/components/formControls/DropDownControl.tsx index fa3e8a999556..4d0ba27fd8f8 100644 --- a/app/client/src/components/formControls/DropDownControl.tsx +++ b/app/client/src/components/formControls/DropDownControl.tsx @@ -304,7 +304,9 @@ function renderDropdown( return (