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

Dev #3

Merged
merged 26 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6ce764c
chore: add packagePullStatus to consolidated API (#38179)
ashit-rath Dec 17, 2024
d905a4c
fix: Updated fix for embedSettings spec (#38195)
sagar-qa007 Dec 17, 2024
979acc9
chore: added status changes (#38170)
sondermanish Dec 17, 2024
7a24e93
chore: git mod - settings modal (#38155)
brayn003 Dec 17, 2024
3f9b139
chore: reference lifecycle (#38174)
sondermanish Dec 17, 2024
8415e16
chore: Fix chrome version to 129 (#38183)
sagar-qa007 Dec 17, 2024
5d213dd
chore: Split derived.test.js to separate files. (#38162)
rahulbarwal Dec 17, 2024
a3c5547
chore: added comment to avoid merge conflicts (#38211)
NilanshBansal Dec 17, 2024
35a5d83
chore: pr for delete references (#38210)
sondermanish Dec 17, 2024
495f139
chore: Moving navigation header to Explorer templates in ADS (#38131)
ankitakinger Dec 18, 2024
774c8ca
test: CGS discard tests (#38206)
nidhi-nair Dec 18, 2024
836b544
chore: refactor datasource storage to use custom repo method (#38143)
AnaghHegde Dec 18, 2024
fa96b4a
test: Added a new test case for 33601 (#38234)
sagar-qa007 Dec 19, 2024
620a3ad
chore: remove metrics in fe (#38240)
dvj1988 Dec 19, 2024
80f4739
test: commenting dependent test which was missed in RestApiOAuth2Vali…
NandanAnantharamu Dec 19, 2024
7d87c55
chore: refactor the crud method to custom repo class (#38138)
AnaghHegde Dec 19, 2024
7a7f37c
chore: fix menu widget bugs (#38226)
jsartisan Dec 19, 2024
65b98c6
chore: Allow currency and phone dial code change (#38141)
jsartisan Dec 19, 2024
8ec314f
fix: Wrong pageId used for segment navigation (#38247)
hetunandu Dec 19, 2024
ad810c0
chore: add custom consistent-storybook-title rule (#38241)
KelvinOm Dec 19, 2024
68264f1
chore: extract search and add to ads (#38192)
alex-golovanov Dec 19, 2024
d9b1729
chore: refactor crud methods (#38158)
AnaghHegde Dec 19, 2024
9b8497e
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
hajrezvan Dec 19, 2024
9705048
fix: Enhance SelectWidget label and value handling logic (#38254)
rahulbarwal Dec 19, 2024
6fc2c9a
Merge branch 'appsmithorg:release' into dev
hajrezvan Dec 19, 2024
1a56a28
Merge remote-tracking branch 'origin/release' into dev
hajrezvan Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci-test-custom-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,14 @@ jobs:
chmod a+x ./cypress/setup-test-ci.sh
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
- name: Install Google Chrome 129.0.6668.100
run: |
sudo apt-get remove google-chrome-stable
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
google-chrome --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci-test-limited-with-count.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,14 @@ jobs:
chmod a+x ./cypress/setup-test-ci.sh
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
- name: Install Google Chrome 129.0.6668.100
run: |
sudo apt-get remove google-chrome-stable
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
google-chrome --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down Expand Up @@ -348,7 +351,8 @@ jobs:
cd app/client
npx cypress-repeat-pro run -n ${{ inputs.run_count }} --force \
--spec ${{ env.specs_to_run }} \
--config-file "cypress_ci_custom.config.ts"
--config-file "cypress_ci_custom.config.ts" \
--browser ${{ env.BROWSER_PATH }}
cat cy-repeat-summary.txt
# Define the path for the failure flag file
FAILURE_FLAG_FILE="ci_test_status.txt"
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci-test-limited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,15 @@ jobs:
cd app/client
chmod a+x ./cypress/setup-test-ci.sh
./cypress/setup-test-ci.sh

- uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV

- name: Install Google Chrome 129.0.6668.100
run: |
sudo apt-get remove google-chrome-stable
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_129.0.6668.100-1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./google-chrome-stable_129.0.6668.100-1_amd64.deb
echo "BROWSER_PATH=$(which google-chrome)" >> $GITHUB_ENV
google-chrome --version

- name: Save Git values
# pass env variables from this step to other steps
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import {
agHelper,
appSettings,
assertHelper,
deployMode,
homePage,
locators,
} from "../../../../support/Objects/ObjectsCore";
import EditorNavigation, {
EntityType,
PageLeftPane,
} from "../../../../support/Pages/EditorNavigation";

describe(
"Bug:33601: resetWidget function causes the next async method to be undefined",
{ tags: ["@tag.JS"] },
() => {
it("1. Bug 33601", () => {
homePage.NavigateToHome();
homePage.ImportApp("resetWidgetBug33601.json");
EditorNavigation.SelectEntityByName("List1", EntityType.Widget);
PageLeftPane.expandCollapseItem("List1");
PageLeftPane.expandCollapseItem("Container1");
EditorNavigation.SelectEntityByName("Input1", EntityType.Widget);

agHelper.EnterInputText("Label", "Widget Input2");
EditorNavigation.SelectEntityByName("Button1", EntityType.Widget);
cy.get(locators._widgetInputSelector("inputwidgetv2"))
.first()
.invoke("attr", "value")
.should("contain", "Widget Input2");
agHelper
.GetAttribute(locators._imgWidgetInsideList, "src")
.then((labelValue) => {
expect(labelValue).not.to.contain("data:image/png;base64");
});

agHelper.ClickButton("Submit");
cy.get(locators._widgetInputSelector("inputwidgetv2"))
.first()
.invoke("attr", "value")
.should("be.empty");
assertHelper.WaitForNetworkCall("@postExecute");
agHelper
.GetAttribute(locators._imgWidgetInsideList, "src")
.then((labelValue) => {
expect(labelValue).to.contain("data:image/png;base64");
});

deployMode.DeployApp();
agHelper.AssertElementVisibility(appSettings.locators._header);
agHelper.EnterInputText("Label", "Widget Input2");
cy.get(locators._widgetInputSelector("inputwidgetv2"))
.first()
.invoke("attr", "value")
.should("contain", "Widget Input2");
agHelper
.GetAttribute(locators._imgWidgetInsideList, "src")
.then((labelValue) => {
expect(labelValue).not.to.contain("data:image/png;base64");
});
agHelper.ClickButton("Submit");
cy.get(locators._widgetInputSelector("inputwidgetv2"))
.first()
.invoke("attr", "value")
.should("be.empty");
agHelper
.GetAttribute(locators._imgWidgetInsideList, "src")
.then((labelValue) => {
expect(labelValue).to.contain("data:image/png;base64");
});
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ describe("Embed settings options", { tags: ["@tag.Settings"] }, function () {
.click()
.wait(1000);
_.agHelper.ClickButton("Copy application url");
cy.window()
.its("navigator.clipboard")
.invoke("readText")
.then((text) => {
cy.wrap(text).as("deployUrl");
});
cy.window().then((win) => {
cy.stub(win.navigator.clipboard, "writeText").as("deployUrl").resolves();
});
cy.enablePublicAccess();
cy.wait(8000); //adding wait time for iframe to load fully!
_.agHelper.RefreshPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
dataManager,
} from "../../../support/Objects/ObjectsCore";

describe(
describe.skip(
"Datasource form OAuth2 client credentials related tests",
{
tags: ["@tag.Datasource", "@tag.Sanity", "@tag.Git", "@tag.AccessControl"],
Expand Down Expand Up @@ -42,7 +42,7 @@ describe(
});
});

it("2. Validate save and Authorise", function () {
it.skip("2. Validate save and Authorise", function () {
agHelper.GetNClick(dataSources._saveDs);

//Accept consent
Expand Down
1 change: 1 addition & 0 deletions app/client/cypress/fixtures/resetWidgetBug33601.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/client/cypress/support/Objects/CommonLocators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class CommonLocators {
_anvilDnDHighlight = "[data-type=anvil-dnd-highlight]";
_editPage = "[data-testid=onboarding-tasks-datasource-text], .t--drop-target";
_crossBtn = "span.cancel-icon";
_createNew = ".t--add-item";
_createNew = "[data-testid='t--add-item']";
_uploadFiles = "div.uppy-Dashboard-AddFiles input";
_uploadBtn = "button.uppy-StatusBar-actionBtn--upload";
_errorTab = "[data-testid=t--tab-ERROR_TAB]";
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/support/Pages/IDE/ListView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class ListView {
public locators = {
list: "[data-testid='t--ide-list']",
listItem: "[data-testid='t--ide-list-item']",
addItem: "button.t--add-item",
addItem: "[data-testid='t--add-item']",
};

public assertListVisibility() {
Expand Down
11 changes: 6 additions & 5 deletions app/client/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@ module.exports = {
before: [
{
path: "node_modules/ts-jest-mock-import-meta",
options: { metaObjectReplacement: { url: "https://www.url.com" } },
options: {
metaObjectReplacement: { url: "https://www.url.com" },
},
},
],
},
}
},
],
},
testEnvironment: "jsdom",
testTimeout: 9000,
setupFilesAfterEnv: ["<rootDir>/test/setup.ts"],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(tsx|ts|js)?$",
testRegex: "\\.(test|spec)\\.(tsx|ts|js)?$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node", "css"],
moduleDirectories: ["node_modules", "src", "test"],
transformIgnorePatterns: [
Expand Down Expand Up @@ -68,8 +70,7 @@ module.exports = {
"<rootDir>/node_modules/@blueprintjs/select/lib/esnext",
"@appsmith/ads": "<rootDir>/node_modules/@appsmith/ads",
"^canvas$": "jest-canvas-mock",
"^entities/(.*)$": "<rootDir>/src/entities/$1", // Match 'entities/*'

"^entities/(.*)$": "<rootDir>/src/entities/$1", // Match 'entities/*'
},
globals: {
APPSMITH_FEATURE_CONFIGS: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { NumberInputProps } from "./NumberInput.types";
import type { StoryObj } from "@storybook/react";

export default {
title: "ADS/Components/Input/NumberInput",
title: "ADS/Components/Input/Number Input",
component: NumberInput,
decorators: [
(Story: () => React.ReactNode) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { SearchInputProps } from "./SearchInput.types";
import type { StoryObj } from "@storybook/react";

export default {
title: "ADS/Components/Input/SearchInput",
title: "ADS/Components/Input/Search Input",
component: SearchInput,
decorators: [
(Story: () => React.ReactNode) => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export const StyledControlContainer = styled.div`
cursor: pointer;
height: 100%;

&[data-selected="false"]:hover {
background-color: var(--ads-v2-color-bg-muted);
}

&:focus-visible {
outline: var(--ads-v2-border-width-outline) solid
var(--ads-v2-color-outline);
Expand All @@ -77,7 +81,7 @@ export const StyledControlContainer = styled.div`

/* Select all segments which is not a selected and last child */
/* seperator */
&:not(:last-child):not([data-selected="true"]):not(
&:not(:hover):not(:last-child):not([data-selected="true"]):not(
:has(+ [data-selected="true"])
):after {
content: "";
Expand All @@ -87,15 +91,4 @@ export const StyledControlContainer = styled.div`
height: 16px;
background-color: var(--ads-v2-colors-control-field-default-border);
}

/* This before is to mask the separator in left side of selected control */
/* Mask the seperator with track background color */
&[data-selected="true"]:not(:first-child):after {
content: "";
position: absolute;
left: -7px;
width: 2px;
height: 16px;
background-color: var(--ads-v2-colors-control-track-default-bg);
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Canvas, Meta } from "@storybook/blocks";

import * as EditorSegmentsStories from "./EditorSegments.stories";

<Meta of={EditorSegmentsStories} />

# Editor Segments

Editor Segments is is built on top of the ADS component - Segmented Control. It is a preset template built for Entity Explorer which has a `max-width of 247px` and has extra padding around each of the segments.

Editor Segments present a range of options, and should be used when the user can execute those options instantaneously. It can also accept `children` to add more UI controls, if needed. These will be placed on the right side of the segments. It takes `options`, `selectedSegment` and `onSegmentChange` props to handle the value and onChange functionalities of Segmented Control component.

The options presented should not be binary. If you have a `yes | no` scenario, use a switch, instead.

## Anatomy

### Default implementation

Note: The `options` needs to be passed as required, the UI shown below are not default values being provided to the Editor segments. It also means the `selectedSegment` and `onSegmentChange` props needs to be passed as well.

<Canvas of={EditorSegmentsStories.EditorSegmentsStory} />

### More UI controls

<Canvas of={EditorSegmentsStories.EditorSegmentsStoryWithChildren} />
Loading
Loading