-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31156 from appsmithorg/release
15/02 daily promotion
- Loading branch information
Showing
98 changed files
with
647 additions
and
372 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
app/client/cypress/e2e/Regression/ClientSide/Anvil/AnvilWidgetClicking_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { ANVIL_EDITOR_TEST } from "../../../../support/Constants"; | ||
import { | ||
agHelper, | ||
homePage, | ||
assertHelper, | ||
anvilLayout, | ||
locators, | ||
wdsWidgets, | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
import { featureFlagIntercept } from "../../../../support/Objects/FeatureFlags"; | ||
import { WIDGET } from "../../../../locators/WidgetLocators"; | ||
|
||
describe( | ||
`${ANVIL_EDITOR_TEST}: validating Widget clicks in Anvil Layout Mode`, | ||
{ tags: ["@tag.Anvil"] }, | ||
function () { | ||
before(() => { | ||
// intercept features call for Anvil + WDS tests | ||
featureFlagIntercept({ | ||
release_anvil_enabled: true, | ||
ab_wds_enabled: true, | ||
}); | ||
// Cleanup the canvas before each test | ||
agHelper.SelectAllWidgets(); | ||
agHelper.PressDelete(); | ||
}); | ||
it("1. Click on widget to Select Widget", () => { | ||
anvilLayout.DragDropAnvilWidgetNVerify(WIDGET.WDSSWITCH, 5, 20, { | ||
skipWidgetSearch: true, | ||
}); | ||
anvilLayout.DragDropAnvilWidgetNVerify(WIDGET.WDSSWITCH, 5, 20, { | ||
skipWidgetSearch: true, | ||
dropTargetDetails: { | ||
name: "Zone1", | ||
}, | ||
}); | ||
anvilLayout.DragDropAnvilWidgetNVerify(WIDGET.WDSBUTTON, 5, 20, { | ||
skipWidgetSearch: true, | ||
dropTargetDetails: { | ||
name: "Zone1", | ||
}, | ||
}); | ||
// deselect all widgets | ||
agHelper.PressEscape(); | ||
agHelper.AssertElementLength(locators._selectedWidget, 0); | ||
agHelper.GetNClick(locators._widgetByName("Button1")); | ||
agHelper.AssertElementLength(locators._selectedWidget, 1); | ||
agHelper.GetNClick(locators._widgetByName("Switch1")); | ||
agHelper.AssertElementLength(locators._selectedWidget, 1); | ||
}); | ||
it("2. Click on widgets like Switch, Checkbox to toggle selection", () => { | ||
// deselect all widgets | ||
agHelper.PressEscape(); | ||
agHelper | ||
.GetNClick(wdsWidgets._switchWidgetTargetSelector("Switch1")) | ||
.then(() => { | ||
wdsWidgets.verifySwitchWidgetState("Switch1", "checked"); | ||
}); | ||
agHelper | ||
.GetNClick(wdsWidgets._switchWidgetTargetSelector("Switch1")) | ||
.then(() => { | ||
wdsWidgets.verifySwitchWidgetState("Switch1", "unchecked"); | ||
}); | ||
anvilLayout.DragDropAnvilWidgetNVerify(WIDGET.WDSCHECKBOX, 5, 20, { | ||
skipWidgetSearch: true, | ||
}); | ||
wdsWidgets.verifyCheckboxWidgetState("Checkbox1", "checked"); | ||
agHelper | ||
.GetNClick(wdsWidgets._checkboxWidgetTargetSelector("Checkbox1")) | ||
.then(() => { | ||
wdsWidgets.verifyCheckboxWidgetState("Checkbox1", "unchecked"); | ||
}); | ||
}); | ||
}, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { ObjectsRegistry } from "../Objects/Registry"; | ||
|
||
export class WDSWidgets { | ||
private locator = ObjectsRegistry.CommonLocators; | ||
|
||
public _switchWidgetTargetSelector = (name: string) => | ||
`${this.locator._widgetByName(name)} label`; | ||
public _checkboxWidgetTargetSelector = this._switchWidgetTargetSelector; | ||
|
||
public verifySwitchWidgetState = ( | ||
name: string, | ||
expectedState: "checked" | "unchecked", | ||
) => { | ||
const switchLabelSelector = `${this.locator._widgetByName(name)} label`; | ||
cy.get(switchLabelSelector).should( | ||
"have.attr", | ||
"data-state", | ||
expectedState, | ||
); | ||
}; | ||
public verifyCheckboxWidgetState = this.verifySwitchWidgetState; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { DataTreeEntity } from "entities/DataTree/dataTreeTypes"; | ||
import type { DataTreeEntityConfig } from "../DataTree/types"; | ||
|
||
export enum ENTITY_TYPE { | ||
ACTION = "ACTION", | ||
DATASOURCE = "DATASOURCE", | ||
WIDGET = "WIDGET", | ||
JSACTION = "JSACTION", | ||
} | ||
|
||
export enum PLATFORM_ERROR { | ||
PLUGIN_EXECUTION = "PLUGIN_EXECUTION", | ||
JS_FUNCTION_EXECUTION = "JS_FUNCTION_EXECUTION", | ||
} | ||
|
||
// export type PlatformErrorTypeValue = ValueOf<typeof PLATFORM_ERROR>; | ||
|
||
export const getModuleInstanceInvalidErrors = ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
entity: DataTreeEntity, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
entityConfig: DataTreeEntityConfig, | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
propertyPath: string, | ||
) => { | ||
return []; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/client/src/components/editorComponents/CodeEditor/codeEditorUtils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/client/src/components/editorComponents/Debugger/ActionLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
app/client/src/components/editorComponents/Debugger/DebuggerEntityLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/client/src/components/editorComponents/Debugger/WidgetLink.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/client/src/components/editorComponents/Debugger/hooks/useGetEntityInfo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "ce/entities/AppsmithConsole/utils"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.