Skip to content

Commit

Permalink
Merge branch 'release' into fix/semi-colon-in-js
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/client/yarn.lock
  • Loading branch information
hetunandu committed May 29, 2021
2 parents d78b939 + f75ec78 commit 882067b
Show file tree
Hide file tree
Showing 83 changed files with 1,602 additions and 700 deletions.
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/---bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ about: Create a bug report to help us improve appsmith
title: "[Bug]"
labels: Bug, Needs Triaging
assignees: Nikhil-Nandagopal

---

## Description

[What happened]

### Steps to reproduce the behaviour:

Add steps to reproduce this behaviour, include console / network logs & screenshots

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

### Important Details
- Version: [Cloud / Self-Hosted vx.x]
- OS: [e.g.MacOSX]
- Browser [e.g. chrome, safari]

- Version: [Cloud / Self-Hosted vx.x]
- OS: [e.g.MacOSX]
- Browser [e.g. chrome, safari]
- Environment [production, release, deploy preview]
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2021 Appsmith Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
249 changes: 120 additions & 129 deletions README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@ const commonlocators = require("../../../../locators/commonlocators.json");
const explorerlocators = require("../../../../locators/explorerlocators.json");
let duplicateApplicationDsl;

describe("Duplicate application", function() {
describe("Duplicate application", function () {
before(() => {
dsl.dsl.version = 20; // latest migrated version
dsl.dsl.version = 21; // latest migrated version
cy.addDsl(dsl);
});

it("Check whether the duplicate application has the same dsl as the original", function() {
it("Check whether the duplicate application has the same dsl as the original", function () {
cy.get(commonlocators.homeIcon).click({ force: true });
const appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);

cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.applicationCard).first().trigger("mouseover");
cy.get(homePage.appMoreIcon).first().click({ force: true });
cy.get(homePage.duplicateApp).click({ force: true });

cy.wait("@getPage").should(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,24 @@ const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../../locators/commonlocators.json");
let forkedApplicationDsl;

describe("Fork application across orgs", function() {
describe("Fork application across orgs", function () {
before(() => {
dsl.dsl.version = 20; // latest migrated version
dsl.dsl.version = 21; // latest migrated version
cy.addDsl(dsl);
});

it("Check if the forked application has the same dsl as the original", function() {
it("Check if the forked application has the same dsl as the original", function () {
cy.get(commonlocators.homeIcon).click({ force: true });
const appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);

cy.get(homePage.applicationCard)
.first()
.trigger("mouseover");
cy.get(homePage.appMoreIcon)
.first()
.click({ force: true });
cy.get(homePage.applicationCard).first().trigger("mouseover");
cy.get(homePage.appMoreIcon).first().click({ force: true });
cy.get(homePage.forkAppFromMenu).click({ force: true });
// select a different org here
cy.get(homePage.forkAppOrgList)
.children()
.last()
.click({ force: true });
cy.get(homePage.forkAppOrgList).children().last().click({ force: true });
cy.get(homePage.forkAppOrgButton).click({ force: true });
cy.wait("@postForkAppOrg").then((httpResponse) => {
expect(httpResponse.status).to.equal(200);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");

describe("aTob and bToa library tests ", function() {
describe("aTob and bToa library tests ", function () {
before(() => {
cy.addDsl(dsl);
});

it("Input widget test with default value for atob method", function() {
it("Input widget test with default value for atob method", function () {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.atobInput);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -22,7 +22,7 @@ describe("aTob and bToa library tests ", function() {
);
});

it("Input widget test with default value for btoa method", function() {
it("Input widget test with default value for btoa method", function () {
cy.SearchEntityandOpen("Input2");
cy.get(widgetsPage.defaultInput).type(testdata.btoaInput);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -31,10 +31,9 @@ describe("aTob and bToa library tests ", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});

it("publish widget and validate the data displayed in input widgets value for aToB and bToa", function() {
it("publish widget and validate the data displayed in input widgets value for aToB and bToa", function () {
cy.PublishtheApp();
cy.get(publish.inputWidget + " " + "input")
.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");

describe("Loadash basic test with input Widget", function() {
describe("Loadash basic test with input Widget", function () {
before(() => {
cy.addDsl(dsl);
});

it("Input widget test with default value from another Input widget", function() {
it("Input widget test with default value from another Input widget", function () {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.defaultInputBinding);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -22,7 +22,7 @@ describe("Loadash basic test with input Widget", function() {
);
});

it("Input widget test with default value for loadash function", function() {
it("Input widget test with default value for loadash function", function () {
cy.SearchEntityandOpen("Input2");
cy.get(widgetsPage.defaultInput).type(testdata.loadashInput);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -31,10 +31,9 @@ describe("Loadash basic test with input Widget", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});

it("publish widget and validate the data displayed in input widgets from loadash function", function() {
it("publish widget and validate the data displayed in input widgets from loadash function", function () {
cy.PublishtheApp();
cy.get(publish.inputWidget + " " + "input")
.first()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");

describe("Moment basic test with input Widget", function() {
describe("Moment basic test with input Widget", function () {
before(() => {
cy.addDsl(dsl);
});

it("Input widget test with default value from another Input widget", function() {
it("Input widget test with default value from another Input widget", function () {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.defaultInputBinding);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -22,7 +22,7 @@ describe("Moment basic test with input Widget", function() {
);
});

it("Binding second input widget with first input widget and validating", function() {
it("Binding second input widget with first input widget and validating", function () {
cy.SearchEntityandOpen("Input2");
cy.get(widgetsPage.defaultInput).type(testdata.momentInput);
cy.get(commonlocators.editPropCrossButton).click({ force: true });
Expand All @@ -31,10 +31,9 @@ describe("Moment basic test with input Widget", function() {
"response.body.responseMeta.status",
200,
);
cy.reload();
});

it("publish widget and validate the data displayed in input widgets", function() {
it("publish widget and validate the data displayed in input widgets", function () {
var currentTime = new Date();
cy.PublishtheApp();
cy.get(publish.inputWidget + " " + "input")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,23 @@ describe("Dynamic input autocomplete", () => {
.type("{ctrl}{shift}{downarrow}")
.then(($cm) => {
if ($cm.val() !== "") {
cy.get(dynamicInputLocators.input)
.first()
.clear({
force: true,
});
}

cy.get(dynamicInputLocators.input)
.first()
.type("{{", {
cy.get(dynamicInputLocators.input).first().clear({
force: true,
parseSpecialCharSequences: false,
});
}

cy.get(dynamicInputLocators.input).first().type("{{", {
force: true,
parseSpecialCharSequences: false,
});

// Tests if autocomplete will open
cy.get(dynamicInputLocators.hints).should("exist");

// Tests if data tree entities are sorted
cy.get(`${dynamicInputLocators.hints} li`)
.first()
.should("have.text", "Aditya");
.eq(1)
.should("have.text", "Aditya.backgroundColor");

// Tests if "No suggestions" message will pop if you type any garbage
cy.get(dynamicInputLocators.input)
Expand All @@ -57,17 +53,13 @@ describe("Dynamic input autocomplete", () => {
it("opens current value popup", () => {
// Test on widgets pane
cy.openPropertyPane("buttonwidget");
cy.get(dynamicInputLocators.input)
.first()
.focus();
cy.get(dynamicInputLocators.input).first().focus();
cy.assertEvaluatedValuePopup("string");
// Test on api pane
cy.NavigateToAPI_Panel();
cy.get(apiwidget.createapi).click({ force: true });
cy.wait("@createNewApi");
cy.xpath(apiwidget.headerValue)
.first()
.focus();
cy.xpath(apiwidget.headerValue).first().focus();
cy.assertEvaluatedValuePopup("string");
});
});
2 changes: 1 addition & 1 deletion app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@blueprintjs/timezone": "^3.6.0",
"@craco/craco": "^5.7.0",
"@draft-js-plugins/editor": "^4.1.0",
"@draft-js-plugins/mention": "^4.3.2",
"@draft-js-plugins/mention": "^4.5.1",
"@fusioncharts/powercharts": "^3.16.0",
"@github/g-emoji-element": "^1.1.5",
"@manaflair/redux-batch": "^1.0.0",
Expand Down
5 changes: 5 additions & 0 deletions app/client/src/actions/applicationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,8 @@ export const resetCurrentApplication = () => {
type: ReduxActionTypes.RESET_CURRENT_APPLICATION,
};
};

export const setShowAppInviteUsersDialog = (payload: boolean) => ({
type: ReduxActionTypes.SET_SHOW_APP_INVITE_USERS_MODAL,
payload,
});
4 changes: 0 additions & 4 deletions app/client/src/actions/debuggerActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@ export const updateErrorLog = (payload: Message) => ({
type: ReduxActionTypes.DEBUGGER_UPDATE_ERROR_LOG,
payload,
});

export const resetDebuggerState = () => ({
type: ReduxActionTypes.RESET_DEBUGGER_STATE,
});
18 changes: 17 additions & 1 deletion app/client/src/api/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ class Api {
);
}

static patch(
url: string,
body?: any,
queryParams?: any,
config: Partial<AxiosRequestConfig> = {},
) {
return axiosInstance.patch(
url + convertObjectToQueryParams(queryParams),
body,
{
...apiRequestConfig,
...config,
},
);
}

static delete(
url: string,
queryParams?: any,
Expand All @@ -80,6 +96,6 @@ class Api {
}
}

export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE";
export type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH";

export default Api;
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import useProceedToNextTourStep from "utils/hooks/useProceedToNextTourStep";
const Container = styled.div`
display: flex;
cursor: pointer;
margin-left: ${(props) => props.theme.spaces[2]}px;
`;

type Props = {
Expand Down
Loading

0 comments on commit 882067b

Please sign in to comment.