Skip to content

Commit

Permalink
Merge pull request #1373 from appsmithorg/release
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanarpit authored Oct 23, 2020
2 parents b88758c + c6d4902 commit f96f45d
Show file tree
Hide file tree
Showing 134 changed files with 6,432 additions and 2,376 deletions.
15 changes: 8 additions & 7 deletions app/client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
module.exports = {
parser: '@typescript-eslint/parser',
parser: "@typescript-eslint/parser",
plugins: ["react", "@typescript-eslint", "prettier", "react-hooks"],
extends: [
"plugin:react/recommended", // Uses the recommended rules from @eslint-plugin-react
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
ecmaFeatures: {
jsx: true // Allows for the parsing of JSX
}
jsx: true, // Allows for the parsing of JSX
},
},
rules: {
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"react-hooks/rules-of-hooks": "error",
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-var-requires": 0,
"import/no-webpack-loader-syntax": 0
},
settings: {
react: {
pragma: "React",
version: "detect" // Tells eslint-plugin-react to automatically detect the version of React to use
}
}
version: "detect", // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
};
4 changes: 2 additions & 2 deletions app/client/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

GIT_SHA=$(eval git rev-parse HEAD)
echo $GIT_SHA
REACT_APP_SENTRY_RELEASE=$GIT_SHA craco --max-old-space-size=4096 build --config craco.build.config.js
REACT_APP_SENTRY_RELEASE=$GIT_SHA EXTEND_ESLINT=true craco --max-old-space-size=4096 build --config craco.build.config.js

rm ./build/static/js/*.js.map
echo "build finished"
echo "build finished"
8 changes: 6 additions & 2 deletions app/client/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"json": false
},
"viewportHeight": 900,
"viewportWidth": 1400
}
"viewportWidth": 1400,
"retries": {
"runMode": 2,
"openMode": 0
}
}
62 changes: 62 additions & 0 deletions app/client/cypress/fixtures/SimpleBinding.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"dsl": {
"widgetName": "MainContainer",
"backgroundColor": "none",
"rightColumn": 1224,
"snapColumns": 16,
"detachFromLayout": true,
"widgetId": "0",
"topRow": 0,
"bottomRow": 1280,
"containerStyle": "none",
"snapRows": 33,
"parentRowSpace": 1,
"type": "CANVAS_WIDGET",
"canExtend": true,
"dynamicBindings": {},
"version": 6,
"minHeight": 1292,
"parentColumnSpace": 1,
"leftColumn": 0,
"children": [
{
"isVisible": true,
"text": "Label",
"textStyle": "LABEL",
"textAlign": "LEFT",
"widgetName": "Text1",
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 3,
"rightColumn": 7,
"topRow": 4,
"bottomRow": 5,
"parentId": "0",
"widgetId": "pcznwg0g8k"
},
{
"isVisible": true,
"text": "{{Text1.text}}",
"textStyle": "LABEL",
"textAlign": "LEFT",
"widgetName": "Text2",
"type": "TEXT_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
"parentRowSpace": 40,
"leftColumn": 3,
"rightColumn": 7,
"topRow": 6,
"bottomRow": 7,
"parentId": "0",
"widgetId": "tgnz7xg7a3",
"dynamicBindings": {
"text": true
}
}
]
},
"layoutOnLoadActions": []
}
125 changes: 1 addition & 124 deletions app/client/cypress/fixtures/formWidgetdsl.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,59 +81,6 @@
"widgetId": "xlrmeiioaa"
}
],
"blueprint": {
"view": [
{
"type": "TEXT_WIDGET",
"size": {
"rows": 1,
"cols": 12
},
"position": {
"top": 0,
"left": 0
},
"props": {
"text": "Form",
"textStyle": "HEADING"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
},
"position": {
"top": 11,
"left": 12
},
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
}
},
{
"type": "FORM_BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
},
"position": {
"top": 11,
"left": 8
},
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
}
}
]
},
"minHeight": 520,
"type": "CANVAS_WIDGET",
"isLoading": false,
Expand All @@ -147,76 +94,6 @@
"widgetId": "sidaue1kdu"
}
],
"blueprint": {
"view": [
{
"type": "CANVAS_WIDGET",
"position": {
"top": 0,
"left": 0
},
"props": {
"containerStyle": "none",
"canExtend": false,
"detachFromLayout": true,
"children": [],
"blueprint": {
"view": [
{
"type": "TEXT_WIDGET",
"size": {
"rows": 1,
"cols": 12
},
"position": {
"top": 0,
"left": 0
},
"props": {
"text": "Form",
"textStyle": "HEADING"
}
},
{
"type": "FORM_BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
},
"position": {
"top": 11,
"left": 12
},
"props": {
"text": "Submit",
"buttonStyle": "PRIMARY_BUTTON",
"disabledWhenInvalid": true,
"resetFormOnClick": true
}
},
{
"type": "FORM_BUTTON_WIDGET",
"size": {
"rows": 1,
"cols": 4
},
"position": {
"top": 11,
"left": 8
},
"props": {
"text": "Reset",
"buttonStyle": "SECONDARY_BUTTON",
"disabledWhenInvalid": false,
"resetFormOnClick": true
}
}
]
}
}
}
]
},
"type": "FORM_WIDGET",
"isLoading": false,
"parentColumnSpace": 74,
Expand All @@ -230,4 +107,4 @@
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const dsl = require("../../../fixtures/SimpleBinding.json");
const widgetsPage = require("../../../locators/Widgets.json");

describe("Binding the multiple widgets and validating default data", function() {
before(() => {
cy.addDsl(dsl);
});

it("Checks if delete will remove bindings", function() {
cy.get(widgetsPage.textWidget)
.first()
.click({ force: true });
cy.get("body").type("{del}", { force: true });

cy.get(widgetsPage.textWidget)
.first()
.should("not.have.text", "Label");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe("Binding the multiple Widgets and validating NavigateTo Page", function
cy.get(publish.inputGrp)
.first()
.type("123");

cy.get(widgetsPage.chartWidget).should("be.visible");
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ describe("Form reset functionality", function() {
.contains("Reset")
.click();

cy.wait(500);

cy.get(".tr")
.eq(2)
.should("not.have.class", "selected-row");
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/locators/ViewWidgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"searchloc": "input[placeholder='Enter location to search']",
"imagecontainer": ".t--draggable-imagewidget span.t--widget-name",
"imageinner": ".t--draggable-imagewidget img",
"chartInnerText": ".t--draggable-chartwidget text",
"chartInnerText": ".t--property-control-title",
"inputChartValue": ".t--property-control-chartdata .CodeMirror textarea",
"chartButton": ".t--property-control-chartdata button",
"rectangleChart": ".t--draggable-chartwidget g rect",
Expand Down
Loading

0 comments on commit f96f45d

Please sign in to comment.