2020-06-19 14:32:56 +00:00
|
|
|
/// <reference types="Cypress" />
|
2021-02-16 10:29:08 +00:00
|
|
|
/* eslint-disable cypress/no-unnecessary-waiting */
|
|
|
|
|
/* eslint-disable cypress/no-assigning-return-values */
|
2020-06-19 14:32:56 +00:00
|
|
|
|
2020-12-03 05:32:50 +00:00
|
|
|
require("cypress-file-upload");
|
2021-08-25 14:01:04 +00:00
|
|
|
const dayjs = require("dayjs");
|
2020-12-03 05:32:50 +00:00
|
|
|
|
2020-03-27 09:02:11 +00:00
|
|
|
const loginPage = require("../locators/LoginPage.json");
|
|
|
|
|
const homePage = require("../locators/HomePage.json");
|
2020-04-02 04:47:48 +00:00
|
|
|
const pages = require("../locators/Pages.json");
|
2020-05-08 05:40:14 +00:00
|
|
|
const datasourceEditor = require("../locators/DatasourcesEditor.json");
|
2020-05-11 09:03:46 +00:00
|
|
|
const datasourceFormData = require("../fixtures/datasources.json");
|
2020-04-08 13:38:19 +00:00
|
|
|
const commonlocators = require("../locators/commonlocators.json");
|
2020-05-11 09:03:46 +00:00
|
|
|
const queryEditor = require("../locators/QueryEditor.json");
|
2020-04-08 13:38:19 +00:00
|
|
|
const modalWidgetPage = require("../locators/ModalWidget.json");
|
2020-05-01 07:48:33 +00:00
|
|
|
const widgetsPage = require("../locators/Widgets.json");
|
2020-05-16 07:28:13 +00:00
|
|
|
const LayoutPage = require("../locators/Layout.json");
|
2020-05-08 09:01:11 +00:00
|
|
|
const formWidgetsPage = require("../locators/FormWidgets.json");
|
2020-05-07 08:07:50 +00:00
|
|
|
const ApiEditor = require("../locators/ApiEditor.json");
|
2020-05-12 13:47:13 +00:00
|
|
|
const apiwidget = require("../locators/apiWidgetslocator.json");
|
2020-06-04 13:49:22 +00:00
|
|
|
const dynamicInputLocators = require("../locators/DynamicInput.json");
|
2020-08-20 05:38:08 +00:00
|
|
|
const explorer = require("../locators/explorerlocators.json");
|
2021-04-06 13:29:27 +00:00
|
|
|
const datasource = require("../locators/DatasourcesEditor.json");
|
2021-06-24 14:28:20 +00:00
|
|
|
const viewWidgetsPage = require("../locators/ViewWidgets.json");
|
2021-07-29 08:13:10 +00:00
|
|
|
const generatePage = require("../locators/GeneratePage.json");
|
2020-07-16 05:50:46 +00:00
|
|
|
|
2020-05-27 11:21:11 +00:00
|
|
|
let pageidcopy = " ";
|
2020-03-10 09:38:12 +00:00
|
|
|
|
2021-07-02 06:04:36 +00:00
|
|
|
export const initLocalstorage = () => {
|
|
|
|
|
cy.window().then((window) => {
|
|
|
|
|
window.localStorage.setItem("ShowCommentsButtonToolTip", "");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-05 07:10:35 +00:00
|
|
|
Cypress.Commands.add("createOrg", () => {
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.get(homePage.createOrg)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2021-05-05 07:10:35 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("renameOrg", (orgName, newOrgName) => {
|
|
|
|
|
cy.contains(orgName).click({ force: true });
|
|
|
|
|
cy.get(homePage.renameOrgInput)
|
2020-07-20 09:38:35 +00:00
|
|
|
.should("be.visible")
|
2021-05-05 07:10:35 +00:00
|
|
|
.type(newOrgName)
|
|
|
|
|
.type("{enter}");
|
|
|
|
|
cy.contains(newOrgName);
|
2020-07-20 09:38:35 +00:00
|
|
|
});
|
|
|
|
|
|
2021-08-04 12:50:40 +00:00
|
|
|
Cypress.Commands.add("goToEditFromPublish", () => {
|
|
|
|
|
cy.url().then((url) => {
|
|
|
|
|
if (!url.includes("edit")) {
|
|
|
|
|
cy.visit(url + "/edit");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2020-09-08 10:54:55 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"dragTo",
|
|
|
|
|
{ prevSubject: "element" },
|
|
|
|
|
(subject, targetEl) => {
|
|
|
|
|
cy.wrap(subject).trigger("dragstart");
|
|
|
|
|
cy.get(targetEl).trigger("drop");
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("navigateToOrgSettings", (orgName) => {
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
2020-09-18 06:17:51 +00:00
|
|
|
cy.get(".t--org-name span")
|
|
|
|
|
.contains(orgName)
|
2020-09-16 11:50:47 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.xpath(homePage.MemberSettings).click({ force: true });
|
|
|
|
|
cy.wait("@getOrganisation");
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.wait("@getRoles").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.get(homePage.inviteUserMembersPage).should("be.visible");
|
2020-07-20 09:38:35 +00:00
|
|
|
});
|
|
|
|
|
|
2021-06-02 09:56:22 +00:00
|
|
|
Cypress.Commands.add("openOrgOptionsPopup", (orgName) => {
|
|
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
cy.get(".t--org-name span")
|
|
|
|
|
.contains(orgName)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-20 09:38:35 +00:00
|
|
|
Cypress.Commands.add("inviteUserForOrg", (orgName, email, role) => {
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.stubPostHeaderReq();
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(homePage.shareOrg))
|
|
|
|
|
.first()
|
|
|
|
|
.should("be.visible")
|
2021-07-09 07:11:07 +00:00
|
|
|
.click({ force: true });
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.xpath(homePage.email)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(email);
|
|
|
|
|
cy.xpath(homePage.selectRole).click({ force: true });
|
|
|
|
|
cy.xpath(role).click({ force: true });
|
|
|
|
|
cy.xpath(homePage.inviteBtn).click({ force: true });
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.wait("@mockPostInvite")
|
|
|
|
|
.its("request.headers")
|
|
|
|
|
.should("have.property", "origin", "Cypress");
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.contains(email);
|
|
|
|
|
});
|
|
|
|
|
|
2020-12-17 06:10:50 +00:00
|
|
|
Cypress.Commands.add("CheckShareIcon", (orgName, count) => {
|
|
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
2020-12-23 11:28:29 +00:00
|
|
|
cy.get(
|
|
|
|
|
homePage.orgList.concat(orgName).concat(") .org-share-user-icons"),
|
|
|
|
|
).should("have.length", count);
|
2020-12-17 06:10:50 +00:00
|
|
|
});
|
|
|
|
|
|
2021-04-06 13:29:27 +00:00
|
|
|
Cypress.Commands.add("stubPostHeaderReq", () => {
|
|
|
|
|
cy.intercept("POST", "/api/v1/users/invite", (req) => {
|
|
|
|
|
req.headers["origin"] = "Cypress";
|
|
|
|
|
}).as("mockPostInvite");
|
|
|
|
|
});
|
|
|
|
|
|
2020-10-12 12:43:35 +00:00
|
|
|
Cypress.Commands.add("shareApp", (email, role) => {
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.stubPostHeaderReq();
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.xpath(homePage.email)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(email);
|
|
|
|
|
cy.xpath(homePage.selectRole).click({ force: true });
|
|
|
|
|
cy.xpath(role).click({ force: true });
|
|
|
|
|
cy.xpath(homePage.inviteBtn).click({ force: true });
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.wait("@mockPostInvite")
|
|
|
|
|
.its("request.headers")
|
|
|
|
|
.should("have.property", "origin", "Cypress");
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.contains(email);
|
|
|
|
|
cy.get(homePage.closeBtn).click();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("shareAndPublic", (email, role) => {
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.stubPostHeaderReq();
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.xpath(homePage.email)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(email);
|
|
|
|
|
cy.xpath(homePage.selectRole).click({ force: true });
|
|
|
|
|
cy.xpath(role).click({ force: true });
|
|
|
|
|
cy.xpath(homePage.inviteBtn).click({ force: true });
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.wait("@mockPostInvite")
|
|
|
|
|
.its("request.headers")
|
|
|
|
|
.should("have.property", "origin", "Cypress");
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.contains(email);
|
|
|
|
|
cy.enablePublicAccess();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("enablePublicAccess", () => {
|
|
|
|
|
cy.get(homePage.enablePublicAccess).click();
|
|
|
|
|
cy.wait("@changeAccess").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
cy.get(homePage.closeBtn).click();
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-20 09:38:35 +00:00
|
|
|
Cypress.Commands.add("deleteUserFromOrg", (orgName, email) => {
|
|
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
2020-09-18 06:17:51 +00:00
|
|
|
cy.get(".t--org-name span")
|
|
|
|
|
.contains(orgName)
|
2020-09-16 11:50:47 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.xpath(homePage.MemberSettings).click({ force: true });
|
|
|
|
|
cy.wait("@getOrganisation");
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.wait("@getRoles").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2021-06-02 15:53:30 +00:00
|
|
|
cy.get(homePage.DeleteBtn)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
2021-06-05 05:31:18 +00:00
|
|
|
cy.get(homePage.leaveOrgConfirmModal).should("be.visible");
|
|
|
|
|
cy.get(homePage.leaveOrgConfirmButton).click({ force: true });
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.xpath(homePage.appHome)
|
2020-08-28 18:51:16 +00:00
|
|
|
.first()
|
2020-07-20 09:38:35 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@applications").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("updateUserRoleForOrg", (orgName, email, role) => {
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.stubPostHeaderReq();
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(")"))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible");
|
2020-09-18 06:17:51 +00:00
|
|
|
cy.get(".t--org-name span")
|
|
|
|
|
.contains(orgName)
|
2020-09-16 11:50:47 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.xpath(homePage.MemberSettings).click({ force: true });
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.wait("@getRoles").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.get(homePage.inviteUserMembersPage).click({ force: true });
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.xpath(homePage.email)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(email);
|
|
|
|
|
cy.xpath(homePage.selectRole).click({ force: true });
|
|
|
|
|
cy.xpath(role).click({ force: true });
|
|
|
|
|
cy.xpath(homePage.inviteBtn).click({ force: true });
|
2021-04-06 13:29:27 +00:00
|
|
|
cy.wait("@mockPostInvite")
|
|
|
|
|
.its("request.headers")
|
|
|
|
|
.should("have.property", "origin", "Cypress");
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.contains(email);
|
2020-08-03 11:44:18 +00:00
|
|
|
cy.get(".bp3-icon-small-cross").click({ force: true });
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.xpath(homePage.appHome)
|
2020-08-28 18:51:16 +00:00
|
|
|
.first()
|
2020-07-20 09:38:35 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@applications").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("launchApp", (appName) => {
|
2020-07-20 09:38:35 +00:00
|
|
|
cy.get(homePage.appView)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.first()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get("#loading").should("not.exist");
|
[API breaking change : Automated Tests Will Fail] Page And Action Refactor (#549)
* Introduced new page which stores the published and unpublished pages as separate.
* Mid level commit to save the state.
* Parity of new page repository with old page repository (custom functions)
* WIP : Delete a page. This requires changes across application structure as well.
* Added publishedPages construct inside application to store the pages in the deployed view as well as isDefault so that the same changes (delete or isDefault) in unpublished view doesn't alter these fields for the published application
* Parity reached with PageService.
* Minor ActionService refactor to remove unnecessary code.
ApplicationPageService, LayoutActionService, LayoutService use the new page service to fetch the pages
Minor corrections in fetching the page from new page service in tests
* New save function which sets the PageDTO for unpublished page and then saves the new page into repository.
* Migration of page service functions to new page service functions across other services/tests/controller
* Finished migrating all the page service functions to the new page service functions
* Application Service Tests have been fixed.
* All the existing test cases are working now.
* Publish application implemented to store published pages as well. Added a basic test case to check that published pages is being set and that page's publishedPageDTO is being set accordingly.
* Minor TODOs added to add test cases for published application.
* A few tests to ascertain that published application page fields (deleted, isDefault) does not get changed when these statuses are changed for a page in edit mode.
* Added a new controller end point to fetch application in view mode.
* Added new endpoint for fetching an application in view mode on the client.
* Bug fix where get application in view mode API was not getting called.
* Fixed the get page names by application & archive pages which have been deleted in edit mode during publishing of application.
* During delete page, if a page was never published and it was deleted during edit, delete the entire page instead of just deleting the unpublished PageDTO
* Minor formatting.
* Non working client side code to fetch page list using view mode.
* revert unnecassary changes and streamlined view and edit actions
* Fix missed import
* Fixed a bug where if a page is not published, it should not be returned in view mode in list of page names api.
* Fixed update for a page which was not working in integration test.
* ActionDTO added.
* Solidified the new action structure.
* Migration added for NewAction index creation and NewAction per Action insertion in the database.
* Basic file structure added the new repository, custom repository, service, etc.
* Delete OldPage.java
* Repo functions added - TODO : Haven;t handled the published/edited views
* Helper functions added to convert Action to NewAction and vice-versa. Removed unused currentUserMono usage.
* Create & update action functionality added.
* Execute Action refactored. Removed dry run specific code.
* Repository migrated to handle new data structure. Execute action refactored to no longer support dry runs of actions.
* TODO added for special handling of change view of application to handle edge cases of pages/actions which either exist in published mode but don't exist in unpublished mode or vice versa.
* Migrated finding on load actions from spring repository to custom repository.
* In view mode, now actions are being fetched by application id directly instead of first fetching application and then using the page ids, fetching the actions. This reduces the db calls from 2 to 1 per fetch actions in view mode api call.
* Delete action and get all actions (used in edit mode on the client side) implemented.
* Updated CollectionService and ActionCollectionService to use the new action service instead of the old one.
* LayoutActionService refactored to now use the new service functions.
* ActionController now no longer used ActionService. The remaining service functions have been migrated to the new action service.
* Refactor across ACL code for addition/removal of policies during addition/removal of users to organization, making app public, refactor for services like policy utils, item service, etc.
* Removed the last of action repository and action service and replaced with new action repo and new action service.
* Compile and run time issues fixed. The server is coming up without any spring dependency errors.
* WIP in fixing fetching actions by page id.
* Finally!!! Fixed the fetch actions (both published and unpublished actions) by page id repository function.
* Fixed create action bug where null datasource in published actiondto (inside newly created action) leads to error.
* Fixed the execute action issues :
1. Removed the dry runs from the tests
2. Fixed the null pointer error in variable substituted action and datasource configurations.
* 1. Fixed the custom action repository field names.
2. Fixed the data structures used in ExamplesOrganizationClonerTests
* Fixed countByDatasourceId repository function which was querying the actions incorrectly.
* Fixed the clone example organization error where the id of the action was not getting updated in the page correctly. Yay!
* Fixed post merge compilation failure.
* Fixed more compilation time failures in ActionServiceTest
* Fixed failing test case for fetching actions in view mode.
* Minor changes to resolve merge changes and incorporate in the new refactored code.
* 1. Fixed compile time errors on Client code.
2. Fixed fetching of actions in view mode by application id. The repository function did not need name parameter. Removed the same.
* [Integration Testing Error Fix] : Added a new test case for refactor action name.
* Instead of fetching actions in the page, mistakenly used the base service which was fetching all the actions in the repository, barring none which led to the name refactor being blocked even though no action in the current page exists with the new proposed name,
* Added delete functionality to action service.
* Minor code cleanup
* Adding viewMode to action execution
* Replacing action with actionId.
* 1. Bug fix for deletion of unpublished action. In case of never published action, the entire action should be deleted. In case an action was published, only the unpublished action should be deleted.
2. In case of DB actions (external datasources), only the bare minimum fields should be stored inside the action (datasource id and datasource plugin id). The other fields should not be duplicated across code.
* Fixed yarn build compilation issues.
* Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ActionController.java
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* Changed the API path for GET applications in view mode. Some minor code formatting.
* Incorporated review comments.
* Some more unnecessary code removed.
* Instead of returning Page, now the interface object between client and server for Pages is PageDTO
* Migrated Page and Action to PageDTO and ActionDTO
Fixed the compilation issues.
TODO : Fix the test compilation issues.
* Fixed compilation time issues with all the tests by migrating Page and Action to PageDTO and ActionDTO respectively
* Action Controller and Page Controller no longer extend Base Controller. All the required functions have now been implemented and no base line API end points are being re-used from the base.
* Test case fixes.
* Bug Fix : Updating an action was not updating execute on load. Fixed the data flow leading to the error.
* Deprecating Page and Action domain objects. This is to ensure no new code is written with these till we remove this old code.
* Cloned example applications are now published before returning. This is to ensure that the applications are in ready to view mode when the new user signs up.
* Added a function comment to expand on the usage of new param introduced.
* When cloning a page, new actions were not being stored. Added that. Also updated the clonePage test to assert that the actions are also cloned when the pages are cloned.
* Updated a Api call
* removed extra slash
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Satbir Singh <satbir121@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: nandan.anantharamu <nandan@thinkify.io>
2020-10-26 12:34:23 +00:00
|
|
|
cy.wait("@getPagesForViewApp").should(
|
2020-07-20 09:38:35 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-07-15 10:56:18 +00:00
|
|
|
Cypress.Commands.add("AppSetupForRename", () => {
|
|
|
|
|
cy.get(homePage.applicationName).then(($appName) => {
|
|
|
|
|
if (!$appName.hasClass(homePage.editingAppName)) {
|
|
|
|
|
cy.get(homePage.applicationName).click();
|
|
|
|
|
cy.get(homePage.portalMenuItem)
|
|
|
|
|
.contains("Rename", { matchCase: false })
|
|
|
|
|
.click();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-20 09:38:35 +00:00
|
|
|
Cypress.Commands.add("CreateAppForOrg", (orgName, appname) => {
|
|
|
|
|
cy.get(homePage.orgList.concat(orgName).concat(homePage.createAppFrOrg))
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.should("be.visible")
|
2021-02-03 09:22:19 +00:00
|
|
|
.click({ force: true });
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.wait("@createNewApplication").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
2021-07-15 10:56:18 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-07-15 10:56:18 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
|
|
|
|
|
cy.AppSetupForRename();
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.get(homePage.applicationName).type(appname + "{enter}");
|
2021-07-29 08:13:10 +00:00
|
|
|
|
|
|
|
|
cy.get(generatePage.buildFromScratchActionCard).click();
|
|
|
|
|
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.wait("@updateApplication").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2020-07-20 09:38:35 +00:00
|
|
|
});
|
|
|
|
|
|
2021-02-04 11:31:32 +00:00
|
|
|
Cypress.Commands.add("CreateAppInFirstListedOrg", (appname) => {
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.get(homePage.createNew)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.wait("@createNewApplication").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
2020-10-20 07:14:39 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-07-15 10:56:18 +00:00
|
|
|
cy.wait(2000);
|
2020-12-30 07:31:20 +00:00
|
|
|
|
2021-07-15 10:56:18 +00:00
|
|
|
cy.AppSetupForRename();
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.get(homePage.applicationName).type(appname + "{enter}");
|
|
|
|
|
cy.wait("@updateApplication").should(
|
2020-08-12 06:59:27 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2021-07-29 08:13:10 +00:00
|
|
|
|
|
|
|
|
cy.get(generatePage.buildFromScratchActionCard).click();
|
|
|
|
|
|
2021-06-21 11:09:51 +00:00
|
|
|
/* The server created app always has an old dsl so the layout will migrate
|
|
|
|
|
* To avoid race conditions between that update layout and this one
|
|
|
|
|
* we wait for that to finish before updating layout here
|
|
|
|
|
*/
|
|
|
|
|
cy.wait("@updateLayout");
|
2020-05-05 09:08:31 +00:00
|
|
|
});
|
|
|
|
|
|
2021-04-06 13:29:27 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"addOauthAuthDetails",
|
|
|
|
|
(accessTokenUrl, clientId, clientSecret, authURL) => {
|
|
|
|
|
cy.get(datasource.authType).click();
|
|
|
|
|
cy.xpath(datasource.OAuth2).click();
|
|
|
|
|
cy.get(datasource.grantType).click();
|
|
|
|
|
cy.xpath(datasource.authorisecode).click();
|
|
|
|
|
cy.get(datasource.accessTokenUrl).type(accessTokenUrl);
|
|
|
|
|
cy.get(datasource.clienID).type(clientId);
|
|
|
|
|
cy.get(datasource.clientSecret).type(clientSecret);
|
|
|
|
|
cy.get(datasource.authorizationURL).type(authURL);
|
|
|
|
|
cy.xpath('//input[contains(@value,"api/v1/datasources/authorize")]')
|
|
|
|
|
.first()
|
|
|
|
|
.invoke("attr", "value")
|
|
|
|
|
.then((text) => {
|
|
|
|
|
const firstTxt = text;
|
|
|
|
|
cy.log("date time : ", firstTxt);
|
|
|
|
|
const expectedvalue = Cypress.config().baseUrl.concat(
|
|
|
|
|
"api/v1/datasources/authorize",
|
|
|
|
|
);
|
|
|
|
|
expect(firstTxt).to.equal(expectedvalue);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-05-10 11:57:54 +00:00
|
|
|
Cypress.Commands.add("addBasicProfileDetails", (username, password) => {
|
|
|
|
|
cy.get(datasource.authType).click();
|
|
|
|
|
cy.xpath(datasource.basic).click();
|
|
|
|
|
cy.get(datasource.basicUsername).type(username);
|
|
|
|
|
cy.get(datasource.basicPassword).type(password);
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-06 13:29:27 +00:00
|
|
|
Cypress.Commands.add("firestoreDatasourceForm", () => {
|
|
|
|
|
cy.get(datasourceEditor.datasourceConfigUrl).type(
|
|
|
|
|
datasourceFormData["database-url"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.projectID).type(datasourceFormData["projectID"]);
|
|
|
|
|
cy.get(datasourceEditor.serviceAccCredential)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(datasourceFormData["serviceAccCredentials"]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("amazonDatasourceForm", () => {
|
|
|
|
|
cy.get(datasourceEditor.projectID).type(datasourceFormData["access_key"]);
|
|
|
|
|
cy.get(datasourceEditor.serviceAccCredential)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(datasourceFormData["secret_key"]);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("DeleteApp", (appName) => {
|
2020-05-20 11:04:39 +00:00
|
|
|
cy.get(commonlocators.homeIcon).click({ force: true });
|
|
|
|
|
cy.wait("@applications").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
2020-06-10 12:16:50 +00:00
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
cy.wait("@organizations").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
2020-05-20 11:04:39 +00:00
|
|
|
200,
|
|
|
|
|
);
|
2020-05-21 09:45:48 +00:00
|
|
|
cy.get('button span[icon="chevron-down"]').should("be.visible");
|
|
|
|
|
cy.get(homePage.searchInput).type(appName, { force: true });
|
2020-08-18 06:40:11 +00:00
|
|
|
cy.get(homePage.applicationCard).trigger("mouseover");
|
2020-05-21 09:45:48 +00:00
|
|
|
cy.get(homePage.appMoreIcon)
|
|
|
|
|
.should("have.length", 1)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-10-14 10:35:19 +00:00
|
|
|
cy.get(homePage.deleteAppConfirm)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-09-16 11:50:47 +00:00
|
|
|
cy.get(homePage.deleteApp)
|
2020-05-21 09:45:48 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-05-20 11:04:39 +00:00
|
|
|
});
|
|
|
|
|
|
2020-03-27 09:02:11 +00:00
|
|
|
Cypress.Commands.add("LogintoApp", (uname, pword) => {
|
2021-02-03 07:59:00 +00:00
|
|
|
cy.window()
|
|
|
|
|
.its("store")
|
|
|
|
|
.invoke("dispatch", { type: "LOGOUT_USER_INIT" });
|
|
|
|
|
cy.wait("@postLogout");
|
|
|
|
|
|
2020-05-05 12:16:51 +00:00
|
|
|
cy.visit("/user/login");
|
2020-03-27 09:02:11 +00:00
|
|
|
cy.get(loginPage.username).should("be.visible");
|
|
|
|
|
cy.get(loginPage.username).type(uname);
|
|
|
|
|
cy.get(loginPage.password).type(pword);
|
|
|
|
|
cy.get(loginPage.submitBtn).click();
|
2021-07-09 07:11:07 +00:00
|
|
|
cy.wait("@getUser");
|
|
|
|
|
cy.wait("@applications").should(
|
2020-04-17 08:17:25 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2021-07-02 06:04:36 +00:00
|
|
|
initLocalstorage();
|
2020-03-27 09:02:11 +00:00
|
|
|
});
|
2020-06-17 10:47:01 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("LoginFromAPI", (uname, pword) => {
|
|
|
|
|
cy.request({
|
|
|
|
|
method: "POST",
|
|
|
|
|
url: "api/v1/login",
|
|
|
|
|
headers: {
|
|
|
|
|
"content-type": "application/x-www-form-urlencoded",
|
|
|
|
|
},
|
|
|
|
|
followRedirect: false,
|
|
|
|
|
form: true,
|
|
|
|
|
body: {
|
|
|
|
|
username: uname,
|
|
|
|
|
password: pword,
|
|
|
|
|
},
|
2021-01-04 10:16:08 +00:00
|
|
|
}).then((response) => {
|
2020-06-17 10:47:01 +00:00
|
|
|
expect(response.status).equal(302);
|
|
|
|
|
cy.log(response.body);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("DeleteApp", (appName) => {
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.get(commonlocators.homeIcon).click({ force: true });
|
|
|
|
|
cy.get(homePage.searchInput).type(appName);
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.wait(2000);
|
2020-10-31 06:40:51 +00:00
|
|
|
cy.get(homePage.applicationCard)
|
|
|
|
|
.first()
|
|
|
|
|
.trigger("mouseover");
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.get(homePage.appMoreIcon)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-10-14 10:35:19 +00:00
|
|
|
cy.get(homePage.deleteAppConfirm)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-09-16 11:50:47 +00:00
|
|
|
cy.get(homePage.deleteApp)
|
2020-10-14 10:35:19 +00:00
|
|
|
.contains("Are you sure?")
|
2020-09-01 07:16:54 +00:00
|
|
|
.click({ force: true });
|
2020-06-17 10:47:01 +00:00
|
|
|
});
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
Cypress.Commands.add("DeletepageFromSideBar", () => {
|
|
|
|
|
cy.xpath(pages.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(pages.deletePage)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-19 06:13:15 +00:00
|
|
|
Cypress.Commands.add("LogOut", () => {
|
2020-08-03 14:18:48 +00:00
|
|
|
cy.request("POST", "/api/v1/logout");
|
2020-05-19 06:13:15 +00:00
|
|
|
});
|
2020-04-02 04:47:48 +00:00
|
|
|
|
2020-06-17 10:47:01 +00:00
|
|
|
Cypress.Commands.add("NavigateToHome", () => {
|
|
|
|
|
cy.get(commonlocators.homeIcon).click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-10-14 10:35:19 +00:00
|
|
|
cy.wait(1000);
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.wait("@applications").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("NavigateToWidgets", (pageName) => {
|
2020-04-02 04:47:48 +00:00
|
|
|
cy.get(pages.pagesIcon).click({ force: true });
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get(".t--page-sidebar-" + pageName + "")
|
2020-04-08 13:38:19 +00:00
|
|
|
.find(">div")
|
|
|
|
|
.click({ force: true });
|
2020-04-02 04:47:48 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
2020-04-21 14:19:12 +00:00
|
|
|
cy.get(pages.widgetsEditor).click();
|
2020-04-17 08:17:25 +00:00
|
|
|
cy.wait("@getPage");
|
2020-04-02 04:47:48 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("SearchApp", (appname) => {
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get(homePage.searchInput).type(appname);
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.wait(2000);
|
2020-09-17 17:01:01 +00:00
|
|
|
cy.get(homePage.applicationCard)
|
|
|
|
|
.first()
|
|
|
|
|
.trigger("mouseover", { force: true });
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get(homePage.appEditIcon)
|
|
|
|
|
.first()
|
2020-04-21 14:19:12 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get("#loading").should("not.exist");
|
2020-05-01 07:48:33 +00:00
|
|
|
// Wait added because after opening the application editor, sometimes it takes a little time.
|
2020-04-02 04:47:48 +00:00
|
|
|
});
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
Cypress.Commands.add("SearchEntity", (apiname1, apiname2) => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(commonlocators.entityExplorersearch)
|
2021-06-09 12:20:15 +00:00
|
|
|
.clear({ force: true })
|
|
|
|
|
.type(apiname1, { force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-08-20 11:18:10 +00:00
|
|
|
cy.wait(500);
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(
|
|
|
|
|
commonlocators.entitySearchResult.concat(apiname1).concat("')"),
|
|
|
|
|
).should("be.visible");
|
|
|
|
|
cy.get(
|
|
|
|
|
commonlocators.entitySearchResult.concat(apiname2).concat("')"),
|
2021-01-14 05:44:07 +00:00
|
|
|
).should("not.exist");
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("GlobalSearchEntity", (apiname1) => {
|
2021-06-09 12:20:15 +00:00
|
|
|
// entity explorer search will be hidden
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(commonlocators.entityExplorersearch)
|
2021-06-09 12:20:15 +00:00
|
|
|
.clear({ force: true })
|
|
|
|
|
.type(apiname1, { force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-08-20 11:18:10 +00:00
|
|
|
cy.wait(500);
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(
|
|
|
|
|
commonlocators.entitySearchResult.concat(apiname1).concat("')"),
|
|
|
|
|
).should("be.visible");
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("ResponseStatusCheck", (statusCode) => {
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.xpath(apiwidget.responseStatus).should("be.visible");
|
|
|
|
|
cy.xpath(apiwidget.responseStatus).contains(statusCode);
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("ResponseCheck", (textTocheck) => {
|
2020-05-12 13:47:13 +00:00
|
|
|
//Explicit assert
|
2020-06-19 14:32:56 +00:00
|
|
|
cy.get(apiwidget.responseText).should("be.visible");
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
2021-05-10 11:57:54 +00:00
|
|
|
Cypress.Commands.add("ResponseTextCheck", (textTocheck) => {
|
|
|
|
|
cy.ResponseCheck();
|
|
|
|
|
cy.get(apiwidget.responseText).contains(textTocheck);
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-12 13:47:13 +00:00
|
|
|
Cypress.Commands.add("NavigateToAPI_Panel", () => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(pages.addEntityAPI)
|
2020-05-12 13:47:13 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(pages.integrationCreateNew)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
|
|
|
|
});
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
Cypress.Commands.add("NavigateToEntityExplorer", () => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(explorer.entityExplorer)
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
.should("be.visible")
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true });
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("CreateAPI", (apiname) => {
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.createapi).click({ force: true });
|
2020-06-26 13:56:18 +00:00
|
|
|
cy.wait("@createNewApi");
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.resourceUrl).should("be.visible");
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(apiwidget.ApiName).click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.apiTxt)
|
|
|
|
|
.clear()
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
.type(apiname, { force: true })
|
2020-07-03 08:58:58 +00:00
|
|
|
.should("have.value", apiname)
|
|
|
|
|
.blur();
|
2020-07-21 12:05:06 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-06-16 10:23:19 +00:00
|
|
|
// Added because api name edit takes some time to
|
|
|
|
|
// reflect in api sidebar after the call passes.
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-07-06 05:38:39 +00:00
|
|
|
cy.wait(2000);
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
2020-05-20 16:04:37 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("CreateSubsequentAPI", (apiname) => {
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.get(apiwidget.createApiOnSideBar)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.resourceUrl).should("be.visible");
|
2020-06-16 10:23:19 +00:00
|
|
|
// cy.get(ApiEditor.nameOfApi)
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.get(apiwidget.apiTxt)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(apiname)
|
|
|
|
|
.should("have.value", apiname);
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-20 16:04:37 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("EditApiName", (apiname) => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(apiwidget.ApiName).click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.apiTxt)
|
|
|
|
|
.clear()
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
.type(apiname, { force: true })
|
2020-05-12 13:47:13 +00:00
|
|
|
.should("have.value", apiname);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("EditApiNameFromExplorer", (apiname) => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.editName).click({ force: true });
|
|
|
|
|
cy.get(explorer.editNameField)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(apiname, { force: true })
|
2020-08-31 05:56:52 +00:00
|
|
|
.should("have.value", apiname)
|
|
|
|
|
.blur();
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.wait(3000);
|
|
|
|
|
});
|
|
|
|
|
|
2020-09-02 13:13:06 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"EditEntityNameByDoubleClick",
|
|
|
|
|
(entityName, updatedName) => {
|
|
|
|
|
cy.get(explorer.entity)
|
|
|
|
|
.contains(entityName)
|
|
|
|
|
.dblclick({ force: true });
|
|
|
|
|
cy.log(updatedName);
|
|
|
|
|
cy.get(explorer.editEntityField)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(updatedName + "{enter}", { force: true });
|
|
|
|
|
cy.wait("@saveDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2020-06-10 17:42:51 +00:00
|
|
|
Cypress.Commands.add("WaitAutoSave", () => {
|
2020-07-03 08:58:58 +00:00
|
|
|
// wait for save query to trigger
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-07-24 04:31:39 +00:00
|
|
|
cy.wait(2000);
|
2020-07-21 12:05:06 +00:00
|
|
|
cy.wait("@saveAction");
|
2020-06-24 13:52:41 +00:00
|
|
|
//cy.wait("@postExecute");
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("RunAPI", () => {
|
|
|
|
|
cy.get(ApiEditor.ApiRunBtn).click({ force: true });
|
2020-07-24 04:31:39 +00:00
|
|
|
cy.wait("@postExecute");
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("SaveAndRunAPI", () => {
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.RunAPI();
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-23 13:50:55 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"validateRequest",
|
|
|
|
|
(baseurl, path, verb, error = false) => {
|
|
|
|
|
cy.get(".react-tabs__tab")
|
|
|
|
|
.contains("Logs")
|
|
|
|
|
.click();
|
|
|
|
|
|
|
|
|
|
if (!error) {
|
|
|
|
|
cy.get(".object-key")
|
|
|
|
|
.last()
|
|
|
|
|
.contains("request")
|
|
|
|
|
.click();
|
|
|
|
|
}
|
|
|
|
|
cy.get(".string-value").contains(baseurl.concat(path));
|
|
|
|
|
cy.get(".string-value").contains(verb);
|
2021-09-01 09:11:51 +00:00
|
|
|
cy.get("[data-cy=t--tab-body]")
|
|
|
|
|
.first()
|
2021-04-23 13:50:55 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-07-29 06:00:03 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("SelectAction", (action) => {
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.get(ApiEditor.ApiVerb)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.xpath(action)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("ClearSearch", () => {
|
2021-06-09 12:20:15 +00:00
|
|
|
cy.get(commonlocators.entityExplorersearch).clear({ force: true });
|
2020-05-20 16:04:37 +00:00
|
|
|
});
|
|
|
|
|
|
2020-08-20 05:38:08 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"paste",
|
|
|
|
|
{
|
|
|
|
|
prevSubject: true,
|
|
|
|
|
element: true,
|
|
|
|
|
},
|
|
|
|
|
($element, text) => {
|
|
|
|
|
const subString = text.substr(0, text.length - 1);
|
|
|
|
|
const lastChar = text.slice(-1);
|
|
|
|
|
|
|
|
|
|
cy.get(commonlocators.entityExplorersearch)
|
2021-06-09 12:20:15 +00:00
|
|
|
.clear({ force: true })
|
|
|
|
|
.click({ force: true })
|
2020-08-20 05:38:08 +00:00
|
|
|
.then(() => {
|
|
|
|
|
$element.text(subString);
|
|
|
|
|
$element.val(subString);
|
|
|
|
|
cy.get($element).type(lastChar);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("SearchEntityandOpen", (apiname1) => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(commonlocators.entityExplorersearch)
|
2021-06-09 12:20:15 +00:00
|
|
|
.clear({ force: true })
|
|
|
|
|
.type(apiname1, { force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-08-20 11:18:10 +00:00
|
|
|
cy.wait(500);
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(
|
|
|
|
|
commonlocators.entitySearchResult.concat(apiname1).concat("')"),
|
|
|
|
|
).should("be.visible");
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.get(commonlocators.entitySearchResult.concat(apiname1).concat("')"))
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
2020-05-20 16:04:37 +00:00
|
|
|
});
|
2021-09-07 12:48:38 +00:00
|
|
|
Cypress.Commands.add("SearchEntityandDblClick", (apiname1) => {
|
|
|
|
|
cy.get(commonlocators.entityExplorersearch)
|
|
|
|
|
.clear({ force: true })
|
|
|
|
|
.type(apiname1, { force: true });
|
|
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
cy.wait(500);
|
|
|
|
|
cy.get(
|
|
|
|
|
commonlocators.entitySearchResult.concat(apiname1).concat("')"),
|
|
|
|
|
).should("be.visible");
|
|
|
|
|
cy.get(commonlocators.entitySearchResult.concat(apiname1).concat("')"))
|
|
|
|
|
.last()
|
|
|
|
|
.dblclick({ force: true });
|
|
|
|
|
});
|
2020-05-20 16:04:37 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("enterDatasourceAndPath", (datasource, path) => {
|
2021-08-04 12:50:40 +00:00
|
|
|
cy.enterDatasource(datasource + path);
|
2020-05-20 16:04:37 +00:00
|
|
|
});
|
|
|
|
|
|
2021-05-10 11:57:54 +00:00
|
|
|
Cypress.Commands.add("enterDatasource", (datasource) => {
|
|
|
|
|
cy.get(apiwidget.resourceUrl)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
2021-08-04 12:50:40 +00:00
|
|
|
.type(datasource, { parseSpecialCharSequences: false });
|
2021-05-10 11:57:54 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("changeZoomLevel", (zoomValue) => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(commonlocators.changeZoomlevel)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(".t--dropdown-option")
|
2020-11-12 12:04:44 +00:00
|
|
|
.children()
|
|
|
|
|
.contains(zoomValue)
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@updateLayout").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
cy.get(commonlocators.selectedZoomlevel)
|
2021-03-15 12:17:56 +00:00
|
|
|
.last()
|
2020-11-12 12:04:44 +00:00
|
|
|
.invoke("text")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then((text) => {
|
2020-11-12 12:04:44 +00:00
|
|
|
const someText = text;
|
|
|
|
|
expect(someText).to.equal(zoomValue);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
Cypress.Commands.add("changeColumnType", (dataType) => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(commonlocators.changeColType)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(".t--dropdown-option")
|
2021-02-16 10:29:08 +00:00
|
|
|
.children()
|
|
|
|
|
.contains(dataType)
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@updateLayout").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2021-03-15 12:17:56 +00:00
|
|
|
/*
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.get(commonlocators.selectedColType)
|
|
|
|
|
.first()
|
|
|
|
|
.invoke("text")
|
|
|
|
|
.then((text) => {
|
|
|
|
|
const someText = text;
|
|
|
|
|
expect(someText).to.equal(dataType);
|
|
|
|
|
});
|
2021-03-15 12:17:56 +00:00
|
|
|
*/
|
2021-02-16 10:29:08 +00:00
|
|
|
});
|
|
|
|
|
|
2020-05-12 13:47:13 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"EnterSourceDetailsWithHeader",
|
|
|
|
|
(baseUrl, v1method, hKey, hValue) => {
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.enterDatasourceAndPath(baseUrl, v1method);
|
2021-07-08 07:04:47 +00:00
|
|
|
cy.get(apiwidget.headerKey)
|
2020-05-12 13:47:13 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
2021-07-08 07:04:47 +00:00
|
|
|
.type(hKey, { parseSpecialCharSequences: true });
|
|
|
|
|
cy.get(apiwidget.headerValue)
|
2020-05-20 16:04:37 +00:00
|
|
|
.first()
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true })
|
2021-07-08 07:04:47 +00:00
|
|
|
.type(hValue, { parseSpecialCharSequences: true });
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-20 16:04:37 +00:00
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("EditSourceDetail", (baseUrl, v1method) => {
|
|
|
|
|
cy.get(apiwidget.editResourceUrl)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
2020-06-03 05:40:48 +00:00
|
|
|
.clear()
|
|
|
|
|
.type(`{backspace}${baseUrl}`);
|
2020-05-20 16:04:37 +00:00
|
|
|
cy.xpath(apiwidget.autoSuggest)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(ApiEditor.ApiRunBtn).scrollIntoView();
|
2020-06-03 05:40:48 +00:00
|
|
|
cy.get(apiwidget.editResourceUrl)
|
|
|
|
|
.first()
|
2020-05-20 16:04:37 +00:00
|
|
|
.focus()
|
2020-06-03 05:40:48 +00:00
|
|
|
.type(v1method)
|
2020-05-20 16:04:37 +00:00
|
|
|
.should("have.value", v1method);
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-20 16:04:37 +00:00
|
|
|
});
|
|
|
|
|
|
2020-05-27 11:21:11 +00:00
|
|
|
Cypress.Commands.add("switchToPaginationTab", () => {
|
|
|
|
|
cy.get(apiwidget.paginationTab)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("switchToAPIInputTab", () => {
|
|
|
|
|
cy.get(apiwidget.apiInputTab)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-23 12:35:09 +00:00
|
|
|
Cypress.Commands.add("selectDateFormat", (value) => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(".t--property-control-dateformat .bp3-popover-target")
|
|
|
|
|
.last()
|
2021-02-23 12:35:09 +00:00
|
|
|
.click({ force: true });
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(".t--dropdown-option")
|
2021-02-23 12:35:09 +00:00
|
|
|
.children()
|
|
|
|
|
.contains(value)
|
|
|
|
|
.click();
|
|
|
|
|
});
|
|
|
|
|
|
2021-07-15 12:50:01 +00:00
|
|
|
Cypress.Commands.add("selectDropdownValue", (element, value) => {
|
|
|
|
|
cy.get(element)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(".t--dropdown-option")
|
|
|
|
|
.children()
|
|
|
|
|
.contains(value)
|
|
|
|
|
.click();
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-23 12:35:09 +00:00
|
|
|
Cypress.Commands.add("assertDateFormat", () => {
|
|
|
|
|
cy.get(".t--draggable-datepickerwidget2 input")
|
|
|
|
|
.first()
|
|
|
|
|
.invoke("attr", "value")
|
|
|
|
|
.then((text) => {
|
|
|
|
|
const firstTxt = text;
|
|
|
|
|
cy.log("date time : ", firstTxt);
|
|
|
|
|
cy.get(commonlocators.labelTextStyle)
|
|
|
|
|
.first()
|
|
|
|
|
.should("contain", firstTxt);
|
|
|
|
|
cy.get(commonlocators.labelTextStyle)
|
|
|
|
|
.last()
|
|
|
|
|
.invoke("text")
|
|
|
|
|
.then((text) => {
|
|
|
|
|
const secondText = text;
|
|
|
|
|
cy.log("date time : ", secondText);
|
|
|
|
|
expect(firstTxt).not.to.equal(secondText);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("selectPaginationType", (option) => {
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.xpath(option).click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("clickTest", (testbutton) => {
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-07-29 06:00:03 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.wait("@saveAction");
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.get(testbutton)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-07-29 06:00:03 +00:00
|
|
|
cy.wait("@postExecute");
|
2020-05-27 11:21:11 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("enterUrl", (apiname, url, value) => {
|
|
|
|
|
cy.get(url)
|
|
|
|
|
.first()
|
|
|
|
|
.type("{{".concat(apiname).concat(value), {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-20 16:04:37 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"EnterSourceDetailsWithQueryParam",
|
|
|
|
|
(baseUrl, v1method, hKey, hValue, qKey, qValue) => {
|
|
|
|
|
cy.enterDatasourceAndPath(baseUrl, v1method);
|
2021-07-08 07:04:47 +00:00
|
|
|
cy.get(apiwidget.headerKey)
|
2020-05-20 16:04:37 +00:00
|
|
|
.first()
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true })
|
2021-07-08 07:04:47 +00:00
|
|
|
.type(hKey, { parseSpecialCharSequences: true });
|
|
|
|
|
cy.get(apiwidget.headerValue)
|
2020-05-20 16:04:37 +00:00
|
|
|
.first()
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true })
|
2021-07-08 07:04:47 +00:00
|
|
|
.type(hValue, { parseSpecialCharSequences: true });
|
|
|
|
|
cy.get(apiwidget.queryKey)
|
2020-05-20 16:04:37 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(qKey, { force: true })
|
|
|
|
|
.should("have.value", qKey);
|
2021-07-08 07:04:47 +00:00
|
|
|
cy.get(apiwidget.queryValue)
|
2020-05-20 16:04:37 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(qValue, { force: true })
|
|
|
|
|
.should("have.value", qValue);
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-12 13:47:13 +00:00
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2020-05-20 16:04:37 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"EnterSourceDetailsWithbody",
|
|
|
|
|
(baseUrl, v1method, hKey, hValue) => {
|
|
|
|
|
cy.enterDatasourceAndPath(baseUrl, v1method);
|
|
|
|
|
cy.get(apiwidget.addHeader)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ first: true });
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("CreationOfUniqueAPIcheck", (apiname) => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(pages.addEntityAPI).click();
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(pages.integrationCreateNew)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.createapi).click({ force: true });
|
2020-06-16 10:23:19 +00:00
|
|
|
cy.wait("@createNewApi");
|
|
|
|
|
// cy.wait("@getUser");
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.resourceUrl).should("be.visible");
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(apiwidget.ApiName).click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.apiTxt)
|
|
|
|
|
.clear()
|
2021-06-29 11:31:53 +00:00
|
|
|
.focus()
|
|
|
|
|
.type(apiname, { force: true, delay: 500 })
|
|
|
|
|
.should("have.value", apiname);
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.get(".error-message").should(($x) => {
|
2020-06-19 14:32:56 +00:00
|
|
|
expect($x).contain(apiname.concat(" is already being used."));
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.get(apiwidget.apiTxt).blur();
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("MoveAPIToHome", (apiname) => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true });
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(apiwidget.copyTo).click({ force: true });
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.get(apiwidget.home).click({ force: true });
|
|
|
|
|
cy.wait("@createNewApi").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("MoveAPIToPage", (pageName) => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
2020-05-27 11:21:11 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.moveTo).click({ force: true });
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(apiwidget.page)
|
|
|
|
|
.contains(pageName)
|
|
|
|
|
.click();
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.wait("@moveAction").should(
|
2020-05-27 11:21:11 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
2020-08-20 05:38:08 +00:00
|
|
|
200,
|
2020-05-27 11:21:11 +00:00
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("copyEntityToPage", (pageName) => {
|
2020-09-02 13:13:06 +00:00
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.copyTo).click({ force: true });
|
|
|
|
|
cy.get(apiwidget.page)
|
|
|
|
|
.contains(pageName)
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@createNewApi").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
Cypress.Commands.add("CopyAPIToHome", () => {
|
|
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
2020-05-12 13:47:13 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.copyTo).click({ force: true });
|
|
|
|
|
cy.get(apiwidget.home).click({ force: true });
|
|
|
|
|
cy.wait("@createNewApi").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-23 09:38:31 +00:00
|
|
|
Cypress.Commands.add("RenameEntity", (value) => {
|
|
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.renameEntity).click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-23 09:38:31 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get(explorer.editEntity)
|
|
|
|
|
.last()
|
|
|
|
|
.type(value, { force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-23 09:38:31 +00:00
|
|
|
cy.wait(3000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("CreateApiAndValidateUniqueEntityName", (apiname) => {
|
|
|
|
|
cy.get(apiwidget.createapi).click({ force: true });
|
|
|
|
|
cy.wait("@createNewApi");
|
|
|
|
|
cy.get(apiwidget.resourceUrl).should("be.visible");
|
|
|
|
|
cy.get(apiwidget.ApiName).click({ force: true });
|
|
|
|
|
cy.get(apiwidget.apiTxt)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(apiname, { force: true })
|
|
|
|
|
.should("have.value", apiname);
|
|
|
|
|
cy.get(".t--nameOfApi .error-message").should(($x) => {
|
|
|
|
|
expect($x).contain(apiname.concat(" is already being used."));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("validateMessage", (value) => {
|
|
|
|
|
cy.get(".bp3-popover-content").should(($x) => {
|
|
|
|
|
expect($x).contain(value.concat(" is already being used."));
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
Cypress.Commands.add("DeleteAPIFromSideBar", () => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.deleteEntity();
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.wait("@deleteAction").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-08-20 05:38:08 +00:00
|
|
|
Cypress.Commands.add("DeleteWidgetFromSideBar", () => {
|
|
|
|
|
cy.deleteEntity();
|
|
|
|
|
cy.wait("@updateLayout").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("deleteEntity", () => {
|
|
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(apiwidget.delete).click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("DeleteAPI", (apiname) => {
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.get(ApiEditor.ApiActionMenu)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.get(apiwidget.deleteAPI)
|
2020-05-12 13:47:13 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.wait("@deleteAction").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
2020-05-12 13:47:13 +00:00
|
|
|
});
|
|
|
|
|
|
2021-06-22 17:56:45 +00:00
|
|
|
Cypress.Commands.add("AddActionWithModal", () => {
|
|
|
|
|
cy.get(commonlocators.dropdownSelectButton)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(".single-select")
|
|
|
|
|
.contains("Open Modal")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(modalWidgetPage.selectModal).click();
|
|
|
|
|
cy.get(modalWidgetPage.createModalButton).click({ force: true });
|
|
|
|
|
cy.get(commonlocators.editPropCrossButton).click({ force: true });
|
|
|
|
|
});
|
2020-05-01 07:48:33 +00:00
|
|
|
|
2021-09-20 17:06:13 +00:00
|
|
|
Cypress.Commands.add("createModal", (ModalName) => {
|
2021-06-15 10:19:30 +00:00
|
|
|
cy.get(widgetsPage.actionSelect)
|
|
|
|
|
.first()
|
2021-03-15 12:17:56 +00:00
|
|
|
.click({ force: true });
|
2021-06-15 10:19:30 +00:00
|
|
|
cy.selectOnClickOption("Open Modal");
|
2020-05-08 09:01:11 +00:00
|
|
|
cy.get(modalWidgetPage.selectModal).click();
|
|
|
|
|
cy.get(modalWidgetPage.createModalButton).click({ force: true });
|
|
|
|
|
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-05-08 09:01:11 +00:00
|
|
|
|
|
|
|
|
// changing the model name verify
|
|
|
|
|
cy.widgetText(
|
|
|
|
|
ModalName,
|
|
|
|
|
modalWidgetPage.modalName,
|
|
|
|
|
modalWidgetPage.modalName,
|
|
|
|
|
);
|
2021-03-29 15:47:22 +00:00
|
|
|
cy.get(commonlocators.editPropCrossButton).click({ force: true });
|
2020-05-28 06:37:47 +00:00
|
|
|
|
|
|
|
|
//changing the Model label
|
|
|
|
|
cy.get(modalWidgetPage.modalWidget + " " + widgetsPage.textWidget)
|
|
|
|
|
.first()
|
|
|
|
|
.trigger("mouseover");
|
|
|
|
|
|
|
|
|
|
cy.get(widgetsPage.textWidget + " " + commonlocators.editIcon).click();
|
|
|
|
|
cy.testCodeMirror(ModalName);
|
2021-04-01 08:30:33 +00:00
|
|
|
cy.get(widgetsPage.textCenterAlign).click({ force: true });
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-08-12 14:48:49 +00:00
|
|
|
cy.get(".bp3-overlay-backdrop").click({ force: true });
|
2020-05-08 09:01:11 +00:00
|
|
|
});
|
|
|
|
|
|
2021-06-15 10:19:30 +00:00
|
|
|
Cypress.Commands.add("selectOnClickOption", (option) => {
|
2021-08-04 12:50:40 +00:00
|
|
|
cy.get(".bp3-popover-content", { timeout: 10000 }).should("be.visible");
|
|
|
|
|
cy.get("ul.bp3-menu div.bp3-fill", { timeout: 10000 })
|
|
|
|
|
.should("be.visible")
|
2021-06-15 10:19:30 +00:00
|
|
|
.contains(option)
|
2021-08-04 12:50:40 +00:00
|
|
|
.should("be.visible")
|
2021-06-15 10:19:30 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("CheckWidgetProperties", (checkboxCss) => {
|
2020-05-28 06:37:47 +00:00
|
|
|
cy.get(checkboxCss).check({
|
2020-05-08 09:01:11 +00:00
|
|
|
force: true,
|
|
|
|
|
});
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-05-08 09:01:11 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("UncheckWidgetProperties", (checkboxCss) => {
|
2020-05-28 06:37:47 +00:00
|
|
|
cy.get(checkboxCss).uncheck({
|
2020-05-08 09:01:11 +00:00
|
|
|
force: true,
|
|
|
|
|
});
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-05-08 09:01:11 +00:00
|
|
|
});
|
|
|
|
|
|
2021-06-15 10:19:30 +00:00
|
|
|
Cypress.Commands.add("EditWidgetPropertiesUsingJS", (checkboxCss, inputJS) => {
|
2021-08-04 12:50:40 +00:00
|
|
|
cy.get(checkboxCss, { timeout: 10000 })
|
|
|
|
|
.last()
|
2021-09-07 13:41:36 +00:00
|
|
|
.should("exist")
|
2021-08-04 12:50:40 +00:00
|
|
|
.dblclick({ force: true })
|
2021-06-15 10:19:30 +00:00
|
|
|
.type(inputJS);
|
|
|
|
|
cy.assertPageSave();
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-08 09:01:11 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"ChangeTextStyle",
|
|
|
|
|
(dropDownValue, textStylecss, labelName) => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(commonlocators.dropDownIcon)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(".t--dropdown-option")
|
2020-05-08 09:01:11 +00:00
|
|
|
.children()
|
|
|
|
|
.contains(dropDownValue)
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(textStylecss).should("have.text", labelName);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("widgetText", (text, inputcss, innercss) => {
|
|
|
|
|
cy.get(commonlocators.editWidgetName)
|
2020-10-21 04:25:32 +00:00
|
|
|
.click({ force: true })
|
2021-01-07 05:07:17 +00:00
|
|
|
.type(text, { delay: 300 })
|
2020-05-08 09:01:11 +00:00
|
|
|
.type("{enter}");
|
|
|
|
|
cy.get(inputcss)
|
|
|
|
|
.first()
|
|
|
|
|
.trigger("mouseover", { force: true });
|
2021-05-18 13:54:40 +00:00
|
|
|
cy.contains(innercss, text);
|
2020-05-08 09:01:11 +00:00
|
|
|
});
|
|
|
|
|
|
2021-09-07 12:48:38 +00:00
|
|
|
Cypress.Commands.add("verifyWidgetText", (text, inputcss, innercss) => {
|
|
|
|
|
cy.get(inputcss)
|
|
|
|
|
.first()
|
|
|
|
|
.trigger("mouseover", { force: true });
|
|
|
|
|
cy.contains(innercss, text);
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
Cypress.Commands.add("editColName", (text) => {
|
|
|
|
|
cy.get(commonlocators.editColTitle)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type(text)
|
|
|
|
|
.type("{enter}");
|
|
|
|
|
cy.get(commonlocators.editColText).should("have.text", text);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("invalidWidgetText", () => {
|
|
|
|
|
// checking invalid widget name
|
|
|
|
|
cy.get(commonlocators.editWidgetName)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.type("download")
|
|
|
|
|
.type("{enter}");
|
|
|
|
|
cy.get(commonlocators.toastmsg).contains("download is already being used.");
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("EvaluateDataType", (dataType) => {
|
2020-07-11 06:42:53 +00:00
|
|
|
cy.get(commonlocators.evaluatedType)
|
2021-07-26 05:50:46 +00:00
|
|
|
.first()
|
2020-07-11 06:42:53 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.contains(dataType);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("EvaluateCurrentValue", (currentValue) => {
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-07-27 11:14:06 +00:00
|
|
|
cy.wait(2000);
|
2020-07-11 06:42:53 +00:00
|
|
|
cy.get(commonlocators.evaluatedCurrentValue)
|
2021-07-26 05:50:46 +00:00
|
|
|
.first()
|
2020-07-11 06:42:53 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.contains(currentValue);
|
|
|
|
|
});
|
|
|
|
|
|
2020-03-27 09:02:11 +00:00
|
|
|
Cypress.Commands.add("PublishtheApp", () => {
|
2020-05-26 12:22:29 +00:00
|
|
|
cy.server();
|
|
|
|
|
cy.route("POST", "/api/v1/applications/publish/*").as("publishApp");
|
2020-07-11 06:42:53 +00:00
|
|
|
// Wait before publish
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-07-11 06:42:53 +00:00
|
|
|
cy.wait(2000);
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-12-30 07:31:20 +00:00
|
|
|
|
|
|
|
|
// Stubbing window.open to open in the same tab
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.window().then((window) => {
|
|
|
|
|
cy.stub(window, "open").callsFake((url) => {
|
2020-12-30 07:31:20 +00:00
|
|
|
window.location.href = Cypress.config().baseUrl + url.substring(1);
|
|
|
|
|
window.location.target = "_self";
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2020-03-27 09:02:11 +00:00
|
|
|
cy.get(homePage.publishButton).click();
|
2020-04-17 08:17:25 +00:00
|
|
|
cy.wait("@publishApp");
|
2020-12-30 07:31:20 +00:00
|
|
|
|
2020-05-21 09:45:48 +00:00
|
|
|
cy.url().should("include", "/pages");
|
|
|
|
|
cy.log("pagename: " + localStorage.getItem("PageName"));
|
2020-04-17 08:17:25 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("getCodeMirror", () => {
|
|
|
|
|
return cy
|
|
|
|
|
.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.focus()
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}");
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("testCodeMirror", (value) => {
|
2020-04-17 08:17:25 +00:00
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.focus()
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then(($cm) => {
|
2020-04-17 08:17:25 +00:00
|
|
|
if ($cm.val() !== "") {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.should("have.value", value);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("updateComputedValue", (value) => {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.focus({ force: true })
|
|
|
|
|
.type("{uparrow}", { force: true })
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}", { force: true });
|
|
|
|
|
cy.focused().then(($cm) => {
|
|
|
|
|
if ($cm.contents != "") {
|
|
|
|
|
cy.log("The field is empty");
|
2020-05-15 12:20:09 +00:00
|
|
|
cy.get(".CodeMirror textarea")
|
2020-04-17 08:17:25 +00:00
|
|
|
.first()
|
2021-02-16 10:29:08 +00:00
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(1000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("testCodeMirrorLast", (value) => {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.focus()
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}")
|
|
|
|
|
.then(($cm) => {
|
|
|
|
|
if ($cm.val() !== "") {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.clear({ force: true })
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(200);
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
2020-05-15 12:20:09 +00:00
|
|
|
.should("have.value", value);
|
2020-04-17 08:17:25 +00:00
|
|
|
});
|
2020-03-27 09:02:11 +00:00
|
|
|
});
|
2020-05-01 07:48:33 +00:00
|
|
|
|
2021-03-03 05:04:52 +00:00
|
|
|
Cypress.Commands.add("testJsontext", (endp, value, paste = true) => {
|
2020-05-15 12:20:09 +00:00
|
|
|
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.focus({ force: true })
|
2020-06-17 10:19:56 +00:00
|
|
|
.type("{uparrow}", { force: true })
|
2020-05-15 12:20:09 +00:00
|
|
|
.type("{ctrl}{shift}{downarrow}", { force: true });
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.focused().then(($cm) => {
|
2020-05-20 10:07:53 +00:00
|
|
|
if ($cm.contents != "") {
|
|
|
|
|
cy.log("The field is empty");
|
2020-05-28 10:35:54 +00:00
|
|
|
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
|
2020-05-15 12:20:09 +00:00
|
|
|
.first()
|
2021-02-16 10:29:08 +00:00
|
|
|
.click({ force: true })
|
|
|
|
|
.focused({ force: true })
|
2020-06-17 10:19:56 +00:00
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
2020-05-15 12:20:09 +00:00
|
|
|
}
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(500);
|
2020-05-28 10:35:54 +00:00
|
|
|
cy.get(".t--property-control-" + endp + " .CodeMirror textarea")
|
2020-05-15 12:20:09 +00:00
|
|
|
.first()
|
2021-03-03 05:04:52 +00:00
|
|
|
.then((el) => {
|
|
|
|
|
const input = cy.get(el);
|
|
|
|
|
if (paste) {
|
|
|
|
|
input.invoke("val", value);
|
|
|
|
|
} else {
|
|
|
|
|
input.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
|
|
|
|
}
|
2020-05-15 12:20:09 +00:00
|
|
|
});
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-01-21 11:08:18 +00:00
|
|
|
cy.wait(1000);
|
2020-05-15 12:20:09 +00:00
|
|
|
});
|
|
|
|
|
|
2021-09-07 12:48:38 +00:00
|
|
|
Cypress.Commands.add("selectColor", (GivenProperty) => {
|
|
|
|
|
// Property pane of the widget is opened, and click given property.
|
|
|
|
|
cy.get(
|
|
|
|
|
".t--property-control-" + GivenProperty + " .bp3-input-group input",
|
|
|
|
|
).click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get(widgetsPage.colorsAvailable)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
Cypress.Commands.add("toggleJsAndUpdate", (endp, value) => {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.focus({ force: true })
|
|
|
|
|
.type("{uparrow}", { force: true })
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}", { force: true });
|
|
|
|
|
cy.focused().then(($cm) => {
|
|
|
|
|
if ($cm.contents != "") {
|
|
|
|
|
cy.log("The field is empty");
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(200);
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-05 11:55:27 +00:00
|
|
|
Cypress.Commands.add("assertControlVisibility", (endp, value) => {
|
|
|
|
|
cy.get(".t--property-control-" + endp + " .CodeMirror")
|
2021-02-16 10:29:08 +00:00
|
|
|
.first()
|
|
|
|
|
.should("not.be.visible");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("tableColumnDataValidation", (columnName) => {
|
2021-03-29 15:47:22 +00:00
|
|
|
cy.get("[data-rbd-draggable-id='" + columnName + "'] input")
|
2021-03-19 05:49:54 +00:00
|
|
|
.scrollIntoView()
|
2021-02-16 10:29:08 +00:00
|
|
|
.first()
|
|
|
|
|
.focus({ force: true })
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("tableColumnPopertyUpdate", (colId, newColName) => {
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] input")
|
2021-03-19 05:49:54 +00:00
|
|
|
.scrollIntoView()
|
2021-02-16 10:29:08 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] input").clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] input").type(newColName, {
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get(".draggable-header ")
|
|
|
|
|
.contains(newColName)
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("hideColumn", (colId) => {
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] .t--show-column-btn").click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(1000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("showColumn", (colId) => {
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] .t--show-column-btn").click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get(".draggable-header ")
|
|
|
|
|
.contains(colId)
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-21 07:34:23 +00:00
|
|
|
Cypress.Commands.add("makeColumnVisible", (colId) => {
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] .t--show-column-btn").click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.wait(1000);
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
Cypress.Commands.add("addColumn", (colId) => {
|
|
|
|
|
cy.get(widgetsPage.addColumn).scrollIntoView();
|
|
|
|
|
cy.get(widgetsPage.addColumn)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(3000);
|
|
|
|
|
cy.get(widgetsPage.defaultColName).clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
cy.get(widgetsPage.defaultColName).type(colId, { force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("editColumn", (colId) => {
|
|
|
|
|
cy.get("[data-rbd-draggable-id='" + colId + "'] .t--edit-column-btn").click();
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(1500);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"readTabledataValidateCSS",
|
|
|
|
|
(rowNum, colNum, cssProperty, cssValue) => {
|
|
|
|
|
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`;
|
|
|
|
|
cy.get(selector).should("have.css", cssProperty, cssValue);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-04-20 08:59:52 +00:00
|
|
|
Cypress.Commands.add("readTextDataValidateCSS", (cssProperty, cssValue) => {
|
|
|
|
|
cy.get(commonlocators.headingTextStyle).should(
|
|
|
|
|
"have.css",
|
|
|
|
|
cssProperty,
|
|
|
|
|
cssValue,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-03 06:26:46 +00:00
|
|
|
Cypress.Commands.add("evaluateErrorMessage", (value) => {
|
|
|
|
|
cy.get(commonlocators.evaluateMsg)
|
|
|
|
|
.first()
|
|
|
|
|
.click()
|
|
|
|
|
.invoke("text")
|
|
|
|
|
.then((text) => {
|
|
|
|
|
const someText = text;
|
|
|
|
|
expect(someText).to.equal(value);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-02-25 07:19:23 +00:00
|
|
|
Cypress.Commands.add("addAction", (value) => {
|
|
|
|
|
cy.get(commonlocators.dropdownSelectButton)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(commonlocators.chooseAction)
|
|
|
|
|
.children()
|
|
|
|
|
.contains("Show Message")
|
|
|
|
|
.click();
|
|
|
|
|
cy.enterActionValue(value);
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-21 07:34:23 +00:00
|
|
|
Cypress.Commands.add("onTableAction", (value, value1, value2) => {
|
|
|
|
|
cy.get(commonlocators.dropdownSelectButton)
|
|
|
|
|
.eq(value)
|
|
|
|
|
.click();
|
|
|
|
|
cy.get(commonlocators.chooseAction)
|
|
|
|
|
.children()
|
|
|
|
|
.contains("Show Message")
|
|
|
|
|
.click();
|
|
|
|
|
cy.testJsontext(value1, value2);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("selectShowMsg", () => {
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.get(commonlocators.chooseAction)
|
|
|
|
|
.children()
|
|
|
|
|
.contains("Show Message")
|
|
|
|
|
.click();
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("addSuccessMessage", (value) => {
|
2020-10-14 05:19:08 +00:00
|
|
|
cy.get(commonlocators.chooseMsgType)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.get(commonlocators.chooseAction)
|
|
|
|
|
.children()
|
|
|
|
|
.contains("Success")
|
|
|
|
|
.click();
|
2020-10-16 08:47:54 +00:00
|
|
|
cy.enterActionValue(value);
|
|
|
|
|
});
|
2021-02-25 07:19:23 +00:00
|
|
|
|
2020-10-16 08:47:54 +00:00
|
|
|
Cypress.Commands.add("SetDateToToday", () => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(formWidgetsPage.datepickerFooterPublish)
|
2020-10-16 08:47:54 +00:00
|
|
|
.contains("Today")
|
2021-03-15 12:17:56 +00:00
|
|
|
.click({ force: true });
|
2020-10-16 08:47:54 +00:00
|
|
|
cy.assertPageSave();
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("enterActionValue", (value) => {
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.focus()
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then(($cm) => {
|
2020-10-12 12:43:35 +00:00
|
|
|
if ($cm.val() !== "") {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
2020-10-16 08:47:54 +00:00
|
|
|
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.last()
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.wait(200);
|
|
|
|
|
});
|
|
|
|
|
});
|
2020-05-08 09:01:11 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("enterNavigatePageName", (value) => {
|
2020-11-27 05:00:53 +00:00
|
|
|
cy.get("ul.tree")
|
|
|
|
|
.children()
|
|
|
|
|
.first()
|
|
|
|
|
.within(() => {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.focus()
|
|
|
|
|
.type("{ctrl}{shift}{downarrow}")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then(($cm) => {
|
2020-11-27 05:00:53 +00:00
|
|
|
if ($cm.val() !== "") {
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.clear({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.type(value, {
|
|
|
|
|
force: true,
|
|
|
|
|
parseSpecialCharSequences: false,
|
|
|
|
|
});
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-11-27 05:00:53 +00:00
|
|
|
cy.wait(200);
|
|
|
|
|
cy.get(".CodeMirror textarea")
|
|
|
|
|
.first()
|
|
|
|
|
.should("have.value", value);
|
|
|
|
|
});
|
|
|
|
|
cy.root();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-28 06:37:47 +00:00
|
|
|
Cypress.Commands.add("ClearDate", () => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(".t--property-control-defaultdate input").clear();
|
2020-08-07 06:56:47 +00:00
|
|
|
cy.assertPageSave();
|
2020-05-28 06:37:47 +00:00
|
|
|
});
|
|
|
|
|
|
2021-03-15 12:17:56 +00:00
|
|
|
Cypress.Commands.add("ClearDateFooter", () => {
|
|
|
|
|
cy.get(formWidgetsPage.datepickerFooterPublish)
|
|
|
|
|
.contains("Clear")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
//cy.assertPageSave();
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-01 07:48:33 +00:00
|
|
|
Cypress.Commands.add("DeleteModal", () => {
|
|
|
|
|
cy.get(widgetsPage.textbuttonWidget).dblclick("topRight", { force: true });
|
|
|
|
|
cy.get(widgetsPage.deleteWidget)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("Createpage", (Pagename) => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(pages.AddPage)
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
.first()
|
|
|
|
|
.click();
|
|
|
|
|
cy.wait("@createPage").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.xpath(pages.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(pages.editName).click({ force: true });
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get(pages.editInput)
|
|
|
|
|
.type(Pagename)
|
|
|
|
|
.type("{Enter}");
|
2020-05-27 11:21:11 +00:00
|
|
|
pageidcopy = Pagename;
|
2021-07-29 08:13:10 +00:00
|
|
|
cy.get(generatePage.buildFromScratchActionCard).click();
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get("#loading").should("not.exist");
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("Deletepage", (Pagename) => {
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.get(pages.pagesIcon).click({ force: true });
|
|
|
|
|
cy.get(".t--page-sidebar-" + Pagename + "");
|
|
|
|
|
cy.get(
|
|
|
|
|
".t--page-sidebar-" +
|
2020-12-23 11:28:29 +00:00
|
|
|
Pagename +
|
|
|
|
|
">.t--page-sidebar-menu-actions>.bp3-popover-target",
|
2020-05-01 07:48:33 +00:00
|
|
|
).click({ force: true });
|
|
|
|
|
cy.get(pages.Menuaction).click({ force: true });
|
|
|
|
|
cy.get(pages.Delete).click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("generateUUID", () => {
|
|
|
|
|
const uuid = require("uuid");
|
|
|
|
|
const id = uuid.v4();
|
2020-09-16 11:50:47 +00:00
|
|
|
return id.split("-")[0];
|
2020-05-01 07:48:33 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("addDsl", (dsl) => {
|
2020-05-01 07:48:33 +00:00
|
|
|
let currentURL;
|
|
|
|
|
let pageid;
|
|
|
|
|
let layoutId;
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.url().then((url) => {
|
2020-05-01 07:48:33 +00:00
|
|
|
currentURL = url;
|
|
|
|
|
const myRegexp = /pages(.*)/;
|
|
|
|
|
const match = myRegexp.exec(currentURL);
|
|
|
|
|
pageid = match[1].split("/")[1];
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.log(pageidcopy + "page id copy");
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.log(pageid + "page id");
|
|
|
|
|
//Fetch the layout id
|
|
|
|
|
cy.server();
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.request("GET", "api/v1/pages/" + pageid).then((response) => {
|
2021-06-21 11:09:51 +00:00
|
|
|
const respBody = JSON.stringify(response.body);
|
|
|
|
|
layoutId = JSON.parse(respBody).data.layouts[0].id;
|
|
|
|
|
// Dumping the DSL to the created page
|
2020-05-01 07:48:33 +00:00
|
|
|
cy.request(
|
|
|
|
|
"PUT",
|
2020-05-14 05:10:36 +00:00
|
|
|
"api/v1/layouts/" + layoutId + "/pages/" + pageid,
|
2020-05-01 07:48:33 +00:00
|
|
|
dsl,
|
2021-01-04 10:16:08 +00:00
|
|
|
).then((response) => {
|
2021-06-21 11:09:51 +00:00
|
|
|
cy.log(response.body);
|
2020-05-01 07:48:33 +00:00
|
|
|
expect(response.status).equal(200);
|
|
|
|
|
cy.reload();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
2020-05-08 05:40:14 +00:00
|
|
|
|
2020-05-12 04:35:21 +00:00
|
|
|
Cypress.Commands.add("DeleteAppByApi", () => {
|
|
|
|
|
let currentURL;
|
|
|
|
|
let appId;
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.url().then((url) => {
|
2020-05-12 04:35:21 +00:00
|
|
|
currentURL = url;
|
|
|
|
|
const myRegexp = /applications(.*)/;
|
|
|
|
|
const match = myRegexp.exec(currentURL);
|
2020-10-19 13:34:55 +00:00
|
|
|
appId = match ? match[1].split("/")[1] : null;
|
2020-05-20 11:04:39 +00:00
|
|
|
|
|
|
|
|
if (appId != null) {
|
|
|
|
|
cy.log(appId + "appId");
|
2020-08-03 14:18:48 +00:00
|
|
|
cy.request("DELETE", "api/v1/applications/" + appId);
|
2020-05-20 11:04:39 +00:00
|
|
|
}
|
2020-05-12 04:35:21 +00:00
|
|
|
});
|
|
|
|
|
});
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("togglebar", (value) => {
|
2020-06-17 10:19:56 +00:00
|
|
|
cy.get(value)
|
|
|
|
|
.check({ force: true })
|
|
|
|
|
.should("be.checked");
|
|
|
|
|
});
|
|
|
|
|
Cypress.Commands.add("radiovalue", (value, value2) => {
|
|
|
|
|
cy.get(value)
|
|
|
|
|
.click()
|
|
|
|
|
.clear()
|
|
|
|
|
.type(value2);
|
|
|
|
|
});
|
|
|
|
|
Cypress.Commands.add("optionValue", (value, value2) => {
|
|
|
|
|
cy.get(value)
|
|
|
|
|
.click()
|
|
|
|
|
.clear()
|
|
|
|
|
.type(value2);
|
|
|
|
|
});
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("dropdownDynamic", (text) => {
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2020-06-17 10:19:56 +00:00
|
|
|
cy.wait(2000);
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get("ul.bp3-menu")
|
|
|
|
|
.contains(text)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.should("have.text", text);
|
|
|
|
|
});
|
|
|
|
|
|
2021-08-03 06:38:01 +00:00
|
|
|
Cypress.Commands.add("dropdownMultiSelectDynamic", (text) => {
|
|
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get(".multi-select-dropdown")
|
|
|
|
|
.contains(text)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.should("have.text", text);
|
|
|
|
|
});
|
2021-09-17 09:08:35 +00:00
|
|
|
Cypress.Commands.add("treeSelectDropdown", (text) => {
|
|
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get(".tree-select-dropdown")
|
|
|
|
|
.contains(text)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.should("have.text", text);
|
|
|
|
|
});
|
2021-08-03 06:38:01 +00:00
|
|
|
|
2021-03-15 12:17:56 +00:00
|
|
|
Cypress.Commands.add("dropdownDynamicUpdated", (text) => {
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.get(commonlocators.dropdownmenu)
|
2020-06-17 10:19:56 +00:00
|
|
|
.contains(text)
|
2021-08-10 07:59:05 +00:00
|
|
|
.click({ force: true });
|
|
|
|
|
cy.xpath(commonlocators.dropDownOptSelected).should("have.text", text);
|
2020-06-17 10:19:56 +00:00
|
|
|
});
|
2021-03-15 12:17:56 +00:00
|
|
|
|
2021-02-16 10:29:08 +00:00
|
|
|
Cypress.Commands.add("selectTextSize", (text) => {
|
2021-03-15 12:17:56 +00:00
|
|
|
cy.get(".t--dropdown-option")
|
2021-02-16 10:29:08 +00:00
|
|
|
.first()
|
|
|
|
|
.contains(text)
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("getAlert", (alertcss) => {
|
|
|
|
|
cy.get(commonlocators.dropdownSelectButton).click({ force: true });
|
|
|
|
|
cy.get(widgetsPage.menubar)
|
|
|
|
|
.contains("Show Alert")
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.should("have.text", "Show Alert");
|
|
|
|
|
|
|
|
|
|
cy.get(alertcss)
|
|
|
|
|
.click({ force: true })
|
2021-07-07 03:46:16 +00:00
|
|
|
.type("hello");
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.get(".t--open-dropdown-Select-type").click({ force: true });
|
|
|
|
|
cy.get(".bp3-popover-content .bp3-menu li")
|
|
|
|
|
.contains("Success")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
2020-06-17 10:19:56 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("togglebar", (value) => {
|
2020-05-16 07:28:13 +00:00
|
|
|
cy.get(value)
|
|
|
|
|
.check({ force: true })
|
|
|
|
|
.should("be.checked");
|
|
|
|
|
});
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("togglebarDisable", (value) => {
|
2020-05-26 12:22:29 +00:00
|
|
|
cy.get(value)
|
|
|
|
|
.uncheck({ force: true })
|
|
|
|
|
.should("not.checked");
|
|
|
|
|
});
|
2020-05-16 07:28:13 +00:00
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"getAlert",
|
|
|
|
|
(alertcss, propertyControl = commonlocators.dropdownSelectButton) => {
|
|
|
|
|
cy.get(propertyControl)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(widgetsPage.menubar)
|
|
|
|
|
.contains("Show Message")
|
2021-03-17 09:36:08 +00:00
|
|
|
.click({ force: true });
|
2020-05-16 07:28:13 +00:00
|
|
|
|
2021-02-11 06:36:07 +00:00
|
|
|
cy.get(alertcss)
|
|
|
|
|
.click({ force: true })
|
2021-07-07 03:46:16 +00:00
|
|
|
.type("hello");
|
2021-02-11 06:36:07 +00:00
|
|
|
cy.get(".t--open-dropdown-Select-type").click({ force: true });
|
|
|
|
|
cy.get(".bp3-popover-content .bp3-menu li")
|
|
|
|
|
.contains("Success")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-10-21 04:25:32 +00:00
|
|
|
|
2021-06-15 10:19:30 +00:00
|
|
|
Cypress.Commands.add("addQueryFromLightningMenu", (QueryName) => {
|
2021-01-27 09:07:33 +00:00
|
|
|
cy.get(commonlocators.dropdownSelectButton)
|
2021-06-15 10:19:30 +00:00
|
|
|
.first()
|
2021-01-27 09:07:33 +00:00
|
|
|
.click({ force: true })
|
2021-07-07 03:46:16 +00:00
|
|
|
.selectOnClickOption("Execute a Query")
|
2021-06-15 10:19:30 +00:00
|
|
|
.selectOnClickOption(QueryName);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("addAPIFromLightningMenu", (ApiName) => {
|
|
|
|
|
cy.get(commonlocators.dropdownSelectButton)
|
|
|
|
|
.first()
|
2021-01-27 09:07:33 +00:00
|
|
|
.click({ force: true })
|
2021-07-07 03:46:16 +00:00
|
|
|
.selectOnClickOption("Execute a Query")
|
2021-06-15 10:19:30 +00:00
|
|
|
.selectOnClickOption(ApiName);
|
2021-01-27 09:07:33 +00:00
|
|
|
});
|
|
|
|
|
|
2020-05-16 07:28:13 +00:00
|
|
|
Cypress.Commands.add("radioInput", (index, text) => {
|
|
|
|
|
cy.get(widgetsPage.RadioInput)
|
|
|
|
|
.eq(index)
|
2021-09-23 11:14:01 +00:00
|
|
|
.click({ force: true })
|
|
|
|
|
.clear({ force: true })
|
2021-09-21 07:55:56 +00:00
|
|
|
.type(text)
|
|
|
|
|
.wait(200);
|
2020-05-16 07:28:13 +00:00
|
|
|
});
|
|
|
|
|
Cypress.Commands.add("tabVerify", (index, text) => {
|
|
|
|
|
cy.get(".t--property-control-tabs input")
|
|
|
|
|
.eq(index)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.clear()
|
|
|
|
|
.type(text);
|
|
|
|
|
cy.get(LayoutPage.tabWidget)
|
|
|
|
|
.contains(text)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.should("be.visible");
|
|
|
|
|
});
|
2020-05-12 04:35:21 +00:00
|
|
|
|
2020-05-08 05:40:14 +00:00
|
|
|
Cypress.Commands.add("getPluginFormsAndCreateDatasource", () => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
/*
|
2020-05-08 05:40:14 +00:00
|
|
|
cy.wait("@getPluginForm").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
cy.wait("@createDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
*/
|
2020-05-08 05:40:14 +00:00
|
|
|
});
|
|
|
|
|
|
2020-05-07 08:07:50 +00:00
|
|
|
Cypress.Commands.add("NavigateToApiEditor", () => {
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.get(explorer.addEntityAPI).click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("NavigateToWidgetsInExplorer", () => {
|
|
|
|
|
cy.get(explorer.entityWidget).click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("NavigateToQueriesInExplorer", () => {
|
|
|
|
|
cy.get(explorer.entityQuery).click({ force: true });
|
2020-05-07 08:07:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("testCreateApiButton", () => {
|
|
|
|
|
cy.get(ApiEditor.createBlankApiCard).click({ force: true });
|
|
|
|
|
cy.wait("@createNewApi").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-08 05:40:14 +00:00
|
|
|
Cypress.Commands.add("testSaveDeleteDatasource", () => {
|
Hotfix/trailing white spaces in mysql datasource configuration (#6227)
* trimmed white spaces in datasource configuration
* Added cypress tests for MySQLdatasource
* fixed trailing whitespaces bug in mysql datasource configuration
* Fix overflowing text in toasts on safari (#6200)
* [Feature] Generate template page from datasource (#5513)
- Add Generate CRUD page feature
- Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit.
- Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component.
If `renderOption` prop is not defined, it will show default option UI.
- Add getDatasourcesStructure [new entity Selector]
( This will provide all fetched structure of datasources)
> Commit Messages ⬇️
* Show disabled GenPage Button for unsupported DS
* Add Icon in Select Table and Column dropdown
* Add Error message when datasource config has error
* Fix the continous loading state issue
* Add Not supported datasource in select Table
* Add ignoreCache when fetching DS struct
* Go to generate page if initiator=generate-page
* Fix connect new datasource button disabled
* Modify error message for invalid datasource struct
* Add snowflake to supported plugin for template
* Fix Show More option width
* Fix incorrect error msg for valid dS config
* Generate page UI improvements
* Refactor navigation
* Fix Datasource Card UX
* Remove semi-colon from Icon loader
* Refactor contants
* Add executeDatasourceQuery & fetchPluginForm API
- WIP google sheet form UI and functionality
- Implemented fetch all spreadsheet with mock data
* disable S3 and google sheet for generate page
* Update yarn.lock
* Resolve review comments
- Add Messages to `constants/messages`
- Add default value for `fetchActionsForPage` 2nd param
- Add comment
- Remove `onFinishCallback` from `handleFetchedPage`
* move string literal to constants/messages
* Remove hardcoded pluginId implementation
* Refactor getGenerateCRUDEnabledPluginMap selector
* Fix CreateAppInFirstListedOrg test command
* Add getIsGeneratePageInitiator helper func
* Fix Entity explorer Edit option test
* Fix CreateAppForOrg test command
- Add click on build from scratch in generatePage
* Fix deleteDatasource command test
- Click on Datasource Name to Edit, Datasource Card handles the click
* Fix DynamicLayout spec test issue
* Fix pageLoadSpec test
* Disable google plugin & Refactor
- Add useDatasourceOptions hook
* Add datasourceCardMenu in DatasourceEditor.json
* Fix issues
- Add Icon hover clickable control
- Auth API click handler
* Fix Createpage test command
* Add cypress test for generate page flow
* Fix cypress test
* Add Analytics
* Add comments in CloseEditor
* Rename initiator to isGeneratePageMode
* Disable S3 for generate CRUD page
* Fix generate page from existing datasource issue
* Enhance test to verify if data is fetched properly
* Wait for get Actions before execute actions
* Change the cypress route for excute api
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Fix xss redirectURL (#6229)
* Update msg
* Revert "Update msg"
This reverts commit 0ac70ea7e9c10a0708432333e6f67004150d98dc.
* Fix JS error message showing callstack in firefox (#6234)
* Adding expiry of 30 days to session cookies (#6224)
Fixes #5872
Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.
* Removing release-drafter github action (#6248)
* Add Skip tour button in welcome onboarding (#6158)
This allows users to skip the welcome tour, there is an End tour button already present but wasn't easily accessible.
* Fix - #6221 new nav analytics improvements (#6223)
* fixed redirection on connect data click. and updated analytics
* Added generic analytics for all datasource cards
* Add missed new nav analytics for connections (#6233)
* Log event when property pane connected entity is clicked
- Also update screen to source
* Add missed analytic event when user navigates to entity from property pane connection
- Also add entity type info to event
- Refactor to make this happen by moving useGetEntityInfo hook to debugger hooks
* [Fix] Small UI improvements to suggested widgets section (#6190)
* added slight transition to suggested widgets. Adjusted the height of arrows in relationship.
* minor fixes to back btn style in suggested widgets panel
* fixed the size of collapsible icon
* removed a comment
* Fix NPE when Segment key not available correctly (#6244)
* Using local Postgres database instead of remote (#6241)
* Using local Postgres database instead of remote
* Added createdb and usedb at the top
* FEATURE-5852 : make the iframe widget message property accessible (#5897)
-- Add a new meta property for receiving the message from an iframe. Now the user can simply refer to {{iframe.message}} to access the data they receive in an API or widget.
* Disable tern in view mode (#6203)
* Fixed ExecutionParams (#6284)
* Fix test by mocking the response (#6273)
* added cypress tests for users mock datasource
* Fix: Mark comment threads as viewed when they are resolved (#6251)
* -log widget type in analytics service when new thread created
-set viewed=true for resolved threads
* fixed typo
* fix the test case when there is not widget type
* Add analytics event for mock-data creation (#6136)
* Add analytics event for mockdata creation
* Use the correct name for the mockdatasource
* Added FE analytics for mock datasource
* Changes per review
* Remove the method call
* Fix indentation issue
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Missing validations (#6281)
* Fix validations for certain scenarios which were missed earlier
* Minor comments feature fixes (#6245)
* Fix comment card click: set visible thread (#6166)
* Fixing bug where the comment feature flag was disabled for all users
* [Fix] Refresh sidebar comments list when a thread is unresolved (#6326)
* fix stop Rich text Editor from crashing on Modal (#6077)
* changed RTE removal mechanism
* modified changes to remove just before initializing
* tinyMCE patch for firefox
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Sentry typeError fix, with checks (#6256)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Supporting all ASCII characters in table widget (#6041)
* Updated labels Mock data to Sample data (#6330)
* [perf] propertyControl re-rendering (#5941)
* prevent unnecessry re-renders on property control keyPress
* Changes to memoize with useSelector
* propertyControl re-rendering initial commit
* Optimized and Generalized PropertyControl
* Updating Property Dependencies
* removing useCallback and replacing WidgetEnhancementHelpers with selector
* nested property path changes
* reverting name Change
* tests fixes and adding dependencies for validation structure
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
* more conditions for run check (#6255)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Fix comment card click at the view mode (#6332)
* Fix unnecessary renders of ActionCreator, EntityName, CodeEditor and ActionEntityContextMenu (#6242)
* Fix action creator unnecessary render issue
- Optimize the selectors and hooks to return new values only when something has changed.
* Fix ActionEntityContextMenu re-renders issue
* Prevent rerenders of EntityName component
* Fix CodeEditor re-renders
* Use createSelector instead of memoization.
* Cleanup
* - Remove whyDidYouRender
Co-authored-by: Satish Gandham <satish@appsmith.com>
* Multiselect Widget (#5228)
We have now separated the multi-select from the select widget, This has simplified the implementation and helped us resolve any issues we where facing because of the complexity bought by both under the same hood and has also increased the discoverability of the widget for our end users. We have also simultaneously taken up multiple enhancements related to the select and multi-select widget.
* Added instance Id in analytics datapoint (#6252)
* Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant
* Remove type from InputTypes in InputWidget
* Remove type from ReduxActionTypes
* Remove type from ReduxErrorActionTypes
* Remove type from SocialLoginTypes
* Fix widget actions issues
* Remove OPEN_SUB_PANE commented redux action
* updated cypress tests to account for testing trailing spaces in db name and host address
* removed unparsed token
* Commenting test (#6354)
* Add list buckets API to S3 (#6334)
* Add list buckets action method to S3
* Added TC for list bucket method
* FIX #6324 : reset recaptcha token on click and handled button loading explicitly (#6337)
reset re-captcha token on click and handled button loading explicitly such that the user know that the api call has not finished
* Added null check to verify empty layout in generate CRUD page flow (#6359)
* Fix authentication issue while creating mockdata (#6294)
* Re set password to avoid double encryption while creating suffix datasource
* Add test to query on mockdata source
* Check the Authentication type before setting the password
* updated cypress tests for mock datasource
* fixed cypress failing datasources tests
* Fix: Update debugger placeholder text for non-mac (#6142)
* Added logic to show form data requests in debugger (#6350)
* Added logic to show form data requests in debugger
* Tests and comments
* Tests
* Tern server performance fix and Best match fix (#6338)
* Uncomment Gen CRUD page Test (#6371)
* Reorganised test steps to utilise retry action (#6208)
* updated spec with assertion values (#6323)
* updated spec with assert
* updated test
* updated test
* updated dsl
* Improvement: Add limit on password length in user signup (#6312)
* -add max password validation in FE and password validation in BE for signup
* -added unit test for password length limit
* - set max password length to 48
- add password length check in reset password
* -removed password limit check from login
* Fix binding query for the nested data responses (#6372)
* Fix binding query for the nested data responses
* Fix formatting issues and add comments
* Updated comments
* remove code duplications
* Fix: Keep inspect entity in sync with the widget selection in the entity explorer
* docs: Updates event archive
* Navigation Dropdown feedback Changes (#6119)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Feature: Add API to set and get concurrent app editors (#6292)
* -add an API in RTS to store and retrieve currently online users of an application
* -handled the case when edit app event received before user is authenticated
* -updated authentication API in rts
* close modal on cancel btn click (#6383)
The cancel button in the modal will now by default have the close action configured.
* Button and chart fixes (#6373)
* Added new file button file and fixed the bugs in chart and button
Added new file button file and fixed the bugs in chart and button
* Fixed JS toggle for Button widget
* changed border radius of multiselect widget to 0px (#6349)
* open link inside text component in a new tab (#6205)
* Fix loading test data for Cypress tests in CodeBuild
* Change dropdown widget to select widget in Github labels for automation to work properly (#6386)
* Updating k8s README to point to docs.appsmith.com
* iFrame - When the source url is removed message should be displayed in iframe similar to other widgets (#6295)
* FIX-5414 : iFrame - When the source url is removed message is be displayed within the component
* BUG : Iframe widget: wrong placeholder `Title` (#6053)
Rectified the wrong placeholder in the iframe widget title property.
* Use feature flag api to enable/disable comments (#6322)
* Check if comments are enabled for comment intro modal (#6395)
* Fix ts error release (#6396)
* updated common method (#6397)
* Fix #5740 - Api actions are treated as queries (#6381)
* updated active datasources pane carry proper cta to create new action
* properly creating action names in either api/query context
* added a new separate new api/query btn component
* moved empty datasources warning to messages
* fix: wrap overflow option in multiselect such that all option checkboxes are available(#6403)
* Fix #6160 Updated Text binding for row and removed variable evaluation - Default table data (#6360)
* Icon Button Widget (#5723)
Introducing the **Floating action button / Icon button**. Now you can use this to show small actions as icons. We have added a bunch of styling customisation to this as well. You can bind an onClick action to this and easily trigger an even. The component also automatically resizes within the widget as you scale it while maintaining the right aspect ratio.
* [Fix] Mark resolved threads as read in real time, refresh list when thread resolved status is updated (#6407)
* fix: Font size fixed for consistency between select and multi-select widget (#6400)
* Skip btn comment onboarding (#6331)
* [Fix] Reset comment mode hotkey (#6401)
* Welcome tour GIF and Close button fixes (#6309)
* * Chaged New Query GIF
* Added close button for welcome tour final page
* Changed Run GIF
* Sticky sidebar z-index change
* Added testcases
* Replaced hardcoded colors and text with constants
* Fix: Set a default option in select widget while adding from suggested widgets (#6236)
* Fix jest test for comments by overriding isCommentMode selector (#6027)
* Fix download with URL issue (#6179)
* Bump tar from 6.0.5 to 6.1.6 in /app/client (#6392)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.6)
---
updated-dependencies:
- dependency-name: tar
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update CRUD template For S3 page (#6426)
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
* Cypress tests for commenting feature (#5505)
* Minor fixes for comments on the modal widget (#6368)
* Update permission check for determining a user with dev access for comments intro (#6431)
* Prevent Entire Editor Header from re rendering (#6415)
* Seperate save indicator without rerendering entire Editor Header
* stop unnecessary update to Saved message every second
* moving raw strings to messages
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* [Fix] Focus the comment thread when opened after dismissing (#6437)
* Dont fetch feature flags if not logged in (#6444)
* Update README.md
Fixed a spelling mistake
* Fix: Parse api body to be shown as an object in debugger if possible (#6249)
* Fix: List Widget issues (#6226)
* fix binding
* fix multiple binding not working issue
* use box shadow inset + fix gap issue
* fix container z index issue
* fix resize ux issue
* update container height
* allow selecting list widget only when the property pane is not visible
* fix resize handle overflow issue
* fix dot issue in current item structure + fix resize issue for template
* fix select widget not workign inside list widget issue
* remove unused keys
* fix jest test
* fix derived.js test
* add undefiend check
* add currentIndex for autocomplete
* revert white color to transparent for list container
* fix pagination wrong calculation
* remove beta tag
* fix issue with cypress test failing
* fix issue with dropdown widget
* fix the boolean value issue
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
* [Bugfix] Empty object creation in published pages for application object fixed
* Omnibar redesign (#6288)
Omni bar would now have the categories navigation and documentation.
* [skip_changelog] Form login disabled after user uses OAuth login method (#6425)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* changed default image to old value loading from cloudinary (#6467)
* Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors
* emitting an event only when socket is connected
* added a tooltip to show username/email
* using proper selector
* using theme
* created the separate component for listing editors
* created a separate hook for app collab events
* moved collab user type to /entities
* moved user visible strings to message constants
* Revert "moved user visible strings to message constants"
This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.
* made provision to reset the concurrent editors list
* Enable auto-start after VM restart (#6428)
* BUG-6029 : Property pane for iFrame widget does not appear on clicking on widget (#6260)
-- Add a overlaid div for iframe
* Added fix for cmd + enter not running google sheets actions (#6446)
* Fix-Catch invalid google recaptcha v3 key error (#6034)
* Handle invalid google recaptcha v3 key
* changed default divider color to light grey (#6335)
* fixed issue where the resize cursor did not appear on the left hand side of the widget (#6380)
* Add null check for the nested data structure (#6479)
* Add null check for the nested data structure
* Add unit test for the null nested data
* Adding a max size of approximately 1 MB of data fetched using appsmith (#6491)
* WIP Restrict fetch size
* Adding a cut off of approximately 1 MB of data fetched in postgres plugin
* Code cleanup
* Minor cleanup
* [Fix] Minor comments feature fixes (#6490)
* Fix skip btn
* update sorting for mentions list
* Show server logs when create cypress user fails
* [Fix test spec]Create a new org for the comments test so existing user roles don't exist (#6477)
* Revert "Supporting all ASCII characters in table widget (#6041)" (#6429)
This reverts commit 3ae1bd6d95da42530df356b9c14e7e4f547372ea.
* Updated flaky test (#6486)
* Updated flaky test
* updated another test
* Store MongoDB creds in separate file from install.sh (#6499)
* Store MongoDB creds in separate file from install.sh
* Move MongoDB credentials to docker.env
* Add Analytics to Generate CRUD template feat (#6503)
* Add Analytics to Generate CRUD template feat
* Add analytics event on datasource click
* Send pluginName instead of plugin obj in analytics
* Fix: Adding checks before we check for disallowCopy (#6214)
* Fix: Adding checks to before we check for disallowCopy
* Adding checks for undo logic when a child delete is undone but the parent is already deleted.
* restore widgets if they have their parent available.
* reported bugs.
* undo only when parent exists.
* Hotfix Table Widget crashes when there is a cyclical dependency (#6505)
* FIX #5254 : dropdown height fixed and made scrollable (#6170)
* will widget pane if user moves away from canvas (#6516)
* Fix: intercom triggers are not working properly (#6512)
* initializing the intercom as soon as the help components are mounted.
* removed log
* Fix: Undo-Delete of Containers fix (#6510)
* Encrypt attributes (#6508)
* encrypt attributes
* updated references to DOM targets for accessing the Mock User datasource
* Fix/omnibar landing bug (#6513)
* hide certificate string using dots on UI (#6533)
* replace actual certificate string with '*' like it is done for hiding password on the UI.
* Updated Template
* fixed failing cypress tests
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Paul Li <82799722+wmdev0808@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Nayan <83352306+nayan-rafiq@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: Bhavin K <58818598+techbhavin@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Yash Vibhandik <vibhandikyash@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Confidence Okoghenun <cokoghenun@gmail.com>
Co-authored-by: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com>
Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: abhishek nayak <nayak.abhishek@gmail.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Nipun Agarwal <31271538+nipun1999@users.noreply.github.com>
Co-authored-by: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2021-08-13 08:42:29 +00:00
|
|
|
// Instead of deleting the last datasource on the active datasources list,
|
|
|
|
|
// we delete the datasource that was just created (identified by its title)
|
|
|
|
|
cy.get(datasourceEditor.datasourceTitle)
|
|
|
|
|
.invoke("text")
|
|
|
|
|
.then((datasourceTitle) => {
|
|
|
|
|
// test datasource
|
|
|
|
|
cy.get(".t--test-datasource").click();
|
|
|
|
|
cy.wait("@testDatasource");
|
|
|
|
|
// .should("have.nested.property", "response.body.data.success", true)
|
|
|
|
|
// .debug();
|
|
|
|
|
|
|
|
|
|
// save datasource
|
|
|
|
|
cy.get(".t--save-datasource").click();
|
|
|
|
|
cy.wait("@saveDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
// select datasource to be deleted by datasource title
|
|
|
|
|
cy.get(`${datasourceEditor.datasourceCard}`)
|
|
|
|
|
.contains(datasourceTitle)
|
|
|
|
|
.last()
|
|
|
|
|
.click();
|
|
|
|
|
// delete datasource
|
|
|
|
|
cy.get(".t--delete-datasource").click();
|
|
|
|
|
cy.wait("@deleteDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
2020-05-07 08:07:50 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("importCurl", () => {
|
|
|
|
|
cy.get(ApiEditor.curlImportBtn).click({ force: true });
|
|
|
|
|
cy.wait("@curlImport").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
201,
|
|
|
|
|
);
|
|
|
|
|
});
|
2020-05-08 15:31:36 +00:00
|
|
|
|
2020-05-11 09:03:46 +00:00
|
|
|
Cypress.Commands.add("NavigateToDatasourceEditor", () => {
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.get(explorer.addDBQueryEntity)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(pages.integrationCreateNew)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-05-11 09:03:46 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("NavigateToQueryEditor", () => {
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.get(explorer.addDBQueryEntity).click({ force: true });
|
2020-05-11 09:03:46 +00:00
|
|
|
});
|
|
|
|
|
|
2020-09-02 13:13:06 +00:00
|
|
|
Cypress.Commands.add("testDatasource", () => {
|
2020-05-11 09:03:46 +00:00
|
|
|
cy.get(".t--test-datasource").click();
|
2021-01-13 16:04:23 +00:00
|
|
|
cy.wait("@testDatasource");
|
|
|
|
|
/*
|
|
|
|
|
.should(
|
2020-05-11 09:03:46 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.data.success",
|
|
|
|
|
true,
|
|
|
|
|
);
|
2021-01-13 16:04:23 +00:00
|
|
|
*/
|
2020-09-02 13:13:06 +00:00
|
|
|
});
|
2020-05-11 09:03:46 +00:00
|
|
|
|
2020-09-02 13:13:06 +00:00
|
|
|
Cypress.Commands.add("saveDatasource", () => {
|
2020-05-11 09:03:46 +00:00
|
|
|
cy.get(".t--save-datasource").click();
|
2021-05-13 15:57:19 +00:00
|
|
|
cy.wait("@saveDatasource")
|
|
|
|
|
.then((xhr) => {
|
|
|
|
|
cy.log(JSON.stringify(xhr.response.body));
|
|
|
|
|
})
|
|
|
|
|
.should("have.nested.property", "response.body.responseMeta.status", 200);
|
2020-05-11 09:03:46 +00:00
|
|
|
});
|
|
|
|
|
|
2020-09-02 13:13:06 +00:00
|
|
|
Cypress.Commands.add("testSaveDatasource", () => {
|
|
|
|
|
cy.saveDatasource();
|
2021-07-29 08:13:10 +00:00
|
|
|
cy.get(datasourceEditor.datasourceCard)
|
2021-07-07 03:46:16 +00:00
|
|
|
.last()
|
|
|
|
|
.click();
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.testDatasource();
|
2020-09-02 13:13:06 +00:00
|
|
|
});
|
|
|
|
|
|
Hotfix/trailing white spaces in mysql datasource configuration (#6227)
* trimmed white spaces in datasource configuration
* Added cypress tests for MySQLdatasource
* fixed trailing whitespaces bug in mysql datasource configuration
* Fix overflowing text in toasts on safari (#6200)
* [Feature] Generate template page from datasource (#5513)
- Add Generate CRUD page feature
- Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit.
- Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component.
If `renderOption` prop is not defined, it will show default option UI.
- Add getDatasourcesStructure [new entity Selector]
( This will provide all fetched structure of datasources)
> Commit Messages ⬇️
* Show disabled GenPage Button for unsupported DS
* Add Icon in Select Table and Column dropdown
* Add Error message when datasource config has error
* Fix the continous loading state issue
* Add Not supported datasource in select Table
* Add ignoreCache when fetching DS struct
* Go to generate page if initiator=generate-page
* Fix connect new datasource button disabled
* Modify error message for invalid datasource struct
* Add snowflake to supported plugin for template
* Fix Show More option width
* Fix incorrect error msg for valid dS config
* Generate page UI improvements
* Refactor navigation
* Fix Datasource Card UX
* Remove semi-colon from Icon loader
* Refactor contants
* Add executeDatasourceQuery & fetchPluginForm API
- WIP google sheet form UI and functionality
- Implemented fetch all spreadsheet with mock data
* disable S3 and google sheet for generate page
* Update yarn.lock
* Resolve review comments
- Add Messages to `constants/messages`
- Add default value for `fetchActionsForPage` 2nd param
- Add comment
- Remove `onFinishCallback` from `handleFetchedPage`
* move string literal to constants/messages
* Remove hardcoded pluginId implementation
* Refactor getGenerateCRUDEnabledPluginMap selector
* Fix CreateAppInFirstListedOrg test command
* Add getIsGeneratePageInitiator helper func
* Fix Entity explorer Edit option test
* Fix CreateAppForOrg test command
- Add click on build from scratch in generatePage
* Fix deleteDatasource command test
- Click on Datasource Name to Edit, Datasource Card handles the click
* Fix DynamicLayout spec test issue
* Fix pageLoadSpec test
* Disable google plugin & Refactor
- Add useDatasourceOptions hook
* Add datasourceCardMenu in DatasourceEditor.json
* Fix issues
- Add Icon hover clickable control
- Auth API click handler
* Fix Createpage test command
* Add cypress test for generate page flow
* Fix cypress test
* Add Analytics
* Add comments in CloseEditor
* Rename initiator to isGeneratePageMode
* Disable S3 for generate CRUD page
* Fix generate page from existing datasource issue
* Enhance test to verify if data is fetched properly
* Wait for get Actions before execute actions
* Change the cypress route for excute api
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Fix xss redirectURL (#6229)
* Update msg
* Revert "Update msg"
This reverts commit 0ac70ea7e9c10a0708432333e6f67004150d98dc.
* Fix JS error message showing callstack in firefox (#6234)
* Adding expiry of 30 days to session cookies (#6224)
Fixes #5872
Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.
* Removing release-drafter github action (#6248)
* Add Skip tour button in welcome onboarding (#6158)
This allows users to skip the welcome tour, there is an End tour button already present but wasn't easily accessible.
* Fix - #6221 new nav analytics improvements (#6223)
* fixed redirection on connect data click. and updated analytics
* Added generic analytics for all datasource cards
* Add missed new nav analytics for connections (#6233)
* Log event when property pane connected entity is clicked
- Also update screen to source
* Add missed analytic event when user navigates to entity from property pane connection
- Also add entity type info to event
- Refactor to make this happen by moving useGetEntityInfo hook to debugger hooks
* [Fix] Small UI improvements to suggested widgets section (#6190)
* added slight transition to suggested widgets. Adjusted the height of arrows in relationship.
* minor fixes to back btn style in suggested widgets panel
* fixed the size of collapsible icon
* removed a comment
* Fix NPE when Segment key not available correctly (#6244)
* Using local Postgres database instead of remote (#6241)
* Using local Postgres database instead of remote
* Added createdb and usedb at the top
* FEATURE-5852 : make the iframe widget message property accessible (#5897)
-- Add a new meta property for receiving the message from an iframe. Now the user can simply refer to {{iframe.message}} to access the data they receive in an API or widget.
* Disable tern in view mode (#6203)
* Fixed ExecutionParams (#6284)
* Fix test by mocking the response (#6273)
* added cypress tests for users mock datasource
* Fix: Mark comment threads as viewed when they are resolved (#6251)
* -log widget type in analytics service when new thread created
-set viewed=true for resolved threads
* fixed typo
* fix the test case when there is not widget type
* Add analytics event for mock-data creation (#6136)
* Add analytics event for mockdata creation
* Use the correct name for the mockdatasource
* Added FE analytics for mock datasource
* Changes per review
* Remove the method call
* Fix indentation issue
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Missing validations (#6281)
* Fix validations for certain scenarios which were missed earlier
* Minor comments feature fixes (#6245)
* Fix comment card click: set visible thread (#6166)
* Fixing bug where the comment feature flag was disabled for all users
* [Fix] Refresh sidebar comments list when a thread is unresolved (#6326)
* fix stop Rich text Editor from crashing on Modal (#6077)
* changed RTE removal mechanism
* modified changes to remove just before initializing
* tinyMCE patch for firefox
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Sentry typeError fix, with checks (#6256)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Supporting all ASCII characters in table widget (#6041)
* Updated labels Mock data to Sample data (#6330)
* [perf] propertyControl re-rendering (#5941)
* prevent unnecessry re-renders on property control keyPress
* Changes to memoize with useSelector
* propertyControl re-rendering initial commit
* Optimized and Generalized PropertyControl
* Updating Property Dependencies
* removing useCallback and replacing WidgetEnhancementHelpers with selector
* nested property path changes
* reverting name Change
* tests fixes and adding dependencies for validation structure
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
* more conditions for run check (#6255)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Fix comment card click at the view mode (#6332)
* Fix unnecessary renders of ActionCreator, EntityName, CodeEditor and ActionEntityContextMenu (#6242)
* Fix action creator unnecessary render issue
- Optimize the selectors and hooks to return new values only when something has changed.
* Fix ActionEntityContextMenu re-renders issue
* Prevent rerenders of EntityName component
* Fix CodeEditor re-renders
* Use createSelector instead of memoization.
* Cleanup
* - Remove whyDidYouRender
Co-authored-by: Satish Gandham <satish@appsmith.com>
* Multiselect Widget (#5228)
We have now separated the multi-select from the select widget, This has simplified the implementation and helped us resolve any issues we where facing because of the complexity bought by both under the same hood and has also increased the discoverability of the widget for our end users. We have also simultaneously taken up multiple enhancements related to the select and multi-select widget.
* Added instance Id in analytics datapoint (#6252)
* Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant
* Remove type from InputTypes in InputWidget
* Remove type from ReduxActionTypes
* Remove type from ReduxErrorActionTypes
* Remove type from SocialLoginTypes
* Fix widget actions issues
* Remove OPEN_SUB_PANE commented redux action
* updated cypress tests to account for testing trailing spaces in db name and host address
* removed unparsed token
* Commenting test (#6354)
* Add list buckets API to S3 (#6334)
* Add list buckets action method to S3
* Added TC for list bucket method
* FIX #6324 : reset recaptcha token on click and handled button loading explicitly (#6337)
reset re-captcha token on click and handled button loading explicitly such that the user know that the api call has not finished
* Added null check to verify empty layout in generate CRUD page flow (#6359)
* Fix authentication issue while creating mockdata (#6294)
* Re set password to avoid double encryption while creating suffix datasource
* Add test to query on mockdata source
* Check the Authentication type before setting the password
* updated cypress tests for mock datasource
* fixed cypress failing datasources tests
* Fix: Update debugger placeholder text for non-mac (#6142)
* Added logic to show form data requests in debugger (#6350)
* Added logic to show form data requests in debugger
* Tests and comments
* Tests
* Tern server performance fix and Best match fix (#6338)
* Uncomment Gen CRUD page Test (#6371)
* Reorganised test steps to utilise retry action (#6208)
* updated spec with assertion values (#6323)
* updated spec with assert
* updated test
* updated test
* updated dsl
* Improvement: Add limit on password length in user signup (#6312)
* -add max password validation in FE and password validation in BE for signup
* -added unit test for password length limit
* - set max password length to 48
- add password length check in reset password
* -removed password limit check from login
* Fix binding query for the nested data responses (#6372)
* Fix binding query for the nested data responses
* Fix formatting issues and add comments
* Updated comments
* remove code duplications
* Fix: Keep inspect entity in sync with the widget selection in the entity explorer
* docs: Updates event archive
* Navigation Dropdown feedback Changes (#6119)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Feature: Add API to set and get concurrent app editors (#6292)
* -add an API in RTS to store and retrieve currently online users of an application
* -handled the case when edit app event received before user is authenticated
* -updated authentication API in rts
* close modal on cancel btn click (#6383)
The cancel button in the modal will now by default have the close action configured.
* Button and chart fixes (#6373)
* Added new file button file and fixed the bugs in chart and button
Added new file button file and fixed the bugs in chart and button
* Fixed JS toggle for Button widget
* changed border radius of multiselect widget to 0px (#6349)
* open link inside text component in a new tab (#6205)
* Fix loading test data for Cypress tests in CodeBuild
* Change dropdown widget to select widget in Github labels for automation to work properly (#6386)
* Updating k8s README to point to docs.appsmith.com
* iFrame - When the source url is removed message should be displayed in iframe similar to other widgets (#6295)
* FIX-5414 : iFrame - When the source url is removed message is be displayed within the component
* BUG : Iframe widget: wrong placeholder `Title` (#6053)
Rectified the wrong placeholder in the iframe widget title property.
* Use feature flag api to enable/disable comments (#6322)
* Check if comments are enabled for comment intro modal (#6395)
* Fix ts error release (#6396)
* updated common method (#6397)
* Fix #5740 - Api actions are treated as queries (#6381)
* updated active datasources pane carry proper cta to create new action
* properly creating action names in either api/query context
* added a new separate new api/query btn component
* moved empty datasources warning to messages
* fix: wrap overflow option in multiselect such that all option checkboxes are available(#6403)
* Fix #6160 Updated Text binding for row and removed variable evaluation - Default table data (#6360)
* Icon Button Widget (#5723)
Introducing the **Floating action button / Icon button**. Now you can use this to show small actions as icons. We have added a bunch of styling customisation to this as well. You can bind an onClick action to this and easily trigger an even. The component also automatically resizes within the widget as you scale it while maintaining the right aspect ratio.
* [Fix] Mark resolved threads as read in real time, refresh list when thread resolved status is updated (#6407)
* fix: Font size fixed for consistency between select and multi-select widget (#6400)
* Skip btn comment onboarding (#6331)
* [Fix] Reset comment mode hotkey (#6401)
* Welcome tour GIF and Close button fixes (#6309)
* * Chaged New Query GIF
* Added close button for welcome tour final page
* Changed Run GIF
* Sticky sidebar z-index change
* Added testcases
* Replaced hardcoded colors and text with constants
* Fix: Set a default option in select widget while adding from suggested widgets (#6236)
* Fix jest test for comments by overriding isCommentMode selector (#6027)
* Fix download with URL issue (#6179)
* Bump tar from 6.0.5 to 6.1.6 in /app/client (#6392)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.6)
---
updated-dependencies:
- dependency-name: tar
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update CRUD template For S3 page (#6426)
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
* Cypress tests for commenting feature (#5505)
* Minor fixes for comments on the modal widget (#6368)
* Update permission check for determining a user with dev access for comments intro (#6431)
* Prevent Entire Editor Header from re rendering (#6415)
* Seperate save indicator without rerendering entire Editor Header
* stop unnecessary update to Saved message every second
* moving raw strings to messages
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* [Fix] Focus the comment thread when opened after dismissing (#6437)
* Dont fetch feature flags if not logged in (#6444)
* Update README.md
Fixed a spelling mistake
* Fix: Parse api body to be shown as an object in debugger if possible (#6249)
* Fix: List Widget issues (#6226)
* fix binding
* fix multiple binding not working issue
* use box shadow inset + fix gap issue
* fix container z index issue
* fix resize ux issue
* update container height
* allow selecting list widget only when the property pane is not visible
* fix resize handle overflow issue
* fix dot issue in current item structure + fix resize issue for template
* fix select widget not workign inside list widget issue
* remove unused keys
* fix jest test
* fix derived.js test
* add undefiend check
* add currentIndex for autocomplete
* revert white color to transparent for list container
* fix pagination wrong calculation
* remove beta tag
* fix issue with cypress test failing
* fix issue with dropdown widget
* fix the boolean value issue
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
* [Bugfix] Empty object creation in published pages for application object fixed
* Omnibar redesign (#6288)
Omni bar would now have the categories navigation and documentation.
* [skip_changelog] Form login disabled after user uses OAuth login method (#6425)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* changed default image to old value loading from cloudinary (#6467)
* Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors
* emitting an event only when socket is connected
* added a tooltip to show username/email
* using proper selector
* using theme
* created the separate component for listing editors
* created a separate hook for app collab events
* moved collab user type to /entities
* moved user visible strings to message constants
* Revert "moved user visible strings to message constants"
This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.
* made provision to reset the concurrent editors list
* Enable auto-start after VM restart (#6428)
* BUG-6029 : Property pane for iFrame widget does not appear on clicking on widget (#6260)
-- Add a overlaid div for iframe
* Added fix for cmd + enter not running google sheets actions (#6446)
* Fix-Catch invalid google recaptcha v3 key error (#6034)
* Handle invalid google recaptcha v3 key
* changed default divider color to light grey (#6335)
* fixed issue where the resize cursor did not appear on the left hand side of the widget (#6380)
* Add null check for the nested data structure (#6479)
* Add null check for the nested data structure
* Add unit test for the null nested data
* Adding a max size of approximately 1 MB of data fetched using appsmith (#6491)
* WIP Restrict fetch size
* Adding a cut off of approximately 1 MB of data fetched in postgres plugin
* Code cleanup
* Minor cleanup
* [Fix] Minor comments feature fixes (#6490)
* Fix skip btn
* update sorting for mentions list
* Show server logs when create cypress user fails
* [Fix test spec]Create a new org for the comments test so existing user roles don't exist (#6477)
* Revert "Supporting all ASCII characters in table widget (#6041)" (#6429)
This reverts commit 3ae1bd6d95da42530df356b9c14e7e4f547372ea.
* Updated flaky test (#6486)
* Updated flaky test
* updated another test
* Store MongoDB creds in separate file from install.sh (#6499)
* Store MongoDB creds in separate file from install.sh
* Move MongoDB credentials to docker.env
* Add Analytics to Generate CRUD template feat (#6503)
* Add Analytics to Generate CRUD template feat
* Add analytics event on datasource click
* Send pluginName instead of plugin obj in analytics
* Fix: Adding checks before we check for disallowCopy (#6214)
* Fix: Adding checks to before we check for disallowCopy
* Adding checks for undo logic when a child delete is undone but the parent is already deleted.
* restore widgets if they have their parent available.
* reported bugs.
* undo only when parent exists.
* Hotfix Table Widget crashes when there is a cyclical dependency (#6505)
* FIX #5254 : dropdown height fixed and made scrollable (#6170)
* will widget pane if user moves away from canvas (#6516)
* Fix: intercom triggers are not working properly (#6512)
* initializing the intercom as soon as the help components are mounted.
* removed log
* Fix: Undo-Delete of Containers fix (#6510)
* Encrypt attributes (#6508)
* encrypt attributes
* updated references to DOM targets for accessing the Mock User datasource
* Fix/omnibar landing bug (#6513)
* hide certificate string using dots on UI (#6533)
* replace actual certificate string with '*' like it is done for hiding password on the UI.
* Updated Template
* fixed failing cypress tests
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Paul Li <82799722+wmdev0808@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Nayan <83352306+nayan-rafiq@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: Bhavin K <58818598+techbhavin@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Yash Vibhandik <vibhandikyash@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Confidence Okoghenun <cokoghenun@gmail.com>
Co-authored-by: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com>
Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: abhishek nayak <nayak.abhishek@gmail.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Nipun Agarwal <31271538+nipun1999@users.noreply.github.com>
Co-authored-by: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2021-08-13 08:42:29 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillMongoDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mongo-host"] + " "
|
|
|
|
|
: datasourceFormData["mongo-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mongo-defaultDatabaseName"] + " "
|
|
|
|
|
: datasourceFormData["mongo-defaultDatabaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["host"]).type(hostAddress);
|
|
|
|
|
//cy.get(datasourceEditor["port"]).type(datasourceFormData["mongo-port"]);
|
|
|
|
|
cy.get(datasourceEditor["selConnectionType"]).click();
|
|
|
|
|
cy.contains(datasourceFormData["connection-type"]).click();
|
|
|
|
|
cy.get(datasourceEditor["defaultDatabaseName"]).type(databaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor["databaseName"])
|
|
|
|
|
.clear()
|
|
|
|
|
.type(datasourceFormData["mongo-databaseName"]);
|
|
|
|
|
cy.get(datasourceEditor["username"]).type(
|
|
|
|
|
datasourceFormData["mongo-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor["password"]).type(
|
|
|
|
|
datasourceFormData["mongo-password"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor["authenticationAuthtype"]).click();
|
|
|
|
|
cy.contains(datasourceFormData["mongo-authenticationAuthtype"]).click({
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-06-12 05:09:49 +00:00
|
|
|
|
Hotfix/trailing white spaces in mysql datasource configuration (#6227)
* trimmed white spaces in datasource configuration
* Added cypress tests for MySQLdatasource
* fixed trailing whitespaces bug in mysql datasource configuration
* Fix overflowing text in toasts on safari (#6200)
* [Feature] Generate template page from datasource (#5513)
- Add Generate CRUD page feature
- Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit.
- Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component.
If `renderOption` prop is not defined, it will show default option UI.
- Add getDatasourcesStructure [new entity Selector]
( This will provide all fetched structure of datasources)
> Commit Messages ⬇️
* Show disabled GenPage Button for unsupported DS
* Add Icon in Select Table and Column dropdown
* Add Error message when datasource config has error
* Fix the continous loading state issue
* Add Not supported datasource in select Table
* Add ignoreCache when fetching DS struct
* Go to generate page if initiator=generate-page
* Fix connect new datasource button disabled
* Modify error message for invalid datasource struct
* Add snowflake to supported plugin for template
* Fix Show More option width
* Fix incorrect error msg for valid dS config
* Generate page UI improvements
* Refactor navigation
* Fix Datasource Card UX
* Remove semi-colon from Icon loader
* Refactor contants
* Add executeDatasourceQuery & fetchPluginForm API
- WIP google sheet form UI and functionality
- Implemented fetch all spreadsheet with mock data
* disable S3 and google sheet for generate page
* Update yarn.lock
* Resolve review comments
- Add Messages to `constants/messages`
- Add default value for `fetchActionsForPage` 2nd param
- Add comment
- Remove `onFinishCallback` from `handleFetchedPage`
* move string literal to constants/messages
* Remove hardcoded pluginId implementation
* Refactor getGenerateCRUDEnabledPluginMap selector
* Fix CreateAppInFirstListedOrg test command
* Add getIsGeneratePageInitiator helper func
* Fix Entity explorer Edit option test
* Fix CreateAppForOrg test command
- Add click on build from scratch in generatePage
* Fix deleteDatasource command test
- Click on Datasource Name to Edit, Datasource Card handles the click
* Fix DynamicLayout spec test issue
* Fix pageLoadSpec test
* Disable google plugin & Refactor
- Add useDatasourceOptions hook
* Add datasourceCardMenu in DatasourceEditor.json
* Fix issues
- Add Icon hover clickable control
- Auth API click handler
* Fix Createpage test command
* Add cypress test for generate page flow
* Fix cypress test
* Add Analytics
* Add comments in CloseEditor
* Rename initiator to isGeneratePageMode
* Disable S3 for generate CRUD page
* Fix generate page from existing datasource issue
* Enhance test to verify if data is fetched properly
* Wait for get Actions before execute actions
* Change the cypress route for excute api
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Fix xss redirectURL (#6229)
* Update msg
* Revert "Update msg"
This reverts commit 0ac70ea7e9c10a0708432333e6f67004150d98dc.
* Fix JS error message showing callstack in firefox (#6234)
* Adding expiry of 30 days to session cookies (#6224)
Fixes #5872
Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.
* Removing release-drafter github action (#6248)
* Add Skip tour button in welcome onboarding (#6158)
This allows users to skip the welcome tour, there is an End tour button already present but wasn't easily accessible.
* Fix - #6221 new nav analytics improvements (#6223)
* fixed redirection on connect data click. and updated analytics
* Added generic analytics for all datasource cards
* Add missed new nav analytics for connections (#6233)
* Log event when property pane connected entity is clicked
- Also update screen to source
* Add missed analytic event when user navigates to entity from property pane connection
- Also add entity type info to event
- Refactor to make this happen by moving useGetEntityInfo hook to debugger hooks
* [Fix] Small UI improvements to suggested widgets section (#6190)
* added slight transition to suggested widgets. Adjusted the height of arrows in relationship.
* minor fixes to back btn style in suggested widgets panel
* fixed the size of collapsible icon
* removed a comment
* Fix NPE when Segment key not available correctly (#6244)
* Using local Postgres database instead of remote (#6241)
* Using local Postgres database instead of remote
* Added createdb and usedb at the top
* FEATURE-5852 : make the iframe widget message property accessible (#5897)
-- Add a new meta property for receiving the message from an iframe. Now the user can simply refer to {{iframe.message}} to access the data they receive in an API or widget.
* Disable tern in view mode (#6203)
* Fixed ExecutionParams (#6284)
* Fix test by mocking the response (#6273)
* added cypress tests for users mock datasource
* Fix: Mark comment threads as viewed when they are resolved (#6251)
* -log widget type in analytics service when new thread created
-set viewed=true for resolved threads
* fixed typo
* fix the test case when there is not widget type
* Add analytics event for mock-data creation (#6136)
* Add analytics event for mockdata creation
* Use the correct name for the mockdatasource
* Added FE analytics for mock datasource
* Changes per review
* Remove the method call
* Fix indentation issue
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Missing validations (#6281)
* Fix validations for certain scenarios which were missed earlier
* Minor comments feature fixes (#6245)
* Fix comment card click: set visible thread (#6166)
* Fixing bug where the comment feature flag was disabled for all users
* [Fix] Refresh sidebar comments list when a thread is unresolved (#6326)
* fix stop Rich text Editor from crashing on Modal (#6077)
* changed RTE removal mechanism
* modified changes to remove just before initializing
* tinyMCE patch for firefox
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Sentry typeError fix, with checks (#6256)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Supporting all ASCII characters in table widget (#6041)
* Updated labels Mock data to Sample data (#6330)
* [perf] propertyControl re-rendering (#5941)
* prevent unnecessry re-renders on property control keyPress
* Changes to memoize with useSelector
* propertyControl re-rendering initial commit
* Optimized and Generalized PropertyControl
* Updating Property Dependencies
* removing useCallback and replacing WidgetEnhancementHelpers with selector
* nested property path changes
* reverting name Change
* tests fixes and adding dependencies for validation structure
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
* more conditions for run check (#6255)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Fix comment card click at the view mode (#6332)
* Fix unnecessary renders of ActionCreator, EntityName, CodeEditor and ActionEntityContextMenu (#6242)
* Fix action creator unnecessary render issue
- Optimize the selectors and hooks to return new values only when something has changed.
* Fix ActionEntityContextMenu re-renders issue
* Prevent rerenders of EntityName component
* Fix CodeEditor re-renders
* Use createSelector instead of memoization.
* Cleanup
* - Remove whyDidYouRender
Co-authored-by: Satish Gandham <satish@appsmith.com>
* Multiselect Widget (#5228)
We have now separated the multi-select from the select widget, This has simplified the implementation and helped us resolve any issues we where facing because of the complexity bought by both under the same hood and has also increased the discoverability of the widget for our end users. We have also simultaneously taken up multiple enhancements related to the select and multi-select widget.
* Added instance Id in analytics datapoint (#6252)
* Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant
* Remove type from InputTypes in InputWidget
* Remove type from ReduxActionTypes
* Remove type from ReduxErrorActionTypes
* Remove type from SocialLoginTypes
* Fix widget actions issues
* Remove OPEN_SUB_PANE commented redux action
* updated cypress tests to account for testing trailing spaces in db name and host address
* removed unparsed token
* Commenting test (#6354)
* Add list buckets API to S3 (#6334)
* Add list buckets action method to S3
* Added TC for list bucket method
* FIX #6324 : reset recaptcha token on click and handled button loading explicitly (#6337)
reset re-captcha token on click and handled button loading explicitly such that the user know that the api call has not finished
* Added null check to verify empty layout in generate CRUD page flow (#6359)
* Fix authentication issue while creating mockdata (#6294)
* Re set password to avoid double encryption while creating suffix datasource
* Add test to query on mockdata source
* Check the Authentication type before setting the password
* updated cypress tests for mock datasource
* fixed cypress failing datasources tests
* Fix: Update debugger placeholder text for non-mac (#6142)
* Added logic to show form data requests in debugger (#6350)
* Added logic to show form data requests in debugger
* Tests and comments
* Tests
* Tern server performance fix and Best match fix (#6338)
* Uncomment Gen CRUD page Test (#6371)
* Reorganised test steps to utilise retry action (#6208)
* updated spec with assertion values (#6323)
* updated spec with assert
* updated test
* updated test
* updated dsl
* Improvement: Add limit on password length in user signup (#6312)
* -add max password validation in FE and password validation in BE for signup
* -added unit test for password length limit
* - set max password length to 48
- add password length check in reset password
* -removed password limit check from login
* Fix binding query for the nested data responses (#6372)
* Fix binding query for the nested data responses
* Fix formatting issues and add comments
* Updated comments
* remove code duplications
* Fix: Keep inspect entity in sync with the widget selection in the entity explorer
* docs: Updates event archive
* Navigation Dropdown feedback Changes (#6119)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Feature: Add API to set and get concurrent app editors (#6292)
* -add an API in RTS to store and retrieve currently online users of an application
* -handled the case when edit app event received before user is authenticated
* -updated authentication API in rts
* close modal on cancel btn click (#6383)
The cancel button in the modal will now by default have the close action configured.
* Button and chart fixes (#6373)
* Added new file button file and fixed the bugs in chart and button
Added new file button file and fixed the bugs in chart and button
* Fixed JS toggle for Button widget
* changed border radius of multiselect widget to 0px (#6349)
* open link inside text component in a new tab (#6205)
* Fix loading test data for Cypress tests in CodeBuild
* Change dropdown widget to select widget in Github labels for automation to work properly (#6386)
* Updating k8s README to point to docs.appsmith.com
* iFrame - When the source url is removed message should be displayed in iframe similar to other widgets (#6295)
* FIX-5414 : iFrame - When the source url is removed message is be displayed within the component
* BUG : Iframe widget: wrong placeholder `Title` (#6053)
Rectified the wrong placeholder in the iframe widget title property.
* Use feature flag api to enable/disable comments (#6322)
* Check if comments are enabled for comment intro modal (#6395)
* Fix ts error release (#6396)
* updated common method (#6397)
* Fix #5740 - Api actions are treated as queries (#6381)
* updated active datasources pane carry proper cta to create new action
* properly creating action names in either api/query context
* added a new separate new api/query btn component
* moved empty datasources warning to messages
* fix: wrap overflow option in multiselect such that all option checkboxes are available(#6403)
* Fix #6160 Updated Text binding for row and removed variable evaluation - Default table data (#6360)
* Icon Button Widget (#5723)
Introducing the **Floating action button / Icon button**. Now you can use this to show small actions as icons. We have added a bunch of styling customisation to this as well. You can bind an onClick action to this and easily trigger an even. The component also automatically resizes within the widget as you scale it while maintaining the right aspect ratio.
* [Fix] Mark resolved threads as read in real time, refresh list when thread resolved status is updated (#6407)
* fix: Font size fixed for consistency between select and multi-select widget (#6400)
* Skip btn comment onboarding (#6331)
* [Fix] Reset comment mode hotkey (#6401)
* Welcome tour GIF and Close button fixes (#6309)
* * Chaged New Query GIF
* Added close button for welcome tour final page
* Changed Run GIF
* Sticky sidebar z-index change
* Added testcases
* Replaced hardcoded colors and text with constants
* Fix: Set a default option in select widget while adding from suggested widgets (#6236)
* Fix jest test for comments by overriding isCommentMode selector (#6027)
* Fix download with URL issue (#6179)
* Bump tar from 6.0.5 to 6.1.6 in /app/client (#6392)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.6)
---
updated-dependencies:
- dependency-name: tar
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update CRUD template For S3 page (#6426)
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
* Cypress tests for commenting feature (#5505)
* Minor fixes for comments on the modal widget (#6368)
* Update permission check for determining a user with dev access for comments intro (#6431)
* Prevent Entire Editor Header from re rendering (#6415)
* Seperate save indicator without rerendering entire Editor Header
* stop unnecessary update to Saved message every second
* moving raw strings to messages
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* [Fix] Focus the comment thread when opened after dismissing (#6437)
* Dont fetch feature flags if not logged in (#6444)
* Update README.md
Fixed a spelling mistake
* Fix: Parse api body to be shown as an object in debugger if possible (#6249)
* Fix: List Widget issues (#6226)
* fix binding
* fix multiple binding not working issue
* use box shadow inset + fix gap issue
* fix container z index issue
* fix resize ux issue
* update container height
* allow selecting list widget only when the property pane is not visible
* fix resize handle overflow issue
* fix dot issue in current item structure + fix resize issue for template
* fix select widget not workign inside list widget issue
* remove unused keys
* fix jest test
* fix derived.js test
* add undefiend check
* add currentIndex for autocomplete
* revert white color to transparent for list container
* fix pagination wrong calculation
* remove beta tag
* fix issue with cypress test failing
* fix issue with dropdown widget
* fix the boolean value issue
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
* [Bugfix] Empty object creation in published pages for application object fixed
* Omnibar redesign (#6288)
Omni bar would now have the categories navigation and documentation.
* [skip_changelog] Form login disabled after user uses OAuth login method (#6425)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* changed default image to old value loading from cloudinary (#6467)
* Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors
* emitting an event only when socket is connected
* added a tooltip to show username/email
* using proper selector
* using theme
* created the separate component for listing editors
* created a separate hook for app collab events
* moved collab user type to /entities
* moved user visible strings to message constants
* Revert "moved user visible strings to message constants"
This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.
* made provision to reset the concurrent editors list
* Enable auto-start after VM restart (#6428)
* BUG-6029 : Property pane for iFrame widget does not appear on clicking on widget (#6260)
-- Add a overlaid div for iframe
* Added fix for cmd + enter not running google sheets actions (#6446)
* Fix-Catch invalid google recaptcha v3 key error (#6034)
* Handle invalid google recaptcha v3 key
* changed default divider color to light grey (#6335)
* fixed issue where the resize cursor did not appear on the left hand side of the widget (#6380)
* Add null check for the nested data structure (#6479)
* Add null check for the nested data structure
* Add unit test for the null nested data
* Adding a max size of approximately 1 MB of data fetched using appsmith (#6491)
* WIP Restrict fetch size
* Adding a cut off of approximately 1 MB of data fetched in postgres plugin
* Code cleanup
* Minor cleanup
* [Fix] Minor comments feature fixes (#6490)
* Fix skip btn
* update sorting for mentions list
* Show server logs when create cypress user fails
* [Fix test spec]Create a new org for the comments test so existing user roles don't exist (#6477)
* Revert "Supporting all ASCII characters in table widget (#6041)" (#6429)
This reverts commit 3ae1bd6d95da42530df356b9c14e7e4f547372ea.
* Updated flaky test (#6486)
* Updated flaky test
* updated another test
* Store MongoDB creds in separate file from install.sh (#6499)
* Store MongoDB creds in separate file from install.sh
* Move MongoDB credentials to docker.env
* Add Analytics to Generate CRUD template feat (#6503)
* Add Analytics to Generate CRUD template feat
* Add analytics event on datasource click
* Send pluginName instead of plugin obj in analytics
* Fix: Adding checks before we check for disallowCopy (#6214)
* Fix: Adding checks to before we check for disallowCopy
* Adding checks for undo logic when a child delete is undone but the parent is already deleted.
* restore widgets if they have their parent available.
* reported bugs.
* undo only when parent exists.
* Hotfix Table Widget crashes when there is a cyclical dependency (#6505)
* FIX #5254 : dropdown height fixed and made scrollable (#6170)
* will widget pane if user moves away from canvas (#6516)
* Fix: intercom triggers are not working properly (#6512)
* initializing the intercom as soon as the help components are mounted.
* removed log
* Fix: Undo-Delete of Containers fix (#6510)
* Encrypt attributes (#6508)
* encrypt attributes
* updated references to DOM targets for accessing the Mock User datasource
* Fix/omnibar landing bug (#6513)
* hide certificate string using dots on UI (#6533)
* replace actual certificate string with '*' like it is done for hiding password on the UI.
* Updated Template
* fixed failing cypress tests
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Paul Li <82799722+wmdev0808@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Nayan <83352306+nayan-rafiq@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: Bhavin K <58818598+techbhavin@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Yash Vibhandik <vibhandikyash@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Confidence Okoghenun <cokoghenun@gmail.com>
Co-authored-by: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com>
Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: abhishek nayak <nayak.abhishek@gmail.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Nipun Agarwal <31271538+nipun1999@users.noreply.github.com>
Co-authored-by: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2021-08-13 08:42:29 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillPostgresDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["postgres-host"] + " "
|
|
|
|
|
: datasourceFormData["postgres-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["postgres-databaseName"] + " "
|
|
|
|
|
: datasourceFormData["postgres-databaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.host).type(hostAddress);
|
|
|
|
|
cy.get(datasourceEditor.port).type(datasourceFormData["postgres-port"]);
|
|
|
|
|
cy.get(datasourceEditor.databaseName)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(databaseName);
|
2020-05-11 09:03:46 +00:00
|
|
|
|
Hotfix/trailing white spaces in mysql datasource configuration (#6227)
* trimmed white spaces in datasource configuration
* Added cypress tests for MySQLdatasource
* fixed trailing whitespaces bug in mysql datasource configuration
* Fix overflowing text in toasts on safari (#6200)
* [Feature] Generate template page from datasource (#5513)
- Add Generate CRUD page feature
- Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit.
- Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component.
If `renderOption` prop is not defined, it will show default option UI.
- Add getDatasourcesStructure [new entity Selector]
( This will provide all fetched structure of datasources)
> Commit Messages ⬇️
* Show disabled GenPage Button for unsupported DS
* Add Icon in Select Table and Column dropdown
* Add Error message when datasource config has error
* Fix the continous loading state issue
* Add Not supported datasource in select Table
* Add ignoreCache when fetching DS struct
* Go to generate page if initiator=generate-page
* Fix connect new datasource button disabled
* Modify error message for invalid datasource struct
* Add snowflake to supported plugin for template
* Fix Show More option width
* Fix incorrect error msg for valid dS config
* Generate page UI improvements
* Refactor navigation
* Fix Datasource Card UX
* Remove semi-colon from Icon loader
* Refactor contants
* Add executeDatasourceQuery & fetchPluginForm API
- WIP google sheet form UI and functionality
- Implemented fetch all spreadsheet with mock data
* disable S3 and google sheet for generate page
* Update yarn.lock
* Resolve review comments
- Add Messages to `constants/messages`
- Add default value for `fetchActionsForPage` 2nd param
- Add comment
- Remove `onFinishCallback` from `handleFetchedPage`
* move string literal to constants/messages
* Remove hardcoded pluginId implementation
* Refactor getGenerateCRUDEnabledPluginMap selector
* Fix CreateAppInFirstListedOrg test command
* Add getIsGeneratePageInitiator helper func
* Fix Entity explorer Edit option test
* Fix CreateAppForOrg test command
- Add click on build from scratch in generatePage
* Fix deleteDatasource command test
- Click on Datasource Name to Edit, Datasource Card handles the click
* Fix DynamicLayout spec test issue
* Fix pageLoadSpec test
* Disable google plugin & Refactor
- Add useDatasourceOptions hook
* Add datasourceCardMenu in DatasourceEditor.json
* Fix issues
- Add Icon hover clickable control
- Auth API click handler
* Fix Createpage test command
* Add cypress test for generate page flow
* Fix cypress test
* Add Analytics
* Add comments in CloseEditor
* Rename initiator to isGeneratePageMode
* Disable S3 for generate CRUD page
* Fix generate page from existing datasource issue
* Enhance test to verify if data is fetched properly
* Wait for get Actions before execute actions
* Change the cypress route for excute api
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Fix xss redirectURL (#6229)
* Update msg
* Revert "Update msg"
This reverts commit 0ac70ea7e9c10a0708432333e6f67004150d98dc.
* Fix JS error message showing callstack in firefox (#6234)
* Adding expiry of 30 days to session cookies (#6224)
Fixes #5872
Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.
* Removing release-drafter github action (#6248)
* Add Skip tour button in welcome onboarding (#6158)
This allows users to skip the welcome tour, there is an End tour button already present but wasn't easily accessible.
* Fix - #6221 new nav analytics improvements (#6223)
* fixed redirection on connect data click. and updated analytics
* Added generic analytics for all datasource cards
* Add missed new nav analytics for connections (#6233)
* Log event when property pane connected entity is clicked
- Also update screen to source
* Add missed analytic event when user navigates to entity from property pane connection
- Also add entity type info to event
- Refactor to make this happen by moving useGetEntityInfo hook to debugger hooks
* [Fix] Small UI improvements to suggested widgets section (#6190)
* added slight transition to suggested widgets. Adjusted the height of arrows in relationship.
* minor fixes to back btn style in suggested widgets panel
* fixed the size of collapsible icon
* removed a comment
* Fix NPE when Segment key not available correctly (#6244)
* Using local Postgres database instead of remote (#6241)
* Using local Postgres database instead of remote
* Added createdb and usedb at the top
* FEATURE-5852 : make the iframe widget message property accessible (#5897)
-- Add a new meta property for receiving the message from an iframe. Now the user can simply refer to {{iframe.message}} to access the data they receive in an API or widget.
* Disable tern in view mode (#6203)
* Fixed ExecutionParams (#6284)
* Fix test by mocking the response (#6273)
* added cypress tests for users mock datasource
* Fix: Mark comment threads as viewed when they are resolved (#6251)
* -log widget type in analytics service when new thread created
-set viewed=true for resolved threads
* fixed typo
* fix the test case when there is not widget type
* Add analytics event for mock-data creation (#6136)
* Add analytics event for mockdata creation
* Use the correct name for the mockdatasource
* Added FE analytics for mock datasource
* Changes per review
* Remove the method call
* Fix indentation issue
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Missing validations (#6281)
* Fix validations for certain scenarios which were missed earlier
* Minor comments feature fixes (#6245)
* Fix comment card click: set visible thread (#6166)
* Fixing bug where the comment feature flag was disabled for all users
* [Fix] Refresh sidebar comments list when a thread is unresolved (#6326)
* fix stop Rich text Editor from crashing on Modal (#6077)
* changed RTE removal mechanism
* modified changes to remove just before initializing
* tinyMCE patch for firefox
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Sentry typeError fix, with checks (#6256)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Supporting all ASCII characters in table widget (#6041)
* Updated labels Mock data to Sample data (#6330)
* [perf] propertyControl re-rendering (#5941)
* prevent unnecessry re-renders on property control keyPress
* Changes to memoize with useSelector
* propertyControl re-rendering initial commit
* Optimized and Generalized PropertyControl
* Updating Property Dependencies
* removing useCallback and replacing WidgetEnhancementHelpers with selector
* nested property path changes
* reverting name Change
* tests fixes and adding dependencies for validation structure
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
* more conditions for run check (#6255)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Fix comment card click at the view mode (#6332)
* Fix unnecessary renders of ActionCreator, EntityName, CodeEditor and ActionEntityContextMenu (#6242)
* Fix action creator unnecessary render issue
- Optimize the selectors and hooks to return new values only when something has changed.
* Fix ActionEntityContextMenu re-renders issue
* Prevent rerenders of EntityName component
* Fix CodeEditor re-renders
* Use createSelector instead of memoization.
* Cleanup
* - Remove whyDidYouRender
Co-authored-by: Satish Gandham <satish@appsmith.com>
* Multiselect Widget (#5228)
We have now separated the multi-select from the select widget, This has simplified the implementation and helped us resolve any issues we where facing because of the complexity bought by both under the same hood and has also increased the discoverability of the widget for our end users. We have also simultaneously taken up multiple enhancements related to the select and multi-select widget.
* Added instance Id in analytics datapoint (#6252)
* Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant
* Remove type from InputTypes in InputWidget
* Remove type from ReduxActionTypes
* Remove type from ReduxErrorActionTypes
* Remove type from SocialLoginTypes
* Fix widget actions issues
* Remove OPEN_SUB_PANE commented redux action
* updated cypress tests to account for testing trailing spaces in db name and host address
* removed unparsed token
* Commenting test (#6354)
* Add list buckets API to S3 (#6334)
* Add list buckets action method to S3
* Added TC for list bucket method
* FIX #6324 : reset recaptcha token on click and handled button loading explicitly (#6337)
reset re-captcha token on click and handled button loading explicitly such that the user know that the api call has not finished
* Added null check to verify empty layout in generate CRUD page flow (#6359)
* Fix authentication issue while creating mockdata (#6294)
* Re set password to avoid double encryption while creating suffix datasource
* Add test to query on mockdata source
* Check the Authentication type before setting the password
* updated cypress tests for mock datasource
* fixed cypress failing datasources tests
* Fix: Update debugger placeholder text for non-mac (#6142)
* Added logic to show form data requests in debugger (#6350)
* Added logic to show form data requests in debugger
* Tests and comments
* Tests
* Tern server performance fix and Best match fix (#6338)
* Uncomment Gen CRUD page Test (#6371)
* Reorganised test steps to utilise retry action (#6208)
* updated spec with assertion values (#6323)
* updated spec with assert
* updated test
* updated test
* updated dsl
* Improvement: Add limit on password length in user signup (#6312)
* -add max password validation in FE and password validation in BE for signup
* -added unit test for password length limit
* - set max password length to 48
- add password length check in reset password
* -removed password limit check from login
* Fix binding query for the nested data responses (#6372)
* Fix binding query for the nested data responses
* Fix formatting issues and add comments
* Updated comments
* remove code duplications
* Fix: Keep inspect entity in sync with the widget selection in the entity explorer
* docs: Updates event archive
* Navigation Dropdown feedback Changes (#6119)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Feature: Add API to set and get concurrent app editors (#6292)
* -add an API in RTS to store and retrieve currently online users of an application
* -handled the case when edit app event received before user is authenticated
* -updated authentication API in rts
* close modal on cancel btn click (#6383)
The cancel button in the modal will now by default have the close action configured.
* Button and chart fixes (#6373)
* Added new file button file and fixed the bugs in chart and button
Added new file button file and fixed the bugs in chart and button
* Fixed JS toggle for Button widget
* changed border radius of multiselect widget to 0px (#6349)
* open link inside text component in a new tab (#6205)
* Fix loading test data for Cypress tests in CodeBuild
* Change dropdown widget to select widget in Github labels for automation to work properly (#6386)
* Updating k8s README to point to docs.appsmith.com
* iFrame - When the source url is removed message should be displayed in iframe similar to other widgets (#6295)
* FIX-5414 : iFrame - When the source url is removed message is be displayed within the component
* BUG : Iframe widget: wrong placeholder `Title` (#6053)
Rectified the wrong placeholder in the iframe widget title property.
* Use feature flag api to enable/disable comments (#6322)
* Check if comments are enabled for comment intro modal (#6395)
* Fix ts error release (#6396)
* updated common method (#6397)
* Fix #5740 - Api actions are treated as queries (#6381)
* updated active datasources pane carry proper cta to create new action
* properly creating action names in either api/query context
* added a new separate new api/query btn component
* moved empty datasources warning to messages
* fix: wrap overflow option in multiselect such that all option checkboxes are available(#6403)
* Fix #6160 Updated Text binding for row and removed variable evaluation - Default table data (#6360)
* Icon Button Widget (#5723)
Introducing the **Floating action button / Icon button**. Now you can use this to show small actions as icons. We have added a bunch of styling customisation to this as well. You can bind an onClick action to this and easily trigger an even. The component also automatically resizes within the widget as you scale it while maintaining the right aspect ratio.
* [Fix] Mark resolved threads as read in real time, refresh list when thread resolved status is updated (#6407)
* fix: Font size fixed for consistency between select and multi-select widget (#6400)
* Skip btn comment onboarding (#6331)
* [Fix] Reset comment mode hotkey (#6401)
* Welcome tour GIF and Close button fixes (#6309)
* * Chaged New Query GIF
* Added close button for welcome tour final page
* Changed Run GIF
* Sticky sidebar z-index change
* Added testcases
* Replaced hardcoded colors and text with constants
* Fix: Set a default option in select widget while adding from suggested widgets (#6236)
* Fix jest test for comments by overriding isCommentMode selector (#6027)
* Fix download with URL issue (#6179)
* Bump tar from 6.0.5 to 6.1.6 in /app/client (#6392)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.6)
---
updated-dependencies:
- dependency-name: tar
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update CRUD template For S3 page (#6426)
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
* Cypress tests for commenting feature (#5505)
* Minor fixes for comments on the modal widget (#6368)
* Update permission check for determining a user with dev access for comments intro (#6431)
* Prevent Entire Editor Header from re rendering (#6415)
* Seperate save indicator without rerendering entire Editor Header
* stop unnecessary update to Saved message every second
* moving raw strings to messages
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* [Fix] Focus the comment thread when opened after dismissing (#6437)
* Dont fetch feature flags if not logged in (#6444)
* Update README.md
Fixed a spelling mistake
* Fix: Parse api body to be shown as an object in debugger if possible (#6249)
* Fix: List Widget issues (#6226)
* fix binding
* fix multiple binding not working issue
* use box shadow inset + fix gap issue
* fix container z index issue
* fix resize ux issue
* update container height
* allow selecting list widget only when the property pane is not visible
* fix resize handle overflow issue
* fix dot issue in current item structure + fix resize issue for template
* fix select widget not workign inside list widget issue
* remove unused keys
* fix jest test
* fix derived.js test
* add undefiend check
* add currentIndex for autocomplete
* revert white color to transparent for list container
* fix pagination wrong calculation
* remove beta tag
* fix issue with cypress test failing
* fix issue with dropdown widget
* fix the boolean value issue
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
* [Bugfix] Empty object creation in published pages for application object fixed
* Omnibar redesign (#6288)
Omni bar would now have the categories navigation and documentation.
* [skip_changelog] Form login disabled after user uses OAuth login method (#6425)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* changed default image to old value loading from cloudinary (#6467)
* Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors
* emitting an event only when socket is connected
* added a tooltip to show username/email
* using proper selector
* using theme
* created the separate component for listing editors
* created a separate hook for app collab events
* moved collab user type to /entities
* moved user visible strings to message constants
* Revert "moved user visible strings to message constants"
This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.
* made provision to reset the concurrent editors list
* Enable auto-start after VM restart (#6428)
* BUG-6029 : Property pane for iFrame widget does not appear on clicking on widget (#6260)
-- Add a overlaid div for iframe
* Added fix for cmd + enter not running google sheets actions (#6446)
* Fix-Catch invalid google recaptcha v3 key error (#6034)
* Handle invalid google recaptcha v3 key
* changed default divider color to light grey (#6335)
* fixed issue where the resize cursor did not appear on the left hand side of the widget (#6380)
* Add null check for the nested data structure (#6479)
* Add null check for the nested data structure
* Add unit test for the null nested data
* Adding a max size of approximately 1 MB of data fetched using appsmith (#6491)
* WIP Restrict fetch size
* Adding a cut off of approximately 1 MB of data fetched in postgres plugin
* Code cleanup
* Minor cleanup
* [Fix] Minor comments feature fixes (#6490)
* Fix skip btn
* update sorting for mentions list
* Show server logs when create cypress user fails
* [Fix test spec]Create a new org for the comments test so existing user roles don't exist (#6477)
* Revert "Supporting all ASCII characters in table widget (#6041)" (#6429)
This reverts commit 3ae1bd6d95da42530df356b9c14e7e4f547372ea.
* Updated flaky test (#6486)
* Updated flaky test
* updated another test
* Store MongoDB creds in separate file from install.sh (#6499)
* Store MongoDB creds in separate file from install.sh
* Move MongoDB credentials to docker.env
* Add Analytics to Generate CRUD template feat (#6503)
* Add Analytics to Generate CRUD template feat
* Add analytics event on datasource click
* Send pluginName instead of plugin obj in analytics
* Fix: Adding checks before we check for disallowCopy (#6214)
* Fix: Adding checks to before we check for disallowCopy
* Adding checks for undo logic when a child delete is undone but the parent is already deleted.
* restore widgets if they have their parent available.
* reported bugs.
* undo only when parent exists.
* Hotfix Table Widget crashes when there is a cyclical dependency (#6505)
* FIX #5254 : dropdown height fixed and made scrollable (#6170)
* will widget pane if user moves away from canvas (#6516)
* Fix: intercom triggers are not working properly (#6512)
* initializing the intercom as soon as the help components are mounted.
* removed log
* Fix: Undo-Delete of Containers fix (#6510)
* Encrypt attributes (#6508)
* encrypt attributes
* updated references to DOM targets for accessing the Mock User datasource
* Fix/omnibar landing bug (#6513)
* hide certificate string using dots on UI (#6533)
* replace actual certificate string with '*' like it is done for hiding password on the UI.
* Updated Template
* fixed failing cypress tests
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Paul Li <82799722+wmdev0808@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Nayan <83352306+nayan-rafiq@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: Bhavin K <58818598+techbhavin@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Yash Vibhandik <vibhandikyash@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Confidence Okoghenun <cokoghenun@gmail.com>
Co-authored-by: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com>
Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: abhishek nayak <nayak.abhishek@gmail.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Nipun Agarwal <31271538+nipun1999@users.noreply.github.com>
Co-authored-by: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2021-08-13 08:42:29 +00:00
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor.username).type(
|
|
|
|
|
datasourceFormData["postgres-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.password).type(
|
|
|
|
|
datasourceFormData["postgres-password"],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-06-12 05:09:49 +00:00
|
|
|
|
2021-08-24 08:46:52 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillMySQLDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mysql-host"] + " "
|
|
|
|
|
: datasourceFormData["mysql-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mysql-databaseName"] + " "
|
|
|
|
|
: datasourceFormData["mysql-databaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.host).type(hostAddress);
|
|
|
|
|
cy.get(datasourceEditor.port).type(datasourceFormData["mysql-port"]);
|
|
|
|
|
cy.get(datasourceEditor.databaseName)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(databaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor.username).type(
|
|
|
|
|
datasourceFormData["mysql-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.password).type(
|
|
|
|
|
datasourceFormData["mysql-password"],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-08-27 11:54:03 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillMsSQLDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mssql-host"] + " "
|
|
|
|
|
: datasourceFormData["mssql-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["mssql-databaseName"] + " "
|
|
|
|
|
: datasourceFormData["mssql-databaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.host).type(hostAddress);
|
|
|
|
|
cy.get(datasourceEditor.port).type(datasourceFormData["mssql-port"]);
|
|
|
|
|
cy.get(datasourceEditor.databaseName)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(databaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor.username).type(
|
|
|
|
|
datasourceFormData["mssql-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.password).type(
|
|
|
|
|
datasourceFormData["mssql-password"],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillArangoDBDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["arango-host"] + " "
|
|
|
|
|
: datasourceFormData["arango-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["arango-databaseName"] + " "
|
|
|
|
|
: datasourceFormData["arango-databaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.host).type(hostAddress);
|
|
|
|
|
cy.get(datasourceEditor.port).type(datasourceFormData["arango-port"]);
|
|
|
|
|
cy.get(datasourceEditor.databaseName)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(databaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor.username).type(
|
|
|
|
|
datasourceFormData["arango-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.password).type(
|
|
|
|
|
datasourceFormData["arango-password"],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillRedshiftDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const hostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["redshift-host"] + " "
|
|
|
|
|
: datasourceFormData["redshift-host"];
|
|
|
|
|
const databaseName = shouldAddTrailingSpaces
|
|
|
|
|
? datasourceFormData["redshift-databaseName"] + " "
|
|
|
|
|
: datasourceFormData["redshift-databaseName"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.host).type(hostAddress);
|
|
|
|
|
cy.get(datasourceEditor.port).type(datasourceFormData["redshift-port"]);
|
|
|
|
|
cy.get(datasourceEditor.databaseName)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(databaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor.sectionAuthentication).click();
|
|
|
|
|
cy.get(datasourceEditor.username).type(
|
|
|
|
|
datasourceFormData["redshift-username"],
|
|
|
|
|
);
|
|
|
|
|
cy.get(datasourceEditor.password).type(
|
|
|
|
|
datasourceFormData["redshift-password"],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
Hotfix/trailing white spaces in mysql datasource configuration (#6227)
* trimmed white spaces in datasource configuration
* Added cypress tests for MySQLdatasource
* fixed trailing whitespaces bug in mysql datasource configuration
* Fix overflowing text in toasts on safari (#6200)
* [Feature] Generate template page from datasource (#5513)
- Add Generate CRUD page feature
- Modify the Datasource card UI in the `INTEGRATION.ACTIVE` tab to directly delete and edit.
- Add `renderOption` , `errorMsg`, `isLoading` props in Dropdown component.
If `renderOption` prop is not defined, it will show default option UI.
- Add getDatasourcesStructure [new entity Selector]
( This will provide all fetched structure of datasources)
> Commit Messages ⬇️
* Show disabled GenPage Button for unsupported DS
* Add Icon in Select Table and Column dropdown
* Add Error message when datasource config has error
* Fix the continous loading state issue
* Add Not supported datasource in select Table
* Add ignoreCache when fetching DS struct
* Go to generate page if initiator=generate-page
* Fix connect new datasource button disabled
* Modify error message for invalid datasource struct
* Add snowflake to supported plugin for template
* Fix Show More option width
* Fix incorrect error msg for valid dS config
* Generate page UI improvements
* Refactor navigation
* Fix Datasource Card UX
* Remove semi-colon from Icon loader
* Refactor contants
* Add executeDatasourceQuery & fetchPluginForm API
- WIP google sheet form UI and functionality
- Implemented fetch all spreadsheet with mock data
* disable S3 and google sheet for generate page
* Update yarn.lock
* Resolve review comments
- Add Messages to `constants/messages`
- Add default value for `fetchActionsForPage` 2nd param
- Add comment
- Remove `onFinishCallback` from `handleFetchedPage`
* move string literal to constants/messages
* Remove hardcoded pluginId implementation
* Refactor getGenerateCRUDEnabledPluginMap selector
* Fix CreateAppInFirstListedOrg test command
* Add getIsGeneratePageInitiator helper func
* Fix Entity explorer Edit option test
* Fix CreateAppForOrg test command
- Add click on build from scratch in generatePage
* Fix deleteDatasource command test
- Click on Datasource Name to Edit, Datasource Card handles the click
* Fix DynamicLayout spec test issue
* Fix pageLoadSpec test
* Disable google plugin & Refactor
- Add useDatasourceOptions hook
* Add datasourceCardMenu in DatasourceEditor.json
* Fix issues
- Add Icon hover clickable control
- Auth API click handler
* Fix Createpage test command
* Add cypress test for generate page flow
* Fix cypress test
* Add Analytics
* Add comments in CloseEditor
* Rename initiator to isGeneratePageMode
* Disable S3 for generate CRUD page
* Fix generate page from existing datasource issue
* Enhance test to verify if data is fetched properly
* Wait for get Actions before execute actions
* Change the cypress route for excute api
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Fix xss redirectURL (#6229)
* Update msg
* Revert "Update msg"
This reverts commit 0ac70ea7e9c10a0708432333e6f67004150d98dc.
* Fix JS error message showing callstack in firefox (#6234)
* Adding expiry of 30 days to session cookies (#6224)
Fixes #5872
Adding an expiry of 30 days to the cookie to ensure that browsers don't delete the cookie when the browser session is closed.
* Removing release-drafter github action (#6248)
* Add Skip tour button in welcome onboarding (#6158)
This allows users to skip the welcome tour, there is an End tour button already present but wasn't easily accessible.
* Fix - #6221 new nav analytics improvements (#6223)
* fixed redirection on connect data click. and updated analytics
* Added generic analytics for all datasource cards
* Add missed new nav analytics for connections (#6233)
* Log event when property pane connected entity is clicked
- Also update screen to source
* Add missed analytic event when user navigates to entity from property pane connection
- Also add entity type info to event
- Refactor to make this happen by moving useGetEntityInfo hook to debugger hooks
* [Fix] Small UI improvements to suggested widgets section (#6190)
* added slight transition to suggested widgets. Adjusted the height of arrows in relationship.
* minor fixes to back btn style in suggested widgets panel
* fixed the size of collapsible icon
* removed a comment
* Fix NPE when Segment key not available correctly (#6244)
* Using local Postgres database instead of remote (#6241)
* Using local Postgres database instead of remote
* Added createdb and usedb at the top
* FEATURE-5852 : make the iframe widget message property accessible (#5897)
-- Add a new meta property for receiving the message from an iframe. Now the user can simply refer to {{iframe.message}} to access the data they receive in an API or widget.
* Disable tern in view mode (#6203)
* Fixed ExecutionParams (#6284)
* Fix test by mocking the response (#6273)
* added cypress tests for users mock datasource
* Fix: Mark comment threads as viewed when they are resolved (#6251)
* -log widget type in analytics service when new thread created
-set viewed=true for resolved threads
* fixed typo
* fix the test case when there is not widget type
* Add analytics event for mock-data creation (#6136)
* Add analytics event for mockdata creation
* Use the correct name for the mockdatasource
* Added FE analytics for mock datasource
* Changes per review
* Remove the method call
* Fix indentation issue
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
* Missing validations (#6281)
* Fix validations for certain scenarios which were missed earlier
* Minor comments feature fixes (#6245)
* Fix comment card click: set visible thread (#6166)
* Fixing bug where the comment feature flag was disabled for all users
* [Fix] Refresh sidebar comments list when a thread is unresolved (#6326)
* fix stop Rich text Editor from crashing on Modal (#6077)
* changed RTE removal mechanism
* modified changes to remove just before initializing
* tinyMCE patch for firefox
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Sentry typeError fix, with checks (#6256)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Supporting all ASCII characters in table widget (#6041)
* Updated labels Mock data to Sample data (#6330)
* [perf] propertyControl re-rendering (#5941)
* prevent unnecessry re-renders on property control keyPress
* Changes to memoize with useSelector
* propertyControl re-rendering initial commit
* Optimized and Generalized PropertyControl
* Updating Property Dependencies
* removing useCallback and replacing WidgetEnhancementHelpers with selector
* nested property path changes
* reverting name Change
* tests fixes and adding dependencies for validation structure
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Snowflake get structure error resolved for columns query (#6316)
* Table name reference copied from templates body to avoid misconfiguration in action body
* more conditions for run check (#6255)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Fix comment card click at the view mode (#6332)
* Fix unnecessary renders of ActionCreator, EntityName, CodeEditor and ActionEntityContextMenu (#6242)
* Fix action creator unnecessary render issue
- Optimize the selectors and hooks to return new values only when something has changed.
* Fix ActionEntityContextMenu re-renders issue
* Prevent rerenders of EntityName component
* Fix CodeEditor re-renders
* Use createSelector instead of memoization.
* Cleanup
* - Remove whyDidYouRender
Co-authored-by: Satish Gandham <satish@appsmith.com>
* Multiselect Widget (#5228)
We have now separated the multi-select from the select widget, This has simplified the implementation and helped us resolve any issues we where facing because of the complexity bought by both under the same hood and has also increased the discoverability of the widget for our end users. We have also simultaneously taken up multiple enhancements related to the select and multi-select widget.
* Added instance Id in analytics datapoint (#6252)
* Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant
* Remove type from InputTypes in InputWidget
* Remove type from ReduxActionTypes
* Remove type from ReduxErrorActionTypes
* Remove type from SocialLoginTypes
* Fix widget actions issues
* Remove OPEN_SUB_PANE commented redux action
* updated cypress tests to account for testing trailing spaces in db name and host address
* removed unparsed token
* Commenting test (#6354)
* Add list buckets API to S3 (#6334)
* Add list buckets action method to S3
* Added TC for list bucket method
* FIX #6324 : reset recaptcha token on click and handled button loading explicitly (#6337)
reset re-captcha token on click and handled button loading explicitly such that the user know that the api call has not finished
* Added null check to verify empty layout in generate CRUD page flow (#6359)
* Fix authentication issue while creating mockdata (#6294)
* Re set password to avoid double encryption while creating suffix datasource
* Add test to query on mockdata source
* Check the Authentication type before setting the password
* updated cypress tests for mock datasource
* fixed cypress failing datasources tests
* Fix: Update debugger placeholder text for non-mac (#6142)
* Added logic to show form data requests in debugger (#6350)
* Added logic to show form data requests in debugger
* Tests and comments
* Tests
* Tern server performance fix and Best match fix (#6338)
* Uncomment Gen CRUD page Test (#6371)
* Reorganised test steps to utilise retry action (#6208)
* updated spec with assertion values (#6323)
* updated spec with assert
* updated test
* updated test
* updated dsl
* Improvement: Add limit on password length in user signup (#6312)
* -add max password validation in FE and password validation in BE for signup
* -added unit test for password length limit
* - set max password length to 48
- add password length check in reset password
* -removed password limit check from login
* Fix binding query for the nested data responses (#6372)
* Fix binding query for the nested data responses
* Fix formatting issues and add comments
* Updated comments
* remove code duplications
* Fix: Keep inspect entity in sync with the widget selection in the entity explorer
* docs: Updates event archive
* Navigation Dropdown feedback Changes (#6119)
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* Feature: Add API to set and get concurrent app editors (#6292)
* -add an API in RTS to store and retrieve currently online users of an application
* -handled the case when edit app event received before user is authenticated
* -updated authentication API in rts
* close modal on cancel btn click (#6383)
The cancel button in the modal will now by default have the close action configured.
* Button and chart fixes (#6373)
* Added new file button file and fixed the bugs in chart and button
Added new file button file and fixed the bugs in chart and button
* Fixed JS toggle for Button widget
* changed border radius of multiselect widget to 0px (#6349)
* open link inside text component in a new tab (#6205)
* Fix loading test data for Cypress tests in CodeBuild
* Change dropdown widget to select widget in Github labels for automation to work properly (#6386)
* Updating k8s README to point to docs.appsmith.com
* iFrame - When the source url is removed message should be displayed in iframe similar to other widgets (#6295)
* FIX-5414 : iFrame - When the source url is removed message is be displayed within the component
* BUG : Iframe widget: wrong placeholder `Title` (#6053)
Rectified the wrong placeholder in the iframe widget title property.
* Use feature flag api to enable/disable comments (#6322)
* Check if comments are enabled for comment intro modal (#6395)
* Fix ts error release (#6396)
* updated common method (#6397)
* Fix #5740 - Api actions are treated as queries (#6381)
* updated active datasources pane carry proper cta to create new action
* properly creating action names in either api/query context
* added a new separate new api/query btn component
* moved empty datasources warning to messages
* fix: wrap overflow option in multiselect such that all option checkboxes are available(#6403)
* Fix #6160 Updated Text binding for row and removed variable evaluation - Default table data (#6360)
* Icon Button Widget (#5723)
Introducing the **Floating action button / Icon button**. Now you can use this to show small actions as icons. We have added a bunch of styling customisation to this as well. You can bind an onClick action to this and easily trigger an even. The component also automatically resizes within the widget as you scale it while maintaining the right aspect ratio.
* [Fix] Mark resolved threads as read in real time, refresh list when thread resolved status is updated (#6407)
* fix: Font size fixed for consistency between select and multi-select widget (#6400)
* Skip btn comment onboarding (#6331)
* [Fix] Reset comment mode hotkey (#6401)
* Welcome tour GIF and Close button fixes (#6309)
* * Chaged New Query GIF
* Added close button for welcome tour final page
* Changed Run GIF
* Sticky sidebar z-index change
* Added testcases
* Replaced hardcoded colors and text with constants
* Fix: Set a default option in select widget while adding from suggested widgets (#6236)
* Fix jest test for comments by overriding isCommentMode selector (#6027)
* Fix download with URL issue (#6179)
* Bump tar from 6.0.5 to 6.1.6 in /app/client (#6392)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.5 to 6.1.6.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.5...v6.1.6)
---
updated-dependencies:
- dependency-name: tar
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update CRUD template For S3 page (#6426)
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
* Cypress tests for commenting feature (#5505)
* Minor fixes for comments on the modal widget (#6368)
* Update permission check for determining a user with dev access for comments intro (#6431)
* Prevent Entire Editor Header from re rendering (#6415)
* Seperate save indicator without rerendering entire Editor Header
* stop unnecessary update to Saved message every second
* moving raw strings to messages
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
* [Fix] Focus the comment thread when opened after dismissing (#6437)
* Dont fetch feature flags if not logged in (#6444)
* Update README.md
Fixed a spelling mistake
* Fix: Parse api body to be shown as an object in debugger if possible (#6249)
* Fix: List Widget issues (#6226)
* fix binding
* fix multiple binding not working issue
* use box shadow inset + fix gap issue
* fix container z index issue
* fix resize ux issue
* update container height
* allow selecting list widget only when the property pane is not visible
* fix resize handle overflow issue
* fix dot issue in current item structure + fix resize issue for template
* fix select widget not workign inside list widget issue
* remove unused keys
* fix jest test
* fix derived.js test
* add undefiend check
* add currentIndex for autocomplete
* revert white color to transparent for list container
* fix pagination wrong calculation
* remove beta tag
* fix issue with cypress test failing
* fix issue with dropdown widget
* fix the boolean value issue
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
* [Bugfix] Empty object creation in published pages for application object fixed
* Omnibar redesign (#6288)
Omni bar would now have the categories navigation and documentation.
* [skip_changelog] Form login disabled after user uses OAuth login method (#6425)
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* changed default image to old value loading from cloudinary (#6467)
* Feature: Show a list of realtime app editors (#6286)
* Added support for showing realtime app editors
* emitting an event only when socket is connected
* added a tooltip to show username/email
* using proper selector
* using theme
* created the separate component for listing editors
* created a separate hook for app collab events
* moved collab user type to /entities
* moved user visible strings to message constants
* Revert "moved user visible strings to message constants"
This reverts commit 04ac18a188b0117dd364ad764a4e0103bfd28ef6.
* made provision to reset the concurrent editors list
* Enable auto-start after VM restart (#6428)
* BUG-6029 : Property pane for iFrame widget does not appear on clicking on widget (#6260)
-- Add a overlaid div for iframe
* Added fix for cmd + enter not running google sheets actions (#6446)
* Fix-Catch invalid google recaptcha v3 key error (#6034)
* Handle invalid google recaptcha v3 key
* changed default divider color to light grey (#6335)
* fixed issue where the resize cursor did not appear on the left hand side of the widget (#6380)
* Add null check for the nested data structure (#6479)
* Add null check for the nested data structure
* Add unit test for the null nested data
* Adding a max size of approximately 1 MB of data fetched using appsmith (#6491)
* WIP Restrict fetch size
* Adding a cut off of approximately 1 MB of data fetched in postgres plugin
* Code cleanup
* Minor cleanup
* [Fix] Minor comments feature fixes (#6490)
* Fix skip btn
* update sorting for mentions list
* Show server logs when create cypress user fails
* [Fix test spec]Create a new org for the comments test so existing user roles don't exist (#6477)
* Revert "Supporting all ASCII characters in table widget (#6041)" (#6429)
This reverts commit 3ae1bd6d95da42530df356b9c14e7e4f547372ea.
* Updated flaky test (#6486)
* Updated flaky test
* updated another test
* Store MongoDB creds in separate file from install.sh (#6499)
* Store MongoDB creds in separate file from install.sh
* Move MongoDB credentials to docker.env
* Add Analytics to Generate CRUD template feat (#6503)
* Add Analytics to Generate CRUD template feat
* Add analytics event on datasource click
* Send pluginName instead of plugin obj in analytics
* Fix: Adding checks before we check for disallowCopy (#6214)
* Fix: Adding checks to before we check for disallowCopy
* Adding checks for undo logic when a child delete is undone but the parent is already deleted.
* restore widgets if they have their parent available.
* reported bugs.
* undo only when parent exists.
* Hotfix Table Widget crashes when there is a cyclical dependency (#6505)
* FIX #5254 : dropdown height fixed and made scrollable (#6170)
* will widget pane if user moves away from canvas (#6516)
* Fix: intercom triggers are not working properly (#6512)
* initializing the intercom as soon as the help components are mounted.
* removed log
* Fix: Undo-Delete of Containers fix (#6510)
* Encrypt attributes (#6508)
* encrypt attributes
* updated references to DOM targets for accessing the Mock User datasource
* Fix/omnibar landing bug (#6513)
* hide certificate string using dots on UI (#6533)
* replace actual certificate string with '*' like it is done for hiding password on the UI.
* Updated Template
* fixed failing cypress tests
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: Rishabh Rathod <rishabh.rathod@appsmith.com>
Co-authored-by: Pranav Kanade <pranav@appsmith.com>
Co-authored-by: Rishabh Saxena <rishabh.robben@gmail.com>
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Paul Li <82799722+wmdev0808@users.noreply.github.com>
Co-authored-by: Abhinav Jha <abhinav@appsmith.com>
Co-authored-by: Nayan <83352306+nayan-rafiq@users.noreply.github.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Co-authored-by: rahulramesha <71900764+rahulramesha@users.noreply.github.com>
Co-authored-by: Rahul R <rahulramesha@Rahuls-MacBook-Pro.local>
Co-authored-by: Bhavin K <58818598+techbhavin@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish@appsmith.com>
Co-authored-by: hetunandu <hetu@appsmith.com>
Co-authored-by: Abhijeet <41686026+abhvsn@users.noreply.github.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
Co-authored-by: NandanAnantharamu <67676905+NandanAnantharamu@users.noreply.github.com>
Co-authored-by: Yash Vibhandik <vibhandikyash@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Confidence Okoghenun <cokoghenun@gmail.com>
Co-authored-by: arslanhaiderbuttar <83570904+arslanhaiderbuttar@users.noreply.github.com>
Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: Somangshu Goswami <somangshu.goswami1508@gmail.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: abhishek nayak <nayak.abhishek@gmail.com>
Co-authored-by: Pawan Kumar <pawan.stardust@gmail.com>
Co-authored-by: root <root@DESKTOP-9GENCK0.localdomain>
Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Nipun Agarwal <31271538+nipun1999@users.noreply.github.com>
Co-authored-by: Vicky Bansal <67091118+vicky-primathon@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Ashok Kumar M <35134347+marks0351@users.noreply.github.com>
Co-authored-by: Sumit Kumar <sumit@appsmith.com>
2021-08-13 08:42:29 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"fillUsersMockDatasourceForm",
|
|
|
|
|
(shouldAddTrailingSpaces = false) => {
|
|
|
|
|
const userMockDatabaseName = shouldAddTrailingSpaces
|
|
|
|
|
? `${datasourceFormData["mockDatabaseName"] + " "}`
|
|
|
|
|
: datasourceFormData["mockDatabaseName"];
|
|
|
|
|
|
|
|
|
|
const userMockHostAddress = shouldAddTrailingSpaces
|
|
|
|
|
? `${datasourceFormData["mockHostAddress"] + " "}`
|
|
|
|
|
: datasourceFormData["mockHostAddress"];
|
|
|
|
|
|
|
|
|
|
const userMockDatabaseUsername = shouldAddTrailingSpaces
|
|
|
|
|
? `${datasourceFormData["mockDatabaseUsername"] + " "}`
|
|
|
|
|
: datasourceFormData["mockDatabaseUsername"];
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["host"])
|
|
|
|
|
.clear()
|
|
|
|
|
.type(userMockHostAddress);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["databaseName"])
|
|
|
|
|
.clear()
|
|
|
|
|
.type(userMockDatabaseName);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["sectionAuthentication"]).click();
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["password"])
|
|
|
|
|
.clear()
|
|
|
|
|
.type(datasourceFormData["mockDatabasePassword"]);
|
|
|
|
|
|
|
|
|
|
cy.get(datasourceEditor["username"])
|
|
|
|
|
.clear()
|
|
|
|
|
.type(userMockDatabaseUsername);
|
|
|
|
|
},
|
|
|
|
|
);
|
2020-05-11 09:03:46 +00:00
|
|
|
|
2020-09-08 04:57:13 +00:00
|
|
|
Cypress.Commands.add("createPostgresDatasource", () => {
|
|
|
|
|
cy.NavigateToDatasourceEditor();
|
|
|
|
|
cy.get(datasourceEditor.PostgreSQL).click();
|
|
|
|
|
|
|
|
|
|
cy.getPluginFormsAndCreateDatasource();
|
|
|
|
|
|
|
|
|
|
cy.fillPostgresDatasourceForm();
|
|
|
|
|
|
|
|
|
|
cy.testSaveDatasource();
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("deleteDatasource", (datasourceName) => {
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.NavigateToQueryEditor();
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(pages.integrationActiveTab)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2021-07-29 08:13:10 +00:00
|
|
|
cy.contains(".t--datasource-name", datasourceName).click();
|
2020-09-08 04:57:13 +00:00
|
|
|
cy.get(".t--delete-datasource").click();
|
|
|
|
|
cy.wait("@deleteDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-08-20 05:38:08 +00:00
|
|
|
Cypress.Commands.add("runQuery", () => {
|
2021-04-22 03:30:09 +00:00
|
|
|
cy.get(queryEditor.runQuery).click({ force: true });
|
2020-08-20 05:38:08 +00:00
|
|
|
cy.wait("@postExecute").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("hoverAndClick", () => {
|
|
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.should("be.hidden")
|
|
|
|
|
.invoke("show")
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.xpath(apiwidget.popover)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("deleteQuery", () => {
|
|
|
|
|
cy.hoverAndClick();
|
|
|
|
|
cy.get(apiwidget.delete).click({ force: true });
|
|
|
|
|
cy.wait("@deleteAction").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("deleteDataSource", () => {
|
|
|
|
|
cy.hoverAndClick();
|
|
|
|
|
cy.get(apiwidget.delete).click({ force: true });
|
|
|
|
|
cy.wait("@deleteDatasource").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-02 05:29:55 +00:00
|
|
|
Cypress.Commands.add("runAndDeleteQuery", () => {
|
2020-05-11 09:03:46 +00:00
|
|
|
cy.get(queryEditor.runQuery).click();
|
2020-05-12 13:47:13 +00:00
|
|
|
cy.wait("@postExecute").should(
|
2020-05-11 09:03:46 +00:00
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(queryEditor.queryMoreAction).click();
|
|
|
|
|
cy.get(queryEditor.deleteUsingContext).click();
|
2020-05-11 09:03:46 +00:00
|
|
|
cy.wait("@deleteAction").should(
|
|
|
|
|
"have.nested.property",
|
|
|
|
|
"response.body.responseMeta.status",
|
|
|
|
|
200,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-12-11 13:48:01 +00:00
|
|
|
Cypress.Commands.add("dragAndDropToCanvas", (widgetType, { x, y }) => {
|
2020-09-08 10:54:55 +00:00
|
|
|
const selector = `.t--widget-card-draggable-${widgetType}`;
|
|
|
|
|
cy.get(selector)
|
2021-08-12 05:45:38 +00:00
|
|
|
.trigger("dragstart", { force: true })
|
2020-12-11 13:48:01 +00:00
|
|
|
.trigger("mousemove", x, y, { force: true });
|
2020-09-08 10:54:55 +00:00
|
|
|
cy.get(explorer.dropHere)
|
2021-08-12 05:45:38 +00:00
|
|
|
.trigger("mousemove", x, y, { eventConstructor: "MouseEvent" })
|
|
|
|
|
.trigger("mousemove", x, y, { eventConstructor: "MouseEvent" })
|
|
|
|
|
.trigger("mouseup", x, y, { eventConstructor: "MouseEvent" });
|
2020-09-08 10:54:55 +00:00
|
|
|
});
|
|
|
|
|
|
2021-08-26 15:24:37 +00:00
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"dragAndDropToWidget",
|
|
|
|
|
(widgetType, destinationWidget, { x, y }) => {
|
|
|
|
|
const selector = `.t--widget-card-draggable-${widgetType}`;
|
|
|
|
|
cy.get(selector)
|
|
|
|
|
.trigger("dragstart", { force: true })
|
|
|
|
|
.trigger("mousemove", x, y, { force: true });
|
|
|
|
|
const selector2 = `.t--draggable-${destinationWidget}`;
|
|
|
|
|
cy.get(selector2)
|
|
|
|
|
.trigger("mousemove", x, y, { eventConstructor: "MouseEvent" })
|
|
|
|
|
.trigger("mousemove", x, y, { eventConstructor: "MouseEvent" })
|
|
|
|
|
.trigger("mouseup", x, y, { eventConstructor: "MouseEvent" });
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("executeDbQuery", (queryName) => {
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.get(widgetsPage.buttonOnClick)
|
|
|
|
|
.get(commonlocators.dropdownSelectButton)
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.get("ul.bp3-menu")
|
|
|
|
|
.children()
|
2021-07-07 03:46:16 +00:00
|
|
|
.contains("Execute a Query")
|
2020-10-12 12:43:35 +00:00
|
|
|
.click({ force: true })
|
|
|
|
|
.get("ul.bp3-menu")
|
|
|
|
|
.children()
|
|
|
|
|
.contains(queryName)
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2021-06-15 10:19:30 +00:00
|
|
|
Cypress.Commands.add("CreateMockQuery", (queryName) => {
|
2021-06-17 13:47:54 +00:00
|
|
|
// cy.get(queryEditor.addNewQueryBtn).click({ force: true });
|
2021-06-15 10:19:30 +00:00
|
|
|
cy.get(queryEditor.createQuery)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(queryEditor.queryNameField).type(queryName + "{enter}", {
|
|
|
|
|
force: true,
|
|
|
|
|
});
|
2021-06-15 12:24:25 +00:00
|
|
|
cy.assertPageSave();
|
2021-06-15 10:19:30 +00:00
|
|
|
cy.get(queryEditor.templateMenu + " div")
|
|
|
|
|
.contains("Select")
|
|
|
|
|
.click({ force: true });
|
2021-06-15 12:24:25 +00:00
|
|
|
cy.runQuery();
|
|
|
|
|
// cy.wait(3000);
|
2021-06-15 10:19:30 +00:00
|
|
|
// cy.get(queryEditor.runQuery)
|
|
|
|
|
// .click({force: true});
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("openPropertyPane", (widgetType) => {
|
2020-05-08 15:31:36 +00:00
|
|
|
const selector = `.t--draggable-${widgetType}`;
|
|
|
|
|
cy.get(selector)
|
|
|
|
|
.first()
|
2021-03-17 09:36:08 +00:00
|
|
|
.trigger("mouseover", { force: true })
|
2020-05-08 15:31:36 +00:00
|
|
|
.wait(500);
|
2021-05-18 18:29:39 +00:00
|
|
|
cy.get(
|
|
|
|
|
`${selector}:first-of-type .t--widget-propertypane-toggle > .t--widget-name`,
|
|
|
|
|
)
|
2020-05-08 15:31:36 +00:00
|
|
|
.first()
|
2020-06-26 13:56:18 +00:00
|
|
|
.click({ force: true });
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-16 10:29:08 +00:00
|
|
|
cy.wait(1000);
|
2020-05-08 15:31:36 +00:00
|
|
|
});
|
2020-05-14 09:16:39 +00:00
|
|
|
|
2021-06-15 10:19:30 +00:00
|
|
|
Cypress.Commands.add("openPropertyPaneCopy", (widgetType) => {
|
2021-09-07 12:48:38 +00:00
|
|
|
if (widgetType === "List1Copy") {
|
|
|
|
|
cy.SearchEntityandOpen(widgetType);
|
|
|
|
|
} else {
|
|
|
|
|
const selector = `.t--draggable-${widgetType}`;
|
|
|
|
|
cy.get(selector)
|
|
|
|
|
.last()
|
|
|
|
|
.trigger("mouseover", { force: true })
|
|
|
|
|
.wait(500);
|
|
|
|
|
cy.get(
|
|
|
|
|
`${selector}:first-of-type .t--widget-propertypane-toggle > .t--widget-name`,
|
|
|
|
|
)
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
|
|
|
cy.wait(1000);
|
|
|
|
|
}
|
2021-06-15 10:19:30 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("changeButtonStyle", (index, buttonColor, hoverColor) => {
|
|
|
|
|
cy.get(widgetsPage.buttonStyleDropdown).click({ force: true });
|
|
|
|
|
cy.get(
|
|
|
|
|
".bp3-popover-content .t--dropdown-option:nth-child(" + index + ")",
|
|
|
|
|
).click({ force: true });
|
|
|
|
|
cy.PublishtheApp();
|
|
|
|
|
cy.get(widgetsPage.widgetBtn).should(
|
|
|
|
|
"have.css",
|
|
|
|
|
"background-color",
|
|
|
|
|
buttonColor,
|
|
|
|
|
);
|
|
|
|
|
// cy.get(buttonBackground)
|
|
|
|
|
// .first()
|
|
|
|
|
// .trigger('mouseover', { force: true });
|
|
|
|
|
// cy.get(buttonBackground)
|
|
|
|
|
// .should('have.css', 'background-color', hoverColor);
|
|
|
|
|
cy.wait(1000);
|
|
|
|
|
});
|
|
|
|
|
|
2020-06-04 13:49:22 +00:00
|
|
|
Cypress.Commands.add("closePropertyPane", () => {
|
2021-03-29 15:47:22 +00:00
|
|
|
cy.get(commonlocators.editPropCrossButton).click({ force: true });
|
2020-06-04 13:49:22 +00:00
|
|
|
});
|
|
|
|
|
|
2021-09-07 13:41:36 +00:00
|
|
|
Cypress.Commands.add("onClickActions", (forSuccess, forFailure, endp) => {
|
2021-06-15 10:19:30 +00:00
|
|
|
// Filling the messages for success/failure in the onClickAction of the button widget.
|
|
|
|
|
// For Success
|
2021-08-04 12:50:40 +00:00
|
|
|
cy.get(".code-highlight", { timeout: 10000 })
|
2021-06-15 10:19:30 +00:00
|
|
|
.children()
|
|
|
|
|
.contains("No Action")
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.selectOnClickOption("Show Message")
|
2021-09-07 13:41:36 +00:00
|
|
|
.get("div.t--property-control-" + endp + " div.CodeMirror-lines")
|
2021-06-15 10:19:30 +00:00
|
|
|
.click()
|
|
|
|
|
.type(forSuccess)
|
|
|
|
|
.get("button.t--open-dropdown-Select-type")
|
2021-08-26 10:52:45 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.selectOnClickOption(forSuccess);
|
2021-06-15 10:19:30 +00:00
|
|
|
|
|
|
|
|
cy.wait(2000);
|
|
|
|
|
// For Failure
|
|
|
|
|
cy.get(".code-highlight")
|
|
|
|
|
.children()
|
|
|
|
|
.contains("No Action")
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true })
|
|
|
|
|
.selectOnClickOption("Show Message")
|
2021-09-07 13:41:36 +00:00
|
|
|
.get("div.t--property-control-" + endp + " div.CodeMirror-lines")
|
2021-06-15 10:19:30 +00:00
|
|
|
.last()
|
|
|
|
|
.click()
|
|
|
|
|
.type(forFailure)
|
|
|
|
|
.get("button.t--open-dropdown-Select-type")
|
|
|
|
|
.last()
|
2021-08-26 10:52:45 +00:00
|
|
|
.click({ force: true })
|
|
|
|
|
.selectOnClickOption(forFailure);
|
2021-06-15 10:19:30 +00:00
|
|
|
});
|
2021-06-17 13:47:54 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("copyWidget", (widget, widgetLocator) => {
|
|
|
|
|
const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
|
|
|
|
//Copy widget and verify all properties
|
|
|
|
|
cy.get(widgetsPage.propertypaneText)
|
|
|
|
|
.children()
|
|
|
|
|
.last()
|
|
|
|
|
.invoke("text")
|
2021-07-07 03:46:16 +00:00
|
|
|
.then((x) => {
|
|
|
|
|
cy.log(x);
|
|
|
|
|
let originalWidget = x.replaceAll("x", "");
|
|
|
|
|
originalWidget = originalWidget.replaceAll(/\u200B/g, "");
|
2021-06-17 13:47:54 +00:00
|
|
|
cy.log(originalWidget);
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(widgetsPage.copyWidget).click({ force: true });
|
2021-06-17 13:47:54 +00:00
|
|
|
cy.reload();
|
|
|
|
|
// Wait for the widget to be appear in the DOM and press Ctrl/Cmd + V to paste the button.
|
|
|
|
|
cy.get(widgetLocator).should("be.visible");
|
|
|
|
|
cy.get("body").type(`{${modifierKey}}v`);
|
|
|
|
|
cy.wait(2000);
|
|
|
|
|
cy.openPropertyPaneCopy(widget);
|
|
|
|
|
cy.get(widgetsPage.propertypaneText)
|
|
|
|
|
.children()
|
|
|
|
|
.last()
|
|
|
|
|
.invoke("text")
|
2021-07-07 03:46:16 +00:00
|
|
|
.then((y) => {
|
|
|
|
|
cy.log(y);
|
|
|
|
|
let copiedWidget = y.replaceAll("x", "");
|
|
|
|
|
copiedWidget = copiedWidget.replaceAll(/\u200B/g, "");
|
2021-06-17 13:47:54 +00:00
|
|
|
cy.log(copiedWidget);
|
|
|
|
|
expect(originalWidget).to.be.equal(copiedWidget);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("deleteWidget", (widget) => {
|
|
|
|
|
// Delete the button widget
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(widgetsPage.removeWidget).click({ force: true });
|
2021-09-15 08:37:58 +00:00
|
|
|
cy.wait(5000);
|
|
|
|
|
cy.wait("@updateLayout");
|
2021-06-17 13:47:54 +00:00
|
|
|
});
|
|
|
|
|
|
2021-06-24 14:28:20 +00:00
|
|
|
Cypress.Commands.add("UpdateChartType", (typeOfChart) => {
|
|
|
|
|
// Command to change the chart type if the property pane of the chart widget is opened.
|
|
|
|
|
cy.get(viewWidgetsPage.chartType)
|
|
|
|
|
.last()
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
cy.get(commonlocators.dropdownmenu)
|
|
|
|
|
.children()
|
|
|
|
|
.contains(typeOfChart)
|
|
|
|
|
.click({ force: true });
|
|
|
|
|
|
|
|
|
|
cy.get(viewWidgetsPage.chartType + " span.cs-text").should(
|
|
|
|
|
"have.text",
|
|
|
|
|
typeOfChart,
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
2020-07-03 08:58:58 +00:00
|
|
|
Cypress.Commands.add("createAndFillApi", (url, parameters) => {
|
|
|
|
|
cy.NavigateToApiEditor();
|
2021-07-07 03:46:16 +00:00
|
|
|
cy.get(pages.integrationCreateNew)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2020-07-03 08:58:58 +00:00
|
|
|
cy.testCreateApiButton();
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.get("@createNewApi").then((response) => {
|
2020-05-14 11:02:41 +00:00
|
|
|
cy.get(ApiEditor.ApiNameField).should("be.visible");
|
|
|
|
|
cy.expect(response.response.body.responseMeta.success).to.eq(true);
|
2020-06-26 13:56:18 +00:00
|
|
|
cy.get(ApiEditor.ApiNameField)
|
2020-07-21 12:05:06 +00:00
|
|
|
.click()
|
2020-06-26 13:56:18 +00:00
|
|
|
.invoke("text")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then((text) => {
|
2020-06-26 13:56:18 +00:00
|
|
|
const someText = text;
|
|
|
|
|
expect(someText).to.equal(response.response.body.data.name);
|
|
|
|
|
});
|
2020-05-14 11:02:41 +00:00
|
|
|
});
|
2020-06-03 05:40:48 +00:00
|
|
|
cy.get(apiwidget.editResourceUrl)
|
2020-05-15 12:20:09 +00:00
|
|
|
.first()
|
|
|
|
|
.click({ force: true })
|
2021-08-12 17:37:30 +00:00
|
|
|
.type(
|
|
|
|
|
url + parameters,
|
|
|
|
|
{ parseSpecialCharSequences: false },
|
|
|
|
|
{ force: true },
|
|
|
|
|
);
|
2020-06-10 17:42:51 +00:00
|
|
|
cy.WaitAutoSave();
|
2020-05-14 09:16:39 +00:00
|
|
|
cy.get(ApiEditor.formActionButtons).should("be.visible");
|
|
|
|
|
cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled");
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("isSelectRow", (index) => {
|
2020-05-16 07:28:13 +00:00
|
|
|
cy.get(
|
2020-06-03 10:50:10 +00:00
|
|
|
'.tbody .td[data-rowindex="' + index + '"][data-colindex="' + 0 + '"]',
|
2020-05-16 07:28:13 +00:00
|
|
|
).click({ force: true });
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-14 09:16:39 +00:00
|
|
|
Cypress.Commands.add("readTabledata", (rowNum, colNum) => {
|
2020-06-03 10:50:10 +00:00
|
|
|
// const selector = `.t--draggable-tablewidget .e-gridcontent.e-lib.e-droppable td[index=${rowNum}][aria-colindex=${colNum}]`;
|
2020-09-08 13:04:51 +00:00
|
|
|
const selector = `.tbody .td[data-rowindex="${rowNum}"][data-colindex="${colNum}"] div`;
|
2020-05-14 09:16:39 +00:00
|
|
|
const tabVal = cy.get(selector).invoke("text");
|
|
|
|
|
return tabVal;
|
|
|
|
|
});
|
2020-05-18 04:28:41 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("getDate", (date, dateFormate) => {
|
2021-08-25 14:01:04 +00:00
|
|
|
const eDate = dayjs()
|
2020-05-18 04:28:41 +00:00
|
|
|
.add(date, "days")
|
|
|
|
|
.format(dateFormate);
|
2020-05-28 06:37:47 +00:00
|
|
|
return eDate;
|
2020-05-18 04:28:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("setDate", (date, dateFormate) => {
|
2021-08-25 14:01:04 +00:00
|
|
|
const expDate = dayjs()
|
2020-05-18 04:28:41 +00:00
|
|
|
.add(date, "days")
|
|
|
|
|
.format(dateFormate);
|
|
|
|
|
const sel = `.DayPicker-Day[aria-label=\"${expDate}\"]`;
|
|
|
|
|
cy.get(sel).click();
|
|
|
|
|
});
|
2020-05-18 05:34:49 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("pageNo", (index) => {
|
2020-06-03 10:50:10 +00:00
|
|
|
cy.get(".page-item")
|
|
|
|
|
.first()
|
|
|
|
|
.click({ force: true });
|
2020-05-16 07:28:13 +00:00
|
|
|
});
|
2020-05-18 05:34:49 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("pageNoValidate", (index) => {
|
2020-05-16 07:28:13 +00:00
|
|
|
const data = '.e-numericcontainer a[index="' + index + '"]';
|
|
|
|
|
const pageVal = cy.get(data);
|
|
|
|
|
return pageVal;
|
|
|
|
|
});
|
2020-05-27 11:21:11 +00:00
|
|
|
|
2020-05-28 06:37:47 +00:00
|
|
|
Cypress.Commands.add("validateDisableWidget", (widgetCss, disableCss) => {
|
|
|
|
|
cy.get(widgetCss + disableCss).should("exist");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("validateEnableWidget", (widgetCss, disableCss) => {
|
|
|
|
|
cy.get(widgetCss + disableCss).should("not.exist");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("validateHTMLText", (widgetCss, htmlTag, value) => {
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.get(widgetCss + " iframe").then(($iframe) => {
|
2020-05-28 06:37:47 +00:00
|
|
|
const $body = $iframe.contents().find("body");
|
|
|
|
|
cy.wrap($body)
|
|
|
|
|
.find(htmlTag)
|
|
|
|
|
.should("have.text", value);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-04-06 13:29:27 +00:00
|
|
|
Cypress.Commands.add("startRoutesForDatasource", () => {
|
|
|
|
|
cy.server();
|
|
|
|
|
cy.route("PUT", "/api/v1/datasources/*").as("saveDatasource");
|
|
|
|
|
cy.route("POST", "/api/v1/datasources/test").as("testDatasource");
|
|
|
|
|
});
|
|
|
|
|
|
2020-05-27 11:21:11 +00:00
|
|
|
Cypress.Commands.add("startServerAndRoutes", () => {
|
2021-01-14 05:44:07 +00:00
|
|
|
//To update route with intercept after working on alias wrt wait and alias
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.server();
|
2020-06-17 10:47:01 +00:00
|
|
|
cy.route("GET", "/api/v1/applications/new").as("applications");
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.route("GET", "/api/v1/users/profile").as("getUser");
|
|
|
|
|
cy.route("GET", "/api/v1/plugins").as("getPlugins");
|
|
|
|
|
cy.route("POST", "/api/v1/logout").as("postLogout");
|
|
|
|
|
|
2021-02-24 06:00:22 +00:00
|
|
|
cy.route("GET", "/api/v1/datasources?organizationId=*").as("getDataSources");
|
[API breaking change : Automated Tests Will Fail] Page And Action Refactor (#549)
* Introduced new page which stores the published and unpublished pages as separate.
* Mid level commit to save the state.
* Parity of new page repository with old page repository (custom functions)
* WIP : Delete a page. This requires changes across application structure as well.
* Added publishedPages construct inside application to store the pages in the deployed view as well as isDefault so that the same changes (delete or isDefault) in unpublished view doesn't alter these fields for the published application
* Parity reached with PageService.
* Minor ActionService refactor to remove unnecessary code.
ApplicationPageService, LayoutActionService, LayoutService use the new page service to fetch the pages
Minor corrections in fetching the page from new page service in tests
* New save function which sets the PageDTO for unpublished page and then saves the new page into repository.
* Migration of page service functions to new page service functions across other services/tests/controller
* Finished migrating all the page service functions to the new page service functions
* Application Service Tests have been fixed.
* All the existing test cases are working now.
* Publish application implemented to store published pages as well. Added a basic test case to check that published pages is being set and that page's publishedPageDTO is being set accordingly.
* Minor TODOs added to add test cases for published application.
* A few tests to ascertain that published application page fields (deleted, isDefault) does not get changed when these statuses are changed for a page in edit mode.
* Added a new controller end point to fetch application in view mode.
* Added new endpoint for fetching an application in view mode on the client.
* Bug fix where get application in view mode API was not getting called.
* Fixed the get page names by application & archive pages which have been deleted in edit mode during publishing of application.
* During delete page, if a page was never published and it was deleted during edit, delete the entire page instead of just deleting the unpublished PageDTO
* Minor formatting.
* Non working client side code to fetch page list using view mode.
* revert unnecassary changes and streamlined view and edit actions
* Fix missed import
* Fixed a bug where if a page is not published, it should not be returned in view mode in list of page names api.
* Fixed update for a page which was not working in integration test.
* ActionDTO added.
* Solidified the new action structure.
* Migration added for NewAction index creation and NewAction per Action insertion in the database.
* Basic file structure added the new repository, custom repository, service, etc.
* Delete OldPage.java
* Repo functions added - TODO : Haven;t handled the published/edited views
* Helper functions added to convert Action to NewAction and vice-versa. Removed unused currentUserMono usage.
* Create & update action functionality added.
* Execute Action refactored. Removed dry run specific code.
* Repository migrated to handle new data structure. Execute action refactored to no longer support dry runs of actions.
* TODO added for special handling of change view of application to handle edge cases of pages/actions which either exist in published mode but don't exist in unpublished mode or vice versa.
* Migrated finding on load actions from spring repository to custom repository.
* In view mode, now actions are being fetched by application id directly instead of first fetching application and then using the page ids, fetching the actions. This reduces the db calls from 2 to 1 per fetch actions in view mode api call.
* Delete action and get all actions (used in edit mode on the client side) implemented.
* Updated CollectionService and ActionCollectionService to use the new action service instead of the old one.
* LayoutActionService refactored to now use the new service functions.
* ActionController now no longer used ActionService. The remaining service functions have been migrated to the new action service.
* Refactor across ACL code for addition/removal of policies during addition/removal of users to organization, making app public, refactor for services like policy utils, item service, etc.
* Removed the last of action repository and action service and replaced with new action repo and new action service.
* Compile and run time issues fixed. The server is coming up without any spring dependency errors.
* WIP in fixing fetching actions by page id.
* Finally!!! Fixed the fetch actions (both published and unpublished actions) by page id repository function.
* Fixed create action bug where null datasource in published actiondto (inside newly created action) leads to error.
* Fixed the execute action issues :
1. Removed the dry runs from the tests
2. Fixed the null pointer error in variable substituted action and datasource configurations.
* 1. Fixed the custom action repository field names.
2. Fixed the data structures used in ExamplesOrganizationClonerTests
* Fixed countByDatasourceId repository function which was querying the actions incorrectly.
* Fixed the clone example organization error where the id of the action was not getting updated in the page correctly. Yay!
* Fixed post merge compilation failure.
* Fixed more compilation time failures in ActionServiceTest
* Fixed failing test case for fetching actions in view mode.
* Minor changes to resolve merge changes and incorporate in the new refactored code.
* 1. Fixed compile time errors on Client code.
2. Fixed fetching of actions in view mode by application id. The repository function did not need name parameter. Removed the same.
* [Integration Testing Error Fix] : Added a new test case for refactor action name.
* Instead of fetching actions in the page, mistakenly used the base service which was fetching all the actions in the repository, barring none which led to the name refactor being blocked even though no action in the current page exists with the new proposed name,
* Added delete functionality to action service.
* Minor code cleanup
* Adding viewMode to action execution
* Replacing action with actionId.
* 1. Bug fix for deletion of unpublished action. In case of never published action, the entire action should be deleted. In case an action was published, only the unpublished action should be deleted.
2. In case of DB actions (external datasources), only the bare minimum fields should be stored inside the action (datasource id and datasource plugin id). The other fields should not be duplicated across code.
* Fixed yarn build compilation issues.
* Update app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/ActionController.java
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
* Changed the API path for GET applications in view mode. Some minor code formatting.
* Incorporated review comments.
* Some more unnecessary code removed.
* Instead of returning Page, now the interface object between client and server for Pages is PageDTO
* Migrated Page and Action to PageDTO and ActionDTO
Fixed the compilation issues.
TODO : Fix the test compilation issues.
* Fixed compilation time issues with all the tests by migrating Page and Action to PageDTO and ActionDTO respectively
* Action Controller and Page Controller no longer extend Base Controller. All the required functions have now been implemented and no base line API end points are being re-used from the base.
* Test case fixes.
* Bug Fix : Updating an action was not updating execute on load. Fixed the data flow leading to the error.
* Deprecating Page and Action domain objects. This is to ensure no new code is written with these till we remove this old code.
* Cloned example applications are now published before returning. This is to ensure that the applications are in ready to view mode when the new user signs up.
* Added a function comment to expand on the usage of new param introduced.
* When cloning a page, new actions were not being stored. Added that. Also updated the clonePage test to assert that the actions are also cloned when the pages are cloned.
* Updated a Api call
* removed extra slash
Co-authored-by: Hetu Nandu <hetunandu@gmail.com>
Co-authored-by: Satbir Singh <satbir121@gmail.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: nandan.anantharamu <nandan@thinkify.io>
2020-10-26 12:34:23 +00:00
|
|
|
cy.route("GET", "/api/v1/pages/application/*").as("getPagesForCreateApp");
|
|
|
|
|
cy.route("GET", "/api/v1/applications/view/*").as("getPagesForViewApp");
|
|
|
|
|
|
2020-10-14 10:35:19 +00:00
|
|
|
cy.route("POST");
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.route("GET", "/api/v1/pages/*").as("getPage");
|
2021-05-04 06:04:23 +00:00
|
|
|
cy.route("GET", "/api/v1/applications/*/pages/*/edit").as("getAppPageEdit");
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.route("GET", "/api/v1/actions*").as("getActions");
|
|
|
|
|
cy.route("GET", "api/v1/providers/categories").as("getCategories");
|
|
|
|
|
cy.route("GET", "api/v1/import/templateCollections").as(
|
|
|
|
|
"getTemplateCollections",
|
|
|
|
|
);
|
|
|
|
|
cy.route("DELETE", "/api/v1/actions/*").as("deleteAPI");
|
|
|
|
|
cy.route("DELETE", "/api/v1/applications/*").as("deleteApp");
|
|
|
|
|
cy.route("DELETE", "/api/v1/actions/*").as("deleteAction");
|
|
|
|
|
cy.route("DELETE", "/api/v1/pages/*").as("deletePage");
|
|
|
|
|
cy.route("POST", "/api/v1/datasources").as("createDatasource");
|
|
|
|
|
cy.route("DELETE", "/api/v1/datasources/*").as("deleteDatasource");
|
2020-09-29 04:17:25 +00:00
|
|
|
cy.route("GET", "/api/v1/datasources/*/structure?ignoreCache=*").as(
|
2020-09-21 09:11:42 +00:00
|
|
|
"getDatasourceStructure",
|
|
|
|
|
);
|
2021-08-20 06:57:01 +00:00
|
|
|
cy.route("PUT", "/api/v1/datasources/datasource-query/*").as(
|
|
|
|
|
"datasourceQuery",
|
|
|
|
|
);
|
2020-05-27 11:21:11 +00:00
|
|
|
|
2021-07-29 08:13:10 +00:00
|
|
|
cy.route("PUT", "/api/v1/pages/crud-page/*").as("replaceLayoutWithCRUDPage");
|
|
|
|
|
cy.route("POST", "/api/v1/pages/crud-page").as("generateCRUDPage");
|
|
|
|
|
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.route("GET", "/api/v1/organizations").as("organizations");
|
2020-08-28 18:51:16 +00:00
|
|
|
cy.route("GET", "/api/v1/organizations/*").as("getOrganisation");
|
|
|
|
|
|
2020-05-27 11:21:11 +00:00
|
|
|
cy.route("POST", "/api/v1/actions/execute").as("executeAction");
|
|
|
|
|
cy.route("POST", "/api/v1/applications/publish/*").as("publishApp");
|
|
|
|
|
cy.route("PUT", "/api/v1/layouts/*/pages/*").as("updateLayout");
|
|
|
|
|
|
|
|
|
|
cy.route("POST", "/track/*").as("postTrack");
|
|
|
|
|
cy.route("POST", "/api/v1/actions/execute").as("postExecute");
|
2020-10-15 11:38:55 +00:00
|
|
|
cy.route("PUT", "/api/v1/actions/executeOnLoad/*").as("setExecuteOnLoad");
|
2020-05-27 11:21:11 +00:00
|
|
|
|
|
|
|
|
cy.route("POST", "/api/v1/actions").as("createNewApi");
|
|
|
|
|
cy.route("POST", "/api/v1/import?type=CURL&pageId=*&name=*").as("curlImport");
|
|
|
|
|
cy.route("DELETE", "/api/v1/actions/*").as("deleteAction");
|
|
|
|
|
cy.route("GET", "/api/v1/marketplace/providers?category=*&page=*&size=*").as(
|
|
|
|
|
"get3PProviders",
|
|
|
|
|
);
|
|
|
|
|
cy.route("GET", "/api/v1/marketplace/templates?providerId=*").as(
|
|
|
|
|
"get3PProviderTemplates",
|
|
|
|
|
);
|
|
|
|
|
cy.route("POST", "/api/v1/items/addToPage").as("add3PApiToPage");
|
|
|
|
|
|
|
|
|
|
cy.route("GET", "/api/v1/plugins/*/form").as("getPluginForm");
|
|
|
|
|
cy.route("POST", "/api/v1/datasources").as("createDatasource");
|
|
|
|
|
cy.route("DELETE", "/api/v1/datasources/*").as("deleteDatasource");
|
|
|
|
|
cy.route("DELETE", "/api/v1/applications/*").as("deleteApplication");
|
2020-10-14 10:35:19 +00:00
|
|
|
cy.route("POST", "/api/v1/applications/?orgId=*").as("createNewApplication");
|
2020-10-28 12:06:30 +00:00
|
|
|
cy.route("PUT", "/api/v1/applications/*").as("updateApplication");
|
2020-07-06 05:38:39 +00:00
|
|
|
cy.route("PUT", "/api/v1/actions/*").as("saveAction");
|
2020-10-29 13:53:10 +00:00
|
|
|
cy.route("PUT", "/api/v1/actions/move").as("moveAction");
|
2020-07-20 09:38:35 +00:00
|
|
|
|
|
|
|
|
cy.route("POST", "/api/v1/organizations").as("createOrg");
|
2021-06-03 06:18:08 +00:00
|
|
|
cy.route("POST", "api/v1/applications/import/*").as("importNewApplication");
|
|
|
|
|
cy.route("GET", "api/v1/applications/export/*").as("exportApplication");
|
2020-08-12 11:41:56 +00:00
|
|
|
cy.route("GET", "/api/v1/organizations/roles?organizationId=*").as(
|
|
|
|
|
"getRoles",
|
|
|
|
|
);
|
2020-08-03 14:18:48 +00:00
|
|
|
cy.route("GET", "/api/v1/users/me").as("getUser");
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.route("POST", "/api/v1/pages").as("createPage");
|
2020-08-22 03:10:22 +00:00
|
|
|
cy.route("POST", "/api/v1/pages/clone/*").as("clonePage");
|
2020-10-12 12:43:35 +00:00
|
|
|
cy.route("PUT", "/api/v1/applications/*/changeAccess").as("changeAccess");
|
2020-10-28 05:39:28 +00:00
|
|
|
|
|
|
|
|
cy.route("PUT", "/api/v1/organizations/*").as("updateOrganization");
|
2020-11-02 14:36:41 +00:00
|
|
|
cy.route("GET", "/api/v1/pages/view/application/*").as("viewApp");
|
2020-12-14 06:20:44 +00:00
|
|
|
cy.route("POST", "/api/v1/organizations/*/logo").as("updateLogo");
|
|
|
|
|
cy.route("DELETE", "/api/v1/organizations/*/logo").as("deleteLogo");
|
2021-05-04 06:04:23 +00:00
|
|
|
cy.route("POST", "/api/v1/applications/*/fork/*").as("postForkAppOrg");
|
2021-06-02 09:56:22 +00:00
|
|
|
cy.route("PUT", "/api/v1/users/leaveOrganization/*").as("leaveOrgApiCall");
|
2021-08-06 09:17:02 +00:00
|
|
|
|
|
|
|
|
cy.route("POST", "/api/v1/comments/threads").as("createNewThread");
|
|
|
|
|
cy.route("POST", "/api/v1/comments?threadId=*").as("createNewComment");
|
2020-05-27 11:21:11 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("alertValidate", (text) => {
|
2020-05-26 12:22:29 +00:00
|
|
|
cy.get(commonlocators.success)
|
|
|
|
|
.should("be.visible")
|
|
|
|
|
.and("have.text", text);
|
|
|
|
|
});
|
2020-05-29 10:02:03 +00:00
|
|
|
|
2020-05-28 10:35:54 +00:00
|
|
|
Cypress.Commands.add("ExportVerify", (togglecss, name) => {
|
|
|
|
|
cy.togglebar(togglecss);
|
|
|
|
|
cy.get(".t--draggable-tablewidget button")
|
|
|
|
|
.invoke("attr", "aria-label")
|
|
|
|
|
.should("contain", name);
|
|
|
|
|
cy.togglebarDisable(togglecss);
|
|
|
|
|
});
|
2020-05-29 10:02:03 +00:00
|
|
|
|
2020-05-28 10:35:54 +00:00
|
|
|
Cypress.Commands.add("readTabledataPublish", (rowNum, colNum) => {
|
2020-06-03 10:50:10 +00:00
|
|
|
// const selector = `.t--widget-tablewidget .e-gridcontent.e-lib.e-droppable td[index=${rowNum}][aria-colindex=${colNum}]`;
|
|
|
|
|
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`;
|
2020-05-28 10:35:54 +00:00
|
|
|
const tabVal = cy.get(selector).invoke("text");
|
|
|
|
|
return tabVal;
|
|
|
|
|
});
|
2020-06-04 13:49:22 +00:00
|
|
|
|
2020-09-02 13:13:06 +00:00
|
|
|
Cypress.Commands.add("scrollTabledataPublish", (rowNum, colNum) => {
|
|
|
|
|
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div`;
|
|
|
|
|
const tabVal = cy
|
|
|
|
|
.get(selector)
|
|
|
|
|
.scrollIntoView()
|
|
|
|
|
.invoke("text");
|
|
|
|
|
return tabVal;
|
|
|
|
|
});
|
|
|
|
|
|
2021-03-05 19:37:49 +00:00
|
|
|
Cypress.Commands.add("readTableLinkPublish", (rowNum, colNum) => {
|
2021-07-09 12:21:51 +00:00
|
|
|
const selector = `.t--widget-tablewidget .tbody .td[data-rowindex=${rowNum}][data-colindex=${colNum}] div .image-cell-wrapper .image-cell`;
|
|
|
|
|
const bgUrl = cy.get(selector).should("have.css", "background-image");
|
|
|
|
|
return bgUrl;
|
2021-03-05 19:37:49 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("assertEvaluatedValuePopup", (expectedType) => {
|
2021-07-26 05:50:46 +00:00
|
|
|
cy.get(commonlocators.evaluatedTypeTitle)
|
|
|
|
|
.first()
|
|
|
|
|
.find("span")
|
|
|
|
|
.click();
|
2020-06-04 13:49:22 +00:00
|
|
|
cy.get(dynamicInputLocators.evaluatedValue)
|
|
|
|
|
.should("be.visible")
|
2021-07-26 05:50:46 +00:00
|
|
|
.find("pre")
|
|
|
|
|
.first()
|
2020-06-04 13:49:22 +00:00
|
|
|
.should("have.text", expectedType);
|
|
|
|
|
});
|
2020-06-10 12:25:16 +00:00
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("validateToastMessage", (value) => {
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(commonlocators.toastMsg).should("have.text", value);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("NavigateToPaginationTab", () => {
|
|
|
|
|
cy.get(ApiEditor.apiTab)
|
|
|
|
|
.contains("Pagination")
|
|
|
|
|
.click();
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.xpath(apiwidget.paginationWithUrl).click({ force: true });
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("ValidateTableData", (value) => {
|
2020-09-08 13:04:51 +00:00
|
|
|
// cy.isSelectRow(0);
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.readTabledata("0", "0").then((tabData) => {
|
2020-06-10 12:25:16 +00:00
|
|
|
const tableData = tabData;
|
2020-09-08 13:04:51 +00:00
|
|
|
expect(tableData).to.equal(value.toString());
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("ValidatePublishTableData", (value) => {
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.isSelectRow(0);
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.readTabledataPublish("0", "0").then((tabData) => {
|
2020-06-10 12:25:16 +00:00
|
|
|
const tableData = tabData;
|
2020-08-18 10:30:36 +00:00
|
|
|
expect(tableData).to.equal(value);
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("ValidatePaginateResponseUrlData", (runTestCss) => {
|
Feature/entity browse (#220)
# New Feature: Entity Explorer
- Entities are actions (apis and queries), datasources, pages, and widgets
- With this new feature, all entities in the application will be available
to view in the new entity explorer sidebar
- All existing application features from the api sidebar, query sidebar, datasource sidebar and pages sidebar
now are avialable on the entity explorer sidebar
- Users are now able to quickly switch to any entity in the application from the entity explorer sidebar.
- Users can also search all entities in the application from the new sidebar. Use cmd + f or ctrl + f to focus on the search input
- Users can rename entities from the new sidebar
- Users can also perform contextual actions on these entities like set a page as home page, copy/move actions, delete entity, etc from the context menu available alongside the entities in the sidebar
- Users can view the properties of the entities in the sidebar, as well as copy bindings to use in the application.
2020-08-10 08:52:45 +00:00
|
|
|
cy.SearchEntityandOpen("Api2");
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.NavigateToPaginationTab();
|
|
|
|
|
cy.RunAPI();
|
|
|
|
|
cy.get(ApiEditor.apiPaginationNextTest).click();
|
|
|
|
|
cy.wait("@postExecute");
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.wait(2000);
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(runTestCss).click();
|
|
|
|
|
cy.wait("@postExecute");
|
2021-03-31 08:35:19 +00:00
|
|
|
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
2021-02-11 12:54:00 +00:00
|
|
|
cy.wait(2000);
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(ApiEditor.formActionButtons).should("be.visible");
|
|
|
|
|
cy.get(ApiEditor.ApiRunBtn).should("not.be.disabled");
|
|
|
|
|
cy.get(ApiEditor.responseBody)
|
2020-08-18 10:30:36 +00:00
|
|
|
.contains("name")
|
2020-06-10 12:25:16 +00:00
|
|
|
.siblings("span")
|
|
|
|
|
.invoke("text")
|
2021-01-04 10:16:08 +00:00
|
|
|
.then((tabData) => {
|
2020-07-11 06:42:53 +00:00
|
|
|
const respBody = tabData.match(/"(.*)"/)[0];
|
2020-06-10 12:25:16 +00:00
|
|
|
localStorage.setItem("respBody", respBody);
|
|
|
|
|
cy.log(respBody);
|
2020-09-02 06:44:01 +00:00
|
|
|
cy.SearchEntityandOpen("Table1");
|
2020-06-11 05:13:18 +00:00
|
|
|
// cy.openPropertyPane("tablewidget");
|
|
|
|
|
// cy.testJsontext("tabledata", "{{Api2.data.results}}");
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.isSelectRow(0);
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.readTabledata("0", "1").then((tabData) => {
|
2020-08-18 10:30:36 +00:00
|
|
|
const tableData = tabData;
|
|
|
|
|
expect(`\"${tableData}\"`).to.equal(respBody);
|
|
|
|
|
});
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("ValidatePaginationInputData", () => {
|
|
|
|
|
cy.isSelectRow(0);
|
2021-01-04 10:16:08 +00:00
|
|
|
cy.readTabledataPublish("0", "1").then((tabData) => {
|
2020-08-18 10:30:36 +00:00
|
|
|
const tableData = tabData;
|
|
|
|
|
expect(`\"${tableData}\"`).to.equal(localStorage.getItem("respBody"));
|
|
|
|
|
});
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
|
|
|
|
|
2021-01-04 10:16:08 +00:00
|
|
|
Cypress.Commands.add("callApi", (apiname) => {
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(commonlocators.callApi)
|
|
|
|
|
.first()
|
2021-07-07 03:46:16 +00:00
|
|
|
.click({ force: true });
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(commonlocators.singleSelectMenuItem)
|
2021-07-07 03:46:16 +00:00
|
|
|
.contains("Execute a Query")
|
|
|
|
|
.click({ force: true });
|
2020-06-10 12:25:16 +00:00
|
|
|
cy.get(commonlocators.selectMenuItem)
|
|
|
|
|
.contains(apiname)
|
2021-07-07 03:46:16 +00:00
|
|
|
.click({ force: true });
|
2020-06-10 12:25:16 +00:00
|
|
|
});
|
2020-08-07 06:56:47 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("assertPageSave", () => {
|
|
|
|
|
cy.get(commonlocators.saveStatusSuccess);
|
|
|
|
|
});
|
2021-05-18 11:47:43 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("ValidateQueryParams", (param) => {
|
|
|
|
|
cy.xpath(apiwidget.paramsTab)
|
2021-05-20 12:03:08 +00:00
|
|
|
.should("be.visible")
|
|
|
|
|
.click({ force: true });
|
2021-07-08 07:04:47 +00:00
|
|
|
|
|
|
|
|
cy.validateCodeEditorContent(apiwidget.paramKey, param.key);
|
|
|
|
|
cy.validateCodeEditorContent(apiwidget.paramValue, param.value);
|
2021-05-18 11:47:43 +00:00
|
|
|
});
|
2021-07-08 07:04:47 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add(
|
|
|
|
|
"validateCodeEditorContent",
|
|
|
|
|
(selector, contentToValidate) => {
|
|
|
|
|
cy.get(selector).within(() => {
|
|
|
|
|
cy.get(".CodeMirror-code").should("have.text", contentToValidate);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
);
|
2021-07-29 08:13:10 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("renameDatasource", (datasourceName) => {
|
|
|
|
|
cy.get(".t--edit-datasource-name").click();
|
|
|
|
|
cy.get(".t--edit-datasource-name input")
|
|
|
|
|
.clear()
|
|
|
|
|
.type(datasourceName, { force: true })
|
|
|
|
|
.should("have.value", datasourceName)
|
|
|
|
|
.blur();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("skipGenerateCRUDPage", () => {
|
|
|
|
|
cy.get(generatePage.buildFromScratchActionCard).click();
|
|
|
|
|
});
|
2021-08-20 06:57:01 +00:00
|
|
|
|
|
|
|
|
Cypress.Commands.add("fillAmazonS3DatasourceForm", () => {
|
|
|
|
|
cy.get(datasourceEditor.projectID).type(Cypress.env("S3_ACCESS_KEY"));
|
|
|
|
|
cy.get(datasourceEditor.serviceAccCredential)
|
|
|
|
|
.clear()
|
|
|
|
|
.type(Cypress.env("S3_SECRET_KEY"));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Cypress.Commands.add("createAmazonS3Datasource", () => {
|
|
|
|
|
cy.NavigateToDatasourceEditor();
|
|
|
|
|
cy.get(datasourceEditor.AmazonS3).click();
|
|
|
|
|
|
|
|
|
|
cy.fillAmazonS3DatasourceForm();
|
|
|
|
|
|
|
|
|
|
cy.testSaveDatasource();
|
|
|
|
|
});
|