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

Feature: API Pane Redesign #2218

Merged
merged 46 commits into from
Feb 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
be040c0
Theme object added for API Pane
devrk96 Dec 16, 2020
674c99f
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Dec 16, 2020
69f57b5
Feature: Run Button integration (#2319)
devrk96 Jan 5, 2021
1064702
Editable text component integrated for API name (#2318)
devrk96 Jan 5, 2021
fc36ad5
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Jan 5, 2021
34af639
resolved prettier issue
devrk96 Jan 5, 2021
d17538e
Feature: New alignment and design changes in API Pane container (#2220)
devrk96 Jan 5, 2021
abb0816
Feature: More actionable Menu (#2365)
devrk96 Jan 5, 2021
9db862b
Text url search component added (#2397)
devrk96 Jan 5, 2021
dcdd116
Feature: API Request dropdown (#2369)
devrk96 Jan 5, 2021
21dcd0a
Request tree and response body new design changes implemented (#2433)
devrk96 Jan 5, 2021
116741a
css changes
devrk96 Jan 5, 2021
29c8751
Feature: Tab component integration (#2436)
devrk96 Jan 6, 2021
8c268c3
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Jan 6, 2021
64f49e4
Merge branch 'feature/api-pane-redesign' of https://github.com/appsmi…
devrk96 Jan 6, 2021
41cbbfc
Fix: API pane style and integration changes (#2467)
devrk96 Jan 8, 2021
8480a78
Test cases fixed
devrk96 Jan 11, 2021
0e8dd20
Feature: Code Editor and new design for lightning menu (#2513)
devrk96 Jan 13, 2021
ba551ba
Lightening menu style changes fixed (#2559)
devrk96 Jan 14, 2021
7404d56
Feature: Border and hover variant in Code Editor (#2568)
devrk96 Jan 14, 2021
a74ee9c
Feature: API body section (#2596)
devrk96 Jan 19, 2021
9ffb72b
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Jan 20, 2021
bd3b1a5
Test-cases fixed
devrk96 Jan 20, 2021
76d2264
API panel test cases fixed
devrk96 Jan 21, 2021
cc2820b
Feature: Evaluated pane and autocomplete dropdown new designs (#2641)
devrk96 Jan 22, 2021
6e6b68a
Pagination section design changes implemented (#2682)
devrk96 Jan 23, 2021
a468af7
Feature: Callout component (#2760)
devrk96 Jan 29, 2021
685f19e
Feature: API Pane Setting section redesign (#2738)
devrk96 Jan 29, 2021
79a9ef4
Feature: New designs of API datasource autocomplete (#2815)
devrk96 Feb 2, 2021
b0695df
Merge branch 'release' into feature/api-pane-redesign
hetunandu Feb 3, 2021
50ba8e2
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Feb 3, 2021
59991bb
Test cases related to settings, pagination and datasource fixed
devrk96 Feb 3, 2021
33c29ac
Warning removed
devrk96 Feb 3, 2021
7fe835d
Test cases fixed
devrk96 Feb 3, 2021
964230b
Merge branch 'release' of https://github.com/appsmithorg/appsmith int…
devrk96 Feb 3, 2021
7e20489
Pagination text case fixed
devrk96 Feb 3, 2021
d02479b
Pagination new designs with gif player implemented (#2886)
devrk96 Feb 8, 2021
83a7f79
Gif style changes implemented in Pagination (#2935)
devrk96 Feb 10, 2021
c62a26e
Feedback changes implemented (#2946)
devrk96 Feb 10, 2021
4c67be6
Merge branch 'release' into feature/api-pane-redesign
hetunandu Feb 10, 2021
9eadfb8
Fix onblur use
hetunandu Feb 10, 2021
68da94c
Fix body switching issues (#2950)
hetunandu Feb 10, 2021
66c9303
Bugs related to API pane resolved (#2964)
devrk96 Feb 10, 2021
89df048
Fix api pane theming (#2984)
hetunandu Feb 11, 2021
a717689
Merge branch 'release' into feature/api-pane-redesign
hetunandu Feb 11, 2021
a916f29
Fix merge usage missed
hetunandu Feb 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/client/cypress/fixtures/testdata.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
"methodpost": "api/users",
"methodpatch": "api/users/2",
"methoddelete": "1",
"putAction": "//div[contains(@id,'react-select') and contains(text(),'PUT')]",
"postAction": "//div[contains(@id,'react-select') and contains(text(),'POST')]",
"patchAction": "//div[contains(@id,'react-select') and contains(text(),'PATCH')]",
"deleteAction": "//div[contains(@id,'react-select') and contains(text(),'DELETE')]",
"putAction": "//div[contains(@class, 't--dropdown-option')]//span[contains(text(),'PUT')]",
"postAction": "//div[contains(@class, 't--dropdown-option')]//span[contains(text(),'POST')]",
"patchAction": "//div[contains(@class, 't--dropdown-option')]//span[contains(text(),'PATCH')]",
"deleteAction": "//div[contains(@class, 't--dropdown-option')]//span[contains(text(),'DELETE')]",
"moustacheMethod": "{{Api.text}}",
"nextUrl": ".data.next}}",
"prevUrl": ".data.previous}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ describe("API Panel Test Functionality", function() {
cy.enterDatasourceAndPath("https://reqres.in/api/", "users");
cy.WaitAutoSave();
cy.get("li:contains('Settings')").click({ force: true });
cy.get("[data-cy=executeOnLoad]")
.find(".bp3-switch")
.click();
cy.get("[data-cy=executeOnLoad]").click({ force: true });

cy.wait("@setExecuteOnLoad");

Expand All @@ -36,9 +34,7 @@ describe("API Panel Test Functionality", function() {
cy.enterDatasourceAndPath("https://abc.com", "users");
cy.WaitAutoSave();
cy.get("li:contains('Settings')").click({ force: true });
cy.get("[data-cy=executeOnLoad]")
.find(".bp3-switch")
.click();
cy.get("[data-cy=executeOnLoad]").click({ force: true });

cy.wait("@setExecuteOnLoad");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe("Test curl import flow", function() {
cy.RunAPI();
cy.ResponseStatusCheck("200 OK");
cy.get(ApiEditor.formActionButtons).should("be.visible");
cy.get(ApiEditor.ApiActionMenu).click();
cy.get(ApiEditor.ApiDeleteBtn).click();
cy.wait("@deleteAction");
cy.get("@deleteAction").then((response) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
const testdata = require("../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json");
const ApiEditor = require("../../../locators/ApiEditor.json");

describe("API Panel Test Functionality", function() {
afterEach(function() {
cy.get(".t--apiFormDeleteBtn").click();
cy.get(ApiEditor.ApiActionMenu).click({ force: true });
cy.get(apiwidget.deleteAPI).click({ force: true });
cy.wait("@deleteAction").should(
"have.nested.property",
"response.body.responseMeta.status",
Expand All @@ -24,8 +26,9 @@ describe("API Panel Test Functionality", function() {
testdata.headerKey,
testdata.headerValue,
);
cy.readFile("cypress/fixtures/putjson.txt").then(json => {
cy.readFile("cypress/fixtures/putjson.txt").then((json) => {
cy.log(json);
cy.contains(ApiEditor.bodyTab).click({ force: true });
cy.xpath(apiwidget.postbody)
.click({ force: true })
.focus()
Expand All @@ -50,8 +53,9 @@ describe("API Panel Test Functionality", function() {
testdata.headerKey,
testdata.headerValue,
);
cy.readFile("cypress/fixtures/postjson.txt").then(json => {
cy.readFile("cypress/fixtures/postjson.txt").then((json) => {
cy.log(json);
cy.contains(ApiEditor.bodyTab).click({ force: true });
cy.xpath(apiwidget.postbody)
.click({ force: true })
.focus()
Expand All @@ -76,8 +80,9 @@ describe("API Panel Test Functionality", function() {
testdata.headerKey,
testdata.headerValue,
);
cy.readFile("cypress/fixtures/patchjson.txt").then(json => {
cy.readFile("cypress/fixtures/patchjson.txt").then((json) => {
cy.log(json);
cy.contains(ApiEditor.bodyTab).click({ force: true });
cy.xpath(apiwidget.postbody)
.click({ force: true })
.focus()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("API Panel request body", function() {

cy.SelectAction(testdata.postAction);

cy.get(apiEditor.bodyType).click();
cy.contains(apiEditor.bodyTab).click();
cy.contains(testdata.apiFormDataBodyType).click();

cy.xpath(apiwidget.formEncoded).should("be.visible");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ describe("Binding the API with pageOnLoad and input Widgets", function() {
cy.enterDatasourceAndPath("https://reqres.in/api/", "users");
cy.WaitAutoSave();
cy.get(apiwidget.settings).click({ force: true });
cy.get(apiwidget.onPageLoad)
.find(".bp3-switch")
.click();
cy.get(apiwidget.onPageLoad).click({ force: true });
cy.wait("@setExecuteOnLoad");
cy.reload();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ const pages = require("../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json");
const publishPage = require("../../../locators/publishWidgetspage.json");

describe("Test Create Api and Bind to Table widget", function () {
describe("Test Create Api and Bind to Table widget", function() {
before(() => {
cy.addDsl(dsl);
});

it("Test_Add Paginate with Table Page No and Execute the Api", function () {
it("Test_Add Paginate with Table Page No and Execute the Api", function() {
/**Create an Api1 of Paginate with Table Page No */
cy.createAndFillApi(this.data.paginationUrl, this.data.paginationParam);
cy.RunAPI();
});

it("Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function () {
it("Table-Text, Validate Server Side Pagination of Paginate with Table Page No", function() {
cy.SearchEntityandOpen("Table1");
/**Bind Api1 with Table widget */
cy.testJsontext("tabledata", "{{Api1.data.users}}");
Expand All @@ -24,7 +24,7 @@ describe("Test Create Api and Bind to Table widget", function () {
cy.SearchEntityandOpen("Text1");
cy.testJsontext("text", "{{Table1.selectedRow.url}}");
cy.SearchEntityandOpen("Table1");
cy.readTabledata("0", "0").then(tabData => {
cy.readTabledata("0", "0").then((tabData) => {
const tableData = tabData;
localStorage.setItem("tableDataPage1", tableData);
});
Expand All @@ -43,7 +43,7 @@ describe("Test Create Api and Bind to Table widget", function () {
//cy.ValidateTableData("11");
});

it("Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function () {
it("Table-Text, Validate Publish Mode on Server Side Pagination of Paginate with Table Page No", function() {
cy.PublishtheApp();
cy.ValidatePublishTableData("1");
cy.get(commonlocators.tableNextPage).click({ force: true });
Expand All @@ -57,7 +57,7 @@ describe("Test Create Api and Bind to Table widget", function () {
cy.get(publishPage.backToEditor).click({ force: true });
});

it("Test_Add Paginate with Response URL and Execute the Api", function () {
it("Test_Add Paginate with Response URL and Execute the Api", function() {
/** Create Api2 of Paginate with Response URL*/
cy.createAndFillApi(this.data.paginationUrl, "users");
cy.RunAPI();
Expand All @@ -79,7 +79,7 @@ describe("Test Create Api and Bind to Table widget", function () {
cy.callApi("Api2");
});

it("Table-Text, Validate Server Side Pagination of Paginate with Response URL", function () {
it("Table-Text, Validate Server Side Pagination of Paginate with Response URL", function() {
/**Validate Response data with Table data in Text Widget */
cy.ValidatePaginateResponseUrlData(apiPage.apiPaginationPrevTest);
cy.PublishtheApp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ describe("Datasource form related tests", function() {
cy.CreateAPI("Testapi");
cy.enterDatasourceAndPath("https://reqres.in/api/", "users");

cy.get(".t--store-as-datasource-menu").click();
cy.get(".t--store-as-datasource").click();

cy.get(".t--form-control-KEY_VAL_INPUT .t--add-field").click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ describe("Create a rest datasource", function() {
cy.CreateAPI("Testapi");
cy.enterDatasourceAndPath("https://reqres.in/api/", "users");

cy.get(".t--store-as-datasource-menu").click();
cy.get(".t--store-as-datasource").click();

cy.saveDatasource();
Expand Down
6 changes: 4 additions & 2 deletions app/client/cypress/locators/ApiEditor.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
"nameOfApi": ".t--nameOfApi",
"ApiNameField": ".t--action-name-edit-field",
"addToPageBtn": ".t--addToPageBtn",
"ApiActionMenu": ".t--more-action-menu",
"ApiDeleteBtn": ".t--apiFormDeleteBtn",
"ApiRunBtn": ".t--apiFormRunBtn",
"addToPageBtnsId": ".t--addToPageButtons",
"ApiHomePage": ".t--apiHomePage",
"formActionButtons": ".t--formActionButtons",
"dataSourceField": ".t--dataSourceField",
"responseBody": ".CodeMirror-code span.cm-string.cm-property",
"ApiVerb": ".t--apiFormHttpMethod input",
"ApiVerb": ".t--apiFormHttpMethod",
"apiPaginationNextText": ".t--apiFormPaginationNext",
"apiPaginationPrevText": ".t--apiFormPaginationPrev",
"apiPaginationPrevTest": ".t--apiFormPaginationPrevTest",
"apiPaginationNextTest": ".t--apiFormPaginationNextTest",
"apiPaginationTab": ".t--apiFormPaginationType",
"apiTab": ".react-tabs__tab-list li",
"bodyType": ".t--apiFormPostBodyType"
"bodyType": ".t--apiFormPostBodyType",
"bodyTab": "Body"
}
6 changes: 3 additions & 3 deletions app/client/cypress/locators/HomePage.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"inviteUserMembersPage": "[data-cy=t--invite-users]",
"email": "//input[@type='email']",
"selectRole": "//span[text()='Select a role']",
"adminRole": "//div[@class='label-title']//span[text()='Administrator']",
"viewerRole": "//div[@class='label-title']//span[text()='App Viewer']",
"developerRole": "//div[@class='label-title']//span[text()='Developer']",
"adminRole": "//div[contains(@class, 'label-container')]//span[1][text()='Administrator']",
"viewerRole": "//div[contains(@class, 'label-container')]//span[1][text()='App Viewer']",
"developerRole": "//div[contains(@class, 'label-container')]//span[1][text()='Developer']",
"inviteBtn": "//button[text()='Invite']",
"manageUsers": ".manageUsers",
"DeleteBtn": "[data-cy=t--deleteUser]",
Expand Down
9 changes: 5 additions & 4 deletions app/client/cypress/locators/apiWidgetslocator.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"resourceUrl": ".t--dataSourceField",
"searchInputPlaceholder": "//div[contains(@class, 't--dataSourceField')]//div//input",
"searchApi": ".t--sidebar input[type=text]",
"createapi": ".t--createBlankApiCard",
"apiTxt": ".t--action-name-edit-field input",
Expand Down Expand Up @@ -29,21 +30,21 @@
"paginationTab": "li:contains('Pagination')",
"apiInputTab": "li:contains('API Input')",
"paginationOption": ".t--apiFormPaginationType div>input",
"paginationWithTable": "//div[contains(@id,'react') and contains(text(),'Paginate with Table Page No')] ",
"paginationWithUrl": "//div[contains(@id,'react') and contains(text(),'Paginate with Response Url')]",
"paginationWithTable": "//label[contains(text(),'Paginate with Table Page No')] ",
"paginationWithUrl": "//label[contains(text(),'Paginate with Response Url')]",
"panigationNextUrl": ".t--apiFormPaginationNext div>textarea",
"panigationPrevUrl": ".t--apiFormPaginationPrev div>textarea",
"TestNextUrl": ".t--apiFormPaginationNextTest",
"TestPreUrl": ".t--apiFormPaginationPrevTest",
"EditApiName": "img[alt='Edit pen']",
"ApiName": ".t--action-name-edit-field span",
"Request": "//li[text()='Request']",
"Request": "//li//span[text()='Request']",
"RequestURL": "(//span[@class='bp3-tree-node-label']/span)[1]",
"RequestMethod": "(//span[@class='bp3-tree-node-label']/span)[2]",
"content-Type": "(//span[@class='bp3-tree-node-label']/span)[3]",
"requestBody": "(//div[contains(@class,'bp3-collapse-body')]//textarea)[1]",
"showrequest": "span:contains('Show Request')",
"Responsetab": "//li[text()='Response Body']",
"Responsetab": "//li//span[text()='Response Body']",
"deleteAPI": ".t--apiFormDeleteBtn",
"editName": ".single-select >div:contains('Edit Name')",
"page": ".single-select >div",
Expand Down
101 changes: 44 additions & 57 deletions app/client/cypress/manual_TestSuite/API_Datasource_Spec.js
Original file line number Diff line number Diff line change
@@ -1,60 +1,47 @@
const commonlocators = require("../../../locators/commonlocators.json");

describe("API associated with Datasource", function() {
it("Edit name of the Datasource from Pane and refeclected in the Page ", function()
{
// Click on the API datasource
// Click on Action icon (Three Dots)
// Click on "Edit Name"
// Rename the Datasource
// Click on the datasource
// Ensure the name is updated on the Page
}
)
it("Edit name of the Datasource from Page and refeclected in the Pane", function()
{
// Click on the API datasource
// Navigate to respective
// Click on "Edit " option next to the Name of the datasource
// Rename the Datasource
// Ensure the name is updated in the Pane
}
)
it("Edit the API Datasource", function()
{
// Click on the API datasource
// Ensure navigation to respective page
// Click on "EDIT"
// Make some changes
// Click on Test
// Click on Save
// Ensure it is refelected in the API
}
)
it("Error on trying to Deleting an API Datasource when associated with API ", function()
{
// Click on API associated Datasource
// Navigate to respective page
// Click on "Delete"
// Ensure an error message is displayed to user
}
)
it("Adding the API to an exsisting Datasource", function()
{
// Click on exsisting Datasource
// Navigate to Datasource list page
// Click on "+ New API"
// Ensure new API is added in the RHS Pane
// Click on "Run"
}
)
it("Refresh an Datasource ", function()
{
// Navigate to the Datasource
// Click on Action icon (Three Dots)
// Click on "Refresh"
// Ensure loading icon
}
)
}
)
it("Edit name of the Datasource from Pane and refeclected in the Page ", function() {
// Click on the API datasource
// Click on Action icon (Three Dots)
// Click on "Edit Name"
// Rename the Datasource
// Click on the datasource
// Ensure the name is updated on the Page
});
it("Edit name of the Datasource from Page and refeclected in the Pane", function() {
// Click on the API datasource
// Navigate to respective
// Click on "Edit " option next to the Name of the datasource
// Rename the Datasource
// Ensure the name is updated in the Pane
});
it("Edit the API Datasource", function() {
// Click on the API datasource
// Ensure navigation to respective page
// Click on "EDIT"
// Make some changes
// Click on Test
// Click on Save
// Ensure it is refelected in the API
});
it("Error on trying to Deleting an API Datasource when associated with API ", function() {
// Click on API associated Datasource
// Navigate to respective page
// Click on "Delete"
// Ensure an error message is displayed to user
});
it("Adding the API to an exsisting Datasource", function() {
// Click on exsisting Datasource
// Navigate to Datasource list page
// Click on "+ New API"
// Ensure new API is added in the RHS Pane
// Click on "Run"
});
it("Refresh an Datasource ", function() {
// Navigate to the Datasource
// Click on Action icon (Three Dots)
// Click on "Refresh"
// Ensure loading icon
});
});