Merge branch 'release' of https://github.com/appsmithorg/appsmith into fix/rte-newline

This commit is contained in:
vicky-primathon.in 2021-02-22 22:20:36 +05:30
commit 3d5d51fbde
220 changed files with 4037 additions and 2805 deletions

View File

@ -260,7 +260,7 @@ jobs:
install: false install: false
parallel: true parallel: true
group: "Electrons on Github Action" group: "Electrons on Github Action"
spec: "cypress/integration/Smoke_TestSuite/*/*" spec: "cypress/integration/Smoke_TestSuite/**/*.js"
working-directory: app/client working-directory: app/client
# tag will be either "push" or "pull_request_target" # tag will be either "push" or "pull_request_target"
tag: ${{ github.event_name }} tag: ${{ github.event_name }}

View File

@ -22,15 +22,15 @@
}, },
"env": { "env": {
"APPSMITH_MONGODB_URI": { "APPSMITH_MONGODB_URI": {
"description": "Your Mongo Database URI", "description": "Your Mongo Database URI. Since Heroku doesn't support a managed MongoDB instance, you'll have to create a Mongo DB instance on another service such as https://cloud.mongodb.com",
"value": "" "value": ""
}, },
"APPSMITH_ENCRYPTION_PASSWORD": { "APPSMITH_ENCRYPTION_PASSWORD": {
"description": "Encryption password to encrypt all credentials in the database", "description": "Encryption password to encrypt all sensitive credentials in the database. You can use any random string (Eg. abcd). The more random, the better.",
"value": "" "value": ""
}, },
"APPSMITH_ENCRYPTION_SALT": { "APPSMITH_ENCRYPTION_SALT": {
"description" : "Encryption salt used to encrypt all credentials in the database", "description" : "Encryption salt used to encrypt all sensitive credentials in the database. You can use any random string (Eg. abcd). The more random, the better.",
"value": "" "value": ""
}, },
"APPSMITH_MAIL_ENABLED": { "APPSMITH_MAIL_ENABLED": {

View File

@ -1,6 +1,6 @@
const dsl = require("../../../fixtures/executionParamsDsl.json"); const dsl = require("../../../../fixtures/executionParamsDsl.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("API Panel Test Functionality", function() { describe("API Panel Test Functionality", function() {
before(() => { before(() => {

View File

@ -1,5 +1,5 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("API Panel Test Functionality", function() { describe("API Panel Test Functionality", function() {
it("Test Search API fetaure", function() { it("Test Search API fetaure", function() {

View File

@ -1,6 +1,6 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiEditor = require("../../../locators/ApiEditor.json"); const apiEditor = require("../../../../locators/ApiEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("API Panel request body", function() { describe("API Panel request body", function() {
it("Check whether input exists when form-encoded is selected", function() { it("Check whether input exists when form-encoded is selected", function() {

View File

@ -1,4 +1,4 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("API Panel Test Functionality ", function() { describe("API Panel Test Functionality ", function() {
it("Test Search API fetaure", function() { it("Test Search API fetaure", function() {

View File

@ -1,4 +1,4 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("API Panel Test Functionality ", function() { describe("API Panel Test Functionality ", function() {
it("Test API copy/Move/delete feature", function() { it("Test API copy/Move/delete feature", function() {

View File

@ -1,7 +1,7 @@
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const explorerlocators = require("../../../locators/explorerlocators.json"); const explorerlocators = require("../../../../locators/explorerlocators.json");
let duplicateApplicationDsl; let duplicateApplicationDsl;
describe("Duplicate application", function() { describe("Duplicate application", function() {
@ -13,6 +13,7 @@ describe("Duplicate application", function() {
cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(commonlocators.homeIcon).click({ force: true });
const appname = localStorage.getItem("AppName"); const appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname); cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationCard) cy.get(homePage.applicationCard)
@ -28,7 +29,7 @@ describe("Duplicate application", function() {
"response.body.responseMeta.status", "response.body.responseMeta.status",
200, 200,
); );
cy.get("@getPage").then(httpResponse => { cy.get("@getPage").then((httpResponse) => {
const data = httpResponse.response.body.data; const data = httpResponse.response.body.data;
duplicateApplicationDsl = data.layouts[0].dsl; duplicateApplicationDsl = data.layouts[0].dsl;

View File

@ -1,5 +1,5 @@
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
import tinycolor from "tinycolor2"; import tinycolor from "tinycolor2";
describe("Update Application", function() { describe("Update Application", function() {
@ -14,6 +14,7 @@ describe("Update Application", function() {
cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(commonlocators.homeIcon).click({ force: true });
appname = localStorage.getItem("AppName"); appname = localStorage.getItem("AppName");
cy.get(homePage.searchInput).type(appname); cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationCard) cy.get(homePage.applicationCard)
@ -37,7 +38,7 @@ describe("Update Application", function() {
.first() .first()
.click(); .click();
cy.wait("@updateApplication") cy.wait("@updateApplication")
.then(xhr => { .then((xhr) => {
iconname = xhr.response.body.data.icon; iconname = xhr.response.body.data.icon;
}) })
.should("have.nested.property", "response.body.responseMeta.status", 200); .should("have.nested.property", "response.body.responseMeta.status", 200);
@ -53,6 +54,7 @@ describe("Update Application", function() {
it("Check for errors in updating application name", function() { it("Check for errors in updating application name", function() {
cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(commonlocators.homeIcon).click({ force: true });
cy.get(homePage.searchInput).type(appname); cy.get(homePage.searchInput).type(appname);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationCard) cy.get(homePage.applicationCard)
.first() .first()
@ -61,6 +63,7 @@ describe("Update Application", function() {
.first() .first()
.click({ force: true }); .click({ force: true });
cy.get("#loading").should("not.exist"); cy.get("#loading").should("not.exist");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationName).type(" "); cy.get(homePage.applicationName).type(" ");
cy.get(homePage.toastMessage).should( cy.get(homePage.toastMessage).should(
@ -79,6 +82,7 @@ describe("Update Application", function() {
it("Updates the name of first application to very long name and checks whether update is reflected in the application card with a popover", function() { it("Updates the name of first application to very long name and checks whether update is reflected in the application card with a popover", function() {
cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(commonlocators.homeIcon).click({ force: true });
cy.get(homePage.searchInput).clear(); cy.get(homePage.searchInput).clear();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationCard) cy.get(homePage.applicationCard)
@ -94,6 +98,7 @@ describe("Update Application", function() {
"response.body.responseMeta.status", "response.body.responseMeta.status",
200, 200,
); );
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.applicationCard) cy.get(homePage.applicationCard)

View File

@ -1,11 +1,11 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/MultipleInput.json"); const dsl = require("../../../../fixtures/MultipleInput.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
describe("Binding the API with pageOnLoad and input Widgets", function() { describe("Binding the API with pageOnLoad and input Widgets", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/uiBindDsl.json"); const dsl = require("../../../../fixtures/uiBindDsl.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Binding the Datepicker and Text Widget", function() { describe("Binding the Datepicker and Text Widget", function() {
let nextDay; let nextDay;
@ -27,7 +27,7 @@ describe("Binding the Datepicker and Text Widget", function() {
cy.get(formWidgetsPage.defaultDate).click(); cy.get(formWidgetsPage.defaultDate).click();
cy.SetDateToToday(); cy.SetDateToToday();
cy.getDate(1, "YYYY-MM-DD").then(date => { cy.getDate(1, "YYYY-MM-DD").then((date) => {
cy.log("retured date" + date); cy.log("retured date" + date);
nextDay = date; nextDay = date;
cy.wait("@updateLayout"); cy.wait("@updateLayout");
@ -63,7 +63,7 @@ describe("Binding the Datepicker and Text Widget", function() {
cy.get(formWidgetsPage.datepickerWidget + " .bp3-input") cy.get(formWidgetsPage.datepickerWidget + " .bp3-input")
.eq(1) .eq(1)
.invoke("val") .invoke("val")
.then(val => { .then((val) => {
dateDp2 = val; dateDp2 = val;
cy.log(dateDp2); cy.log(dateDp2);
}); });
@ -81,7 +81,7 @@ describe("Binding the Datepicker and Text Widget", function() {
/** /**
*Validate the date in text widget *Validate the date in text widget
*/ */
cy.getDate(1, "YYYY-MM-DD").then(date => { cy.getDate(1, "YYYY-MM-DD").then((date) => {
cy.log("retured date" + date); cy.log("retured date" + date);
nextDay = date; nextDay = date;
cy.get(commonlocators.labelTextStyle).should("contain", nextDay); cy.get(commonlocators.labelTextStyle).should("contain", nextDay);

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/tabInputDsl.json"); const dsl = require("../../../../fixtures/tabInputDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the input Widget with tab Widget", function() { describe("Binding the input Widget with tab Widget", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableTextPaginationDsl.json"); const dsl = require("../../../../fixtures/tableTextPaginationDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json"); const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
describe("Test Create Api and Bind to Table widget", function() { describe("Test Create Api and Bind to Table widget", function() {
before(() => { before(() => {
@ -31,6 +31,7 @@ describe("Test Create Api and Bind to Table widget", function() {
/**Validate Table data on current page(page1) */ /**Validate Table data on current page(page1) */
cy.ValidateTableData("1"); cy.ValidateTableData("1");
cy.get(commonlocators.tableNextPage).click({ force: true }); cy.get(commonlocators.tableNextPage).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(5000); cy.wait(5000);
/* /*
cy.wait("@postExecute").should( cy.wait("@postExecute").should(

View File

@ -1,10 +1,10 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/formInputTableDsl.json"); const dsl = require("../../../../fixtures/formInputTableDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the table widget and input Widget", function() { describe("Binding the table widget and input Widget", function() {
before(() => { before(() => {
@ -39,7 +39,7 @@ describe("Binding the table widget and input Widget", function() {
.last() .last()
.type("2", { force: true }); .type("2", { force: true });
cy.get(commonlocators.editPropCrossButton).click(); cy.get(commonlocators.editPropCrossButton).click();
cy.readTabledataPublish("2", "0").then(tabData => { cy.readTabledataPublish("2", "0").then((tabData) => {
const tabValue = tabData; const tabValue = tabData;
expect(tabValue).to.be.equal("6788734"); expect(tabValue).to.be.equal("6788734");
cy.log("the value is" + tabValue); cy.log("the value is" + tabValue);

View File

@ -1,9 +1,9 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableTextPaginationDsl.json"); const dsl = require("../../../../fixtures/tableTextPaginationDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json"); const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Test Create Api and Bind to Table widget", function() { describe("Test Create Api and Bind to Table widget", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableWidgetDsl.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json"); const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
describe("Test Create Api and Bind to Table widget", function() { describe("Test Create Api and Bind to Table widget", function() {
let apiData; let apiData;
@ -17,7 +17,7 @@ describe("Test Create Api and Bind to Table widget", function() {
.contains("name") .contains("name")
.siblings("span") .siblings("span")
.invoke("text") .invoke("text")
.then(text => { .then((text) => {
const value = text.match(/"(.*)"/)[0]; const value = text.match(/"(.*)"/)[0];
cy.log(value); cy.log(value);
@ -36,11 +36,11 @@ describe("Test Create Api and Bind to Table widget", function() {
* readTabledata--> is to read the table contents * readTabledata--> is to read the table contents
* @param --> "row num" and "col num" * @param --> "row num" and "col num"
*/ */
cy.readTabledata("0", "1").then(tabData => { cy.readTabledata("0", "1").then((tabData) => {
expect(apiData).to.eq(`\"${tabData}\"`); expect(apiData).to.eq(`\"${tabData}\"`);
}); });
cy.PublishtheApp(); cy.PublishtheApp();
cy.readTabledataPublish("0", "1").then(tabData => { cy.readTabledataPublish("0", "1").then((tabData) => {
expect(apiData).to.eq(`\"${tabData}\"`); expect(apiData).to.eq(`\"${tabData}\"`);
}); });
}); });

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/formInputTableDsl.json"); const dsl = require("../../../../fixtures/formInputTableDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the Table and input Widget", function() { describe("Binding the Table and input Widget", function() {
before(() => { before(() => {

View File

@ -1,12 +1,12 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/buttondsl.json"); const dsl = require("../../../../fixtures/buttondsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const dsl2 = require("../../../fixtures/displayWidgetDsl.json"); const dsl2 = require("../../../../fixtures/displayWidgetDsl.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
describe("Binding the button Widgets and validating NavigateTo Page functionality", function() { describe("Binding the button Widgets and validating NavigateTo Page functionality", function() {
before(() => { before(() => {
@ -22,12 +22,14 @@ describe("Binding the button Widgets and validating NavigateTo Page functionalit
.click(); .click();
cy.enterNavigatePageName(testdata.externalPage); cy.enterNavigatePageName(testdata.externalPage);
cy.get(commonlocators.editPropCrossButton).click({ force: true }); cy.get(commonlocators.editPropCrossButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(300); cy.wait(300);
}); });
it("Button click should take the control to page link validation", function() { it("Button click should take the control to page link validation", function() {
cy.PublishtheApp(); cy.PublishtheApp();
cy.get(publish.buttonWidget).click(); cy.get(publish.buttonWidget).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(publish.buttonWidget).should("not.exist"); cy.get(publish.buttonWidget).should("not.exist");
cy.go("back"); cy.go("back");

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../locators/ViewWidgets.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/ChartTextDsl.json"); const dsl = require("../../../../fixtures/ChartTextDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Text-Chart Binding Functionality", function() { describe("Text-Chart Binding Functionality", function() {
before(() => { before(() => {
@ -34,7 +34,7 @@ describe("Text-Chart Binding Functionality", function() {
this.data.Chartval[1], this.data.Chartval[1],
this.data.Chartval[2], this.data.Chartval[2],
]; ];
[0, 1, 2].forEach(k => { [0, 1, 2].forEach((k) => {
cy.get(viewWidgetsPage.rectangleChart) cy.get(viewWidgetsPage.rectangleChart)
.eq(k) .eq(k)
.trigger("mousemove", { force: true }); .trigger("mousemove", { force: true });
@ -52,7 +52,7 @@ describe("Text-Chart Binding Functionality", function() {
this.data.Chartval[1], this.data.Chartval[1],
this.data.Chartval[2], this.data.Chartval[2],
]; ];
[0, 1, 2].forEach(k => { [0, 1, 2].forEach((k) => {
cy.get(publish.rectChart) cy.get(publish.rectChart)
.eq(k) .eq(k)
.trigger("mousemove", { force: true }); .trigger("mousemove", { force: true });

View File

@ -1,5 +1,5 @@
const dsl = require("../../../fixtures/SimpleBinding.json"); const dsl = require("../../../../fixtures/SimpleBinding.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
describe("Binding the multiple widgets and validating default data", function() { describe("Binding the multiple widgets and validating default data", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableInputDsl.json"); const dsl = require("../../../../fixtures/tableInputDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const dsl2 = require("../../../fixtures/displayWidgetDsl.json"); const dsl2 = require("../../../../fixtures/displayWidgetDsl.json");
const pageid = "MyPage"; const pageid = "MyPage";
describe("Binding the multiple Widgets and validating NavigateTo Page", function() { describe("Binding the multiple Widgets and validating NavigateTo Page", function() {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/Invalid_binding_dsl.json"); const dsl = require("../../../../fixtures/Invalid_binding_dsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the multiple widgets and validating default data", function() { describe("Binding the multiple widgets and validating default data", function() {
before(() => { before(() => {

View File

@ -1,4 +1,4 @@
const dsl = require("../../../fixtures/Js_toggle_dsl.json"); const dsl = require("../../../../fixtures/Js_toggle_dsl.json");
describe("JS Toggle tests", () => { describe("JS Toggle tests", () => {
before(() => { before(() => {
@ -16,7 +16,7 @@ describe("JS Toggle tests", () => {
.should("have.class", "is-active"); .should("have.class", "is-active");
cy.testJsontext("visible", "false"); cy.testJsontext("visible", "false");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000); cy.wait(1000);
cy.get(".t--property-control-visible") cy.get(".t--property-control-visible")

View File

@ -1,6 +1,6 @@
const dsl = require("../../../fixtures/inputdsl.json"); const dsl = require("../../../../fixtures/inputdsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const dynamicInput = require("../../../locators/DynamicInput.json"); const dynamicInput = require("../../../../locators/DynamicInput.json");
describe("Binding prompt", function() { describe("Binding prompt", function() {
before(() => { before(() => {

View File

@ -1,11 +1,11 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableWidgetDsl.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const dsl2 = require("../../../fixtures/displayWidgetDsl.json"); const dsl2 = require("../../../../fixtures/displayWidgetDsl.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const pageid = "MyPage"; const pageid = "MyPage";
describe("Table Widget and Navigate to functionality validation", function() { describe("Table Widget and Navigate to functionality validation", function() {
@ -29,6 +29,7 @@ describe("Table Widget and Navigate to functionality validation", function() {
it("Create MyPage and valdiate if its successfully created", function() { it("Create MyPage and valdiate if its successfully created", function() {
cy.Createpage(pageid); cy.Createpage(pageid);
cy.addDsl(dsl2); cy.addDsl(dsl2);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible"); cy.get(`.t--entity-name:contains("${pageid}")`).should("be.visible");
}); });

View File

@ -1,11 +1,11 @@
/* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-unnecessary-waiting */
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() { describe("Table Widget property pane feature validation", function() {
before(() => { before(() => {

View File

@ -1,7 +1,7 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/TextTabledsl.json"); const dsl = require("../../../../fixtures/TextTabledsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Text-Table Binding Functionality", function() { describe("Text-Table Binding Functionality", function() {
Cypress.on("uncaught:exception", (err, runnable) => { Cypress.on("uncaught:exception", (err, runnable) => {
@ -25,14 +25,14 @@ describe("Text-Table Binding Functionality", function() {
* @param{Row Index} Provide the row index * @param{Row Index} Provide the row index
* @param(Column Index) Provide column index * @param(Column Index) Provide column index
*/ */
cy.readTabledata("1", "0").then(tabData => { cy.readTabledata("1", "0").then((tabData) => {
const tabValue = tabData; const tabValue = tabData;
cy.get(commonlocators.TextInside).should("have.text", tabValue); cy.get(commonlocators.TextInside).should("have.text", tabValue);
cy.EvaluateDataType("string"); cy.EvaluateDataType("string");
cy.EvaluateCurrentValue(tabValue); cy.EvaluateCurrentValue(tabValue);
cy.PublishtheApp(); cy.PublishtheApp();
cy.isSelectRow(1); cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then(tabDataP => { cy.readTabledataPublish("1", "0").then((tabDataP) => {
const tabValueP = tabDataP; const tabValueP = tabDataP;
cy.get(commonlocators.TextInside).should("have.text", tabValueP); cy.get(commonlocators.TextInside).should("have.text", tabValueP);
}); });
@ -49,14 +49,14 @@ describe("Text-Table Binding Functionality", function() {
* @param{Row Index} Provide the row index * @param{Row Index} Provide the row index
* @param(Column Index) Provide column index * @param(Column Index) Provide column index
*/ */
cy.readTabledata("2", "1").then(tabData => { cy.readTabledata("2", "1").then((tabData) => {
const tabValue = tabData; const tabValue = tabData;
cy.get(commonlocators.TextInside).should("have.text", tabValue); cy.get(commonlocators.TextInside).should("have.text", tabValue);
cy.EvaluateDataType("string"); cy.EvaluateDataType("string");
cy.EvaluateCurrentValue(tabValue); cy.EvaluateCurrentValue(tabValue);
cy.PublishtheApp(); cy.PublishtheApp();
cy.isSelectRow(2); cy.isSelectRow(2);
cy.readTabledataPublish("2", "1").then(tabDataP => { cy.readTabledataPublish("2", "1").then((tabDataP) => {
const tabValueP = tabDataP; const tabValueP = tabDataP;
cy.get(commonlocators.TextInside).should("have.text", tabValueP); cy.get(commonlocators.TextInside).should("have.text", tabValueP);
}); });
@ -70,7 +70,7 @@ describe("Text-Table Binding Functionality", function() {
cy.testJsontext("text", "{{Table1.pageSize}}"); cy.testJsontext("text", "{{Table1.pageSize}}");
cy.get(commonlocators.TableRow) cy.get(commonlocators.TableRow)
.find(".tr") .find(".tr")
.then(listing => { .then((listing) => {
const listingCount = listing.length.toString(); const listingCount = listing.length.toString();
cy.get(commonlocators.TextInside).contains(listingCount); cy.get(commonlocators.TextInside).contains(listingCount);
cy.EvaluateDataType("string"); cy.EvaluateDataType("string");
@ -78,7 +78,7 @@ describe("Text-Table Binding Functionality", function() {
cy.PublishtheApp(); cy.PublishtheApp();
cy.get(publish.tableLength) cy.get(publish.tableLength)
.find(".tr") .find(".tr")
.then(listing => { .then((listing) => {
const listingCountP = listing.length.toString(); const listingCountP = listing.length.toString();
cy.get(commonlocators.TextInside).contains(listingCountP); cy.get(commonlocators.TextInside).contains(listingCountP);
}); });
@ -93,14 +93,14 @@ describe("Text-Table Binding Functionality", function() {
cy.wait("@updateLayout"); cy.wait("@updateLayout");
cy.get(commonlocators.TableRow) cy.get(commonlocators.TableRow)
.find(".tr.selected-row") .find(".tr.selected-row")
.then(listing => { .then((listing) => {
const listingCount = listing.length; const listingCount = listing.length;
expect(listingCount).to.be.equal(1); expect(listingCount).to.be.equal(1);
}); });
cy.openPropertyPane("textwidget"); cy.openPropertyPane("textwidget");
cy.testJsontext("text", "{{Table1.selectedRow.email}}"); cy.testJsontext("text", "{{Table1.selectedRow.email}}");
cy.PublishtheApp(); cy.PublishtheApp();
cy.readTabledataPublish("2", "1").then(tabDataP => { cy.readTabledataPublish("2", "1").then((tabDataP) => {
const tabValueP = tabDataP; const tabValueP = tabDataP;
cy.get(commonlocators.TextInside).should("have.text", tabValueP); cy.get(commonlocators.TextInside).should("have.text", tabValueP);
}); });
@ -119,14 +119,14 @@ describe("Text-Table Binding Functionality", function() {
* @param{Row Index} Provide the row index * @param{Row Index} Provide the row index
* @param(Column Index) Provide column index * @param(Column Index) Provide column index
*/ */
cy.readTabledata("1", "2").then(tabData => { cy.readTabledata("1", "2").then((tabData) => {
const tabValue = `\"${tabData}\"`; const tabValue = `\"${tabData}\"`;
cy.get(commonlocators.TextInside).contains(tabValue); cy.get(commonlocators.TextInside).contains(tabValue);
cy.EvaluateDataType("string"); cy.EvaluateDataType("string");
cy.EvaluateCurrentValue(tabValue); cy.EvaluateCurrentValue(tabValue);
cy.PublishtheApp(); cy.PublishtheApp();
cy.isSelectRow(1); cy.isSelectRow(1);
cy.readTabledataPublish("1", "2").then(tabDataP => { cy.readTabledataPublish("1", "2").then((tabDataP) => {
const tabValueP = `\"${tabDataP}\"`; const tabValueP = `\"${tabDataP}\"`;
cy.get(commonlocators.TextInside).contains(tabValueP); cy.get(commonlocators.TextInside).contains(tabValueP);
}); });

View File

@ -1,13 +1,13 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/rundsl.json"); const dsl = require("../../../../fixtures/rundsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const pageid = "MyPage"; const pageid = "MyPage";
let updatedName; let updatedName;

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/MultipleWidgetDsl.json"); const dsl = require("../../../../fixtures/MultipleWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the multiple widgets and validating default data", function() { describe("Binding the multiple widgets and validating default data", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/MultipleInput.json"); const dsl = require("../../../../fixtures/MultipleInput.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the multiple input Widget", function() { describe("Binding the multiple input Widget", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/formInputTableDsl.json"); const dsl = require("../../../../fixtures/formInputTableDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Binding the multiple input Widget", function() { describe("Binding the multiple input Widget", function() {
before(() => { before(() => {
@ -36,7 +36,7 @@ describe("Binding the multiple input Widget", function() {
it("validation of data displayed in all widgets based on row selected", function() { it("validation of data displayed in all widgets based on row selected", function() {
cy.isSelectRow(1); cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then(tabData => { cy.readTabledataPublish("1", "0").then((tabData) => {
const tabValue = tabData; const tabValue = tabData;
expect(tabValue).to.be.equal("2736212"); expect(tabValue).to.be.equal("2736212");
cy.log("the value is" + tabValue); cy.log("the value is" + tabValue);

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/inputBindingdsl.json"); const dsl = require("../../../../fixtures/inputBindingdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("aTob and bToa library tests ", function() { describe("aTob and bToa library tests ", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/inputBindingdsl.json"); const dsl = require("../../../../fixtures/inputBindingdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Loadash basic test with input Widget", function() { describe("Loadash basic test with input Widget", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/inputBindingdsl.json"); const dsl = require("../../../../fixtures/inputBindingdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Moment basic test with input Widget", function() { describe("Moment basic test with input Widget", function() {
before(() => { before(() => {

View File

@ -1,5 +1,5 @@
const dsl = require("../../../fixtures/xmlParser.json"); const dsl = require("../../../../fixtures/xmlParser.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
describe("xml2json text", function() { describe("xml2json text", function() {
before(() => { before(() => {

View File

@ -1,5 +1,5 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/CanvasResizeDsl.json"); const dsl = require("../../../../fixtures/CanvasResizeDsl.json");
describe("Canvas Resize", function() { describe("Canvas Resize", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../locators/ViewWidgets.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Chart Widget Functionality", function() { describe("Chart Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../locators/ViewWidgets.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Image Widget Functionality", function() { describe("Image Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,7 +1,7 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const viewWidgetsPage = require("../../../locators/ViewWidgets.json"); const viewWidgetsPage = require("../../../../locators/ViewWidgets.json");
const dsl = require("../../../fixtures/Mapdsl.json"); const dsl = require("../../../../fixtures/Mapdsl.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) { if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) {
describe("Map Widget Functionality", function() { describe("Map Widget Functionality", function() {
@ -128,6 +128,7 @@ if (Cypress.env("APPSMITH_GOOGLE_MAPS_API_KEY")) {
}); });
it("Map-Check Visible field Validation", function() { it("Map-Check Visible field Validation", function() {
cy.openPropertyPane("mapwidget");
//Check the disableed checkbox and Validate //Check the disableed checkbox and Validate
cy.CheckWidgetProperties(commonlocators.visibleCheckbox); cy.CheckWidgetProperties(commonlocators.visibleCheckbox);
cy.PublishtheApp(); cy.PublishtheApp();

View File

@ -1,11 +1,11 @@
/* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-unnecessary-waiting */
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() { describe("Table Widget property pane feature validation", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() { describe("Table Widget property pane feature validation", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/tableTextPaginationDsl.json"); const dsl = require("../../../../fixtures/tableTextPaginationDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../locators/ApiEditor.json"); const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Test Create Api and Bind to Table widget", function() { describe("Test Create Api and Bind to Table widget", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() { describe("Table Widget property pane feature validation", function() {
before(() => { before(() => {

View File

@ -1,11 +1,11 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pageid = "MyPage"; const pageid = "MyPage";
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableNewDsl.json"); const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Table Widget property pane feature validation", function() { describe("Table Widget property pane feature validation", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
/* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-unnecessary-waiting */
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/tableWidgetDsl.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Table Widget Functionality", function() { describe("Table Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Text Widget Functionality", function() { describe("Text Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/videoWidgetDsl.json"); const dsl = require("../../../../fixtures/videoWidgetDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
describe("Video Widget Functionality", function() { describe("Video Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const dsl = require("../../../fixtures/commondsl.json"); const dsl = require("../../../../fixtures/commondsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const dynamicInputLocators = require("../../../locators/DynamicInput.json"); const dynamicInputLocators = require("../../../../locators/DynamicInput.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("Dynamic input autocomplete", () => { describe("Dynamic input autocomplete", () => {
beforeEach(() => { beforeEach(() => {
@ -15,7 +15,7 @@ describe("Dynamic input autocomplete", () => {
.first() .first()
.focus() .focus()
.type("{ctrl}{shift}{downarrow}") .type("{ctrl}{shift}{downarrow}")
.then($cm => { .then(($cm) => {
if ($cm.val() !== "") { if ($cm.val() !== "") {
cy.get(dynamicInputLocators.input) cy.get(dynamicInputLocators.input)
.first() .first()

View File

@ -1,9 +1,9 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const pageid = "MyPage"; const pageid = "MyPage";

View File

@ -1,11 +1,11 @@
const tdsl = require("../../../fixtures/tableWidgetDsl.json"); const tdsl = require("../../../../fixtures/tableWidgetDsl.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const pageid = "MyPage"; const pageid = "MyPage";
describe("Entity explorer tests related to widgets and validation", function() { describe("Entity explorer tests related to widgets and validation", function() {

View File

@ -1,16 +1,17 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const explorer = require("../../../../locators/explorerlocators.json");
const pageid = "MyPage"; const pageid = "MyPage";
let datasourceName; let datasourceName;
describe("Entity explorer tests related to query and datasource", function() { describe("Entity explorer tests related to query and datasource", function() {
before(() => { before(() => {
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
datasourceName = uid; datasourceName = uid;
}); });
}); });
@ -92,6 +93,9 @@ describe("Entity explorer tests related to query and datasource", function() {
cy.EvaluateCurrentValue("select * from users"); cy.EvaluateCurrentValue("select * from users");
cy.get(`.t--entity.action:contains(Query1)`)
.find(explorer.collapse)
.click();
cy.get(apiwidget.propertyList).then(function($lis) { cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(3); expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");

View File

@ -1,10 +1,10 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/formWidgetdsl.json"); const dsl = require("../../../../fixtures/formWidgetdsl.json");
const pageid = "MyPage"; const pageid = "MyPage";
@ -21,6 +21,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
formWidgetsPage.formInner, formWidgetsPage.formInner,
); );
cy.get(commonlocators.copyWidget).click(); cy.get(commonlocators.copyWidget).click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(commonlocators.toastBody) cy.get(commonlocators.toastBody)
.first() .first()
@ -36,6 +37,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
expect($lis.eq(1)).to.contain("{{FormTest.data}}"); expect($lis.eq(1)).to.contain("{{FormTest.data}}");
}); });
cy.DeleteWidgetFromSideBar(); cy.DeleteWidgetFromSideBar();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(apiwidget.propertyList).should("not.exist"); cy.get(apiwidget.propertyList).should("not.exist");
/* /*
@ -53,6 +55,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
"response.body.responseMeta.status", "response.body.responseMeta.status",
200, 200,
); );
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(apiwidget.propertyList).then(function($lis) { cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(2); expect($lis).to.have.length(2);

View File

@ -1,11 +1,11 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const dsl = require("../../../fixtures/formWidgetdsl.json"); const dsl = require("../../../../fixtures/formWidgetdsl.json");
const pageid = "MyPage"; const pageid = "MyPage";
before(() => { before(() => {
@ -24,6 +24,7 @@ describe("Test Suite to validate copy/delete/undo functionalites", function() {
); );
cy.get("body").click(); cy.get("body").click();
cy.get("body").type(`{${modifierKey}}c`); cy.get("body").type(`{${modifierKey}}c`);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(commonlocators.toastBody) cy.get(commonlocators.toastBody)
.first() .first()

View File

@ -1,6 +1,6 @@
const dsl = require("../../../fixtures/displayWidgetDsl.json"); const dsl = require("../../../../fixtures/displayWidgetDsl.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
describe("Entity explorer tests related to widgets and validation", function() { describe("Entity explorer tests related to widgets and validation", function() {
beforeEach(() => { beforeEach(() => {

View File

@ -1,10 +1,10 @@
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const modalWidgetPage = require("../../../locators/ModalWidget.json"); const modalWidgetPage = require("../../../../locators/ModalWidget.json");
describe("Button Widget Functionality", function() { describe("Button Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const formWidgetDsl = require("../../../fixtures/formWidgetdsl.json"); const formWidgetDsl = require("../../../../fixtures/formWidgetdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Checkbox Widget Functionality", function() { describe("Checkbox Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("DatePicker Widget Functionality", function() { describe("DatePicker Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetLocators = require("../../../locators/Widgets.json"); const widgetLocators = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
const data = require("../../../fixtures/example.json"); const data = require("../../../../fixtures/example.json");
describe("Dropdown Widget Functionality", function() { describe("Dropdown Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,6 +1,6 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("FilePicker Widget Functionality", function() { describe("FilePicker Widget Functionality", function() {
beforeEach(() => { beforeEach(() => {

View File

@ -1,5 +1,5 @@
const dsl = require("../../../fixtures/formResetDsl.json"); const dsl = require("../../../../fixtures/formResetDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
describe("Form reset functionality", function() { describe("Form reset functionality", function() {
before(() => { before(() => {
@ -19,7 +19,7 @@ describe("Form reset functionality", function() {
cy.get(widgetsPage.formButtonWidget) cy.get(widgetsPage.formButtonWidget)
.contains("Reset") .contains("Reset")
.click(); .click();
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500); cy.wait(500);
cy.get(".tr") cy.get(".tr")

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/formdsl.json"); const dsl = require("../../../../fixtures/formdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Form Widget Functionality", function() { describe("Form Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,7 +1,7 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
describe("Input Widget Functionality", function() { describe("Input Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Radio Widget Functionality", function() { describe("Radio Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,7 +1,7 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const dsl = require("../../../fixtures/formdsl1.json"); const dsl = require("../../../../fixtures/formdsl1.json");
const publishPage = require("../../../locators/publishWidgetspage.json"); const publishPage = require("../../../../locators/publishWidgetspage.json");
describe("RichTextEditor Widget Functionality", function() { describe("RichTextEditor Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,10 +1,10 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../locators/FormWidgets.json"); const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/newFormDsl.json"); const dsl = require("../../../../fixtures/newFormDsl.json");
const formWidgetDsl = require("../../../fixtures/formWidgetdsl.json"); const formWidgetDsl = require("../../../../fixtures/formWidgetdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Switch Widget Functionality", function() { describe("Switch Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,6 +1,6 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const dsl = require("../../../fixtures/containerdsl.json"); const dsl = require("../../../../fixtures/containerdsl.json");
describe("Container Widget Functionality", function() { describe("Container Widget Functionality", function() {
before(() => { before(() => {

View File

@ -1,9 +1,9 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const Layoutpage = require("../../../locators/Layout.json"); const Layoutpage = require("../../../../locators/Layout.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../fixtures/layoutdsl.json"); const dsl = require("../../../../fixtures/layoutdsl.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Tab widget test", function() { describe("Tab widget test", function() {
before(() => { before(() => {
@ -32,6 +32,7 @@ describe("Tab widget test", function() {
.click({ force: true }) .click({ force: true })
.should("be.visible"); .should("be.visible");
cy.get(Layoutpage.tabButton).click({ force: true }); cy.get(Layoutpage.tabButton).click({ force: true });
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(200); cy.wait(200);
cy.tabVerify(2, "Day"); cy.tabVerify(2, "Day");
cy.get(Layoutpage.tabDelete) cy.get(Layoutpage.tabDelete)

View File

@ -1,6 +1,6 @@
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("Onboarding", function() { describe("Onboarding", function() {
it("Onboarding flow", function() { it("Onboarding flow", function() {

View File

@ -1,13 +1,13 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
describe("Check if org has user icons on homepage", function() { describe("Check if org has user icons on homepage", function() {
let orgid; let orgid;
it("create org and check if user icons exists in that org on homepage", function() { it("create org and check if user icons exists in that org on homepage", function() {
cy.NavigateToHome(); cy.NavigateToHome();
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
orgid = uid; orgid = uid;
localStorage.setItem("OrgName", orgid); localStorage.setItem("OrgName", orgid);
cy.createOrg(orgid); cy.createOrg(orgid);

View File

@ -1,6 +1,6 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
describe("Org name validation spec", function() { describe("Org name validation spec", function() {
it("create org with leading space validation", function() { it("create org with leading space validation", function() {

View File

@ -1,5 +1,5 @@
const dsl = require("../../../fixtures/PageLoadDsl.json"); const dsl = require("../../../../fixtures/PageLoadDsl.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("Page Load tests", () => { describe("Page Load tests", () => {
before(() => { before(() => {

View File

@ -1,4 +1,4 @@
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Pages", function() { describe("Pages", function() {
let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`; let veryLongPageName = `abcdefghijklmnopqrstuvwxyz1234`;

View File

@ -1,4 +1,4 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("Check for product updates button and modal", function() { describe("Check for product updates button and modal", function() {
it("Check if we should show the product updates button and it opens the updates modal", function() { it("Check if we should show the product updates button and it opens the updates modal", function() {

View File

@ -1,5 +1,5 @@
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
describe("Switch datasource", function() { describe("Switch datasource", function() {
let postgresDatasourceName; let postgresDatasourceName;
@ -8,7 +8,7 @@ describe("Switch datasource", function() {
it("Create postgres datasource", function() { it("Create postgres datasource", function() {
cy.NavigateToDatasourceEditor(); cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click(); cy.get(datasource.PostgreSQL).click();
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
postgresDatasourceName = uid; postgresDatasourceName = uid;
cy.get(".t--edit-datasource-name").click(); cy.get(".t--edit-datasource-name").click();
@ -30,7 +30,7 @@ describe("Switch datasource", function() {
it("Create mongo datasource", function() { it("Create mongo datasource", function() {
cy.NavigateToDatasourceEditor(); cy.NavigateToDatasourceEditor();
cy.get(datasource.MongoDB).click(); cy.get(datasource.MongoDB).click();
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
mongoDatasourceName = uid; mongoDatasourceName = uid;
cy.get(".t--edit-datasource-name").click(); cy.get(".t--edit-datasource-name").click();
@ -75,7 +75,7 @@ describe("Switch datasource", function() {
cy.get(".CodeMirror") cy.get(".CodeMirror")
.first() .first()
.then(editor => { .then((editor) => {
editor[0].CodeMirror.setValue('{"find": "planets"}'); editor[0].CodeMirror.setValue('{"find": "planets"}');
}); });

View File

@ -1,70 +0,0 @@
const queryLocators = require("../../../locators/QueryEditor.json");
const queryEditor = require("../../../locators/QueryEditor.json");
const dsl = require("../../../fixtures/inputdsl.json");
const pages = require("../../../locators/Pages.json");
const widgetsPage = require("../../../locators/Widgets.json");
const publish = require("../../../locators/publishWidgetspage.json");
const testdata = require("../../../fixtures/testdata.json");
const commonlocators = require("../../../locators/commonlocators.json");
let datasourceName;
describe("Addwidget from Query and bind with other widgets", function() {
// before(() => {
// cy.addDsl(dsl);
// });
// it("Create a PostgresDataSource", () => {
// cy.createPostgresDatasource();
// cy.get("@createDatasource").then(httpResponse => {
// datasourceName = httpResponse.response.body.data.name;
// });
// });
// it("Create a query and populate response by choosing addWidget and validate in Table Widget", () => {
// cy.NavigateToQueryEditor();
// cy.contains(".t--datasource-name", datasourceName)
// .find(queryLocators.createQuery)
// .click();
// cy.get(queryLocators.templateMenu).click();
// cy.get(".CodeMirror textarea")
// .first()
// .focus()
// .type("SELECT * FROM configs LIMIT 10;");
// cy.wait(500);
// cy.get(queryEditor.runQuery).click();
// cy.wait("@postExecute").should(
// "have.nested.property",
// "response.body.responseMeta.status",
// 200,
// );
// cy.get(".t--add-widget").click();
// cy.SearchEntityandOpen("Table1");
// cy.isSelectRow(1);
// cy.readTabledataPublish("1", "0").then(tabData => {
// const tabValue = tabData;
// cy.log("the value is" + tabValue);
// expect(tabValue).to.be.equal("5");
// });
// });
// it("Input widget test with default value from table widget", () => {
// cy.SearchEntityandOpen("Input1");
// cy.get(widgetsPage.defaultInput).type(testdata.addInputWidgetBinding);
// cy.get(commonlocators.editPropCrossButton).click();
// cy.wait("@updateLayout").should(
// "have.nested.property",
// "response.body.responseMeta.status",
// 200,
// );
// });
// it("validation of data displayed in input widget based on row data selected", function() {
// cy.isSelectRow(1);
// cy.readTabledataPublish("1", "0").then(tabData => {
// const tabValue = tabData;
// cy.log("the value is" + tabValue);
// expect(tabValue).to.be.equal("5");
// cy.get(publish.inputWidget + " " + "input")
// .first()
// .invoke("attr", "value")
// .should("contain", tabValue);
// });
// });
});

View File

@ -1,41 +0,0 @@
// const queryLocators = require("../../../locators/QueryEditor.json");
// const queryEditor = require("../../../locators/QueryEditor.json");
// let datasourceName;
// describe("Add widget", function() {
// beforeEach(() => {
// cy.createPostgresDatasource();
// cy.get("@createDatasource").then(httpResponse => {
// datasourceName = httpResponse.response.body.data.name;
// });
// });
// it("Add widget", () => {
// cy.NavigateToQueryEditor();
// cy.contains(".t--datasource-name", datasourceName)
// .find(queryLocators.createQuery)
// .click();
// cy.get(queryLocators.templateMenu).click();
// cy.get(".CodeMirror textarea")
// .first()
// .focus()
// .type("select * from configs");
// cy.wait(500);
// cy.get(queryEditor.runQuery).click();
// cy.wait("@postExecute").should(
// "have.nested.property",
// "response.body.responseMeta.status",
// 200,
// );
// cy.get(".t--add-widget").click();
// cy.SearchEntityandOpen("Table1");
// cy.isSelectRow(1);
// cy.readTabledataPublish("1", "0").then(tabData => {
// const tabValue = tabData;
// expect(tabValue).to.be.equal("5");
// cy.log("the value is " + tabValue);
// });
// });
// });

View File

@ -1,5 +1,5 @@
const dsl = require("../../../fixtures/tableWidgetDsl.json"); const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
describe("API Panel Test Functionality", function() { describe("API Panel Test Functionality", function() {
before(() => { before(() => {
@ -17,8 +17,7 @@ describe("API Panel Test Functionality", function() {
cy.SearchEntityandOpen("Table1"); cy.SearchEntityandOpen("Table1");
cy.testJsontext("tabledata", "{{PageLoadApi.data.data"); cy.testJsontext("tabledata", "{{PageLoadApi.data.data");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000);
cy.wait("@updateLayout"); cy.wait("@updateLayout");
cy.reload(); cy.reload();

View File

@ -1,5 +1,5 @@
const ApiEditor = require("../../../locators/ApiEditor.json"); const ApiEditor = require("../../../../locators/ApiEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("Test curl import flow", function() { describe("Test curl import flow", function() {
it("Test curl import flow Run and Delete", function() { it("Test curl import flow Run and Delete", function() {

View File

@ -1,6 +1,6 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const ApiEditor = require("../../../locators/ApiEditor.json"); const ApiEditor = require("../../../../locators/ApiEditor.json");
describe("API Panel Test Functionality", function() { describe("API Panel Test Functionality", function() {
afterEach(function() { afterEach(function() {

View File

@ -1,5 +1,5 @@
const ApiEditor = require("../../../locators/ApiEditor.json"); const ApiEditor = require("../../../../locators/ApiEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
describe("Test curl import flow", function() { describe("Test curl import flow", function() {
it("Test curl import flow for POST action", function() { it("Test curl import flow for POST action", function() {
@ -16,11 +16,11 @@ describe("Test curl import flow", function() {
cy.importCurl(); cy.importCurl();
cy.RunAPI(); cy.RunAPI();
cy.ResponseStatusCheck("201 CREATED"); cy.ResponseStatusCheck("201 CREATED");
cy.get("@curlImport").then(response => { cy.get("@curlImport").then((response) => {
cy.expect(response.response.body.responseMeta.success).to.eq(true); cy.expect(response.response.body.responseMeta.success).to.eq(true);
cy.get(apiwidget.ApiName) cy.get(apiwidget.ApiName)
.invoke("text") .invoke("text")
.then(text => { .then((text) => {
const someText = text; const someText = text;
expect(someText).to.equal(response.response.body.data.name); expect(someText).to.equal(response.response.body.data.name);
}); });

View File

@ -1,8 +1,8 @@
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../fixtures/commondsl.json"); const dsl = require("../../../../fixtures/commondsl.json");
const widgetsPage = require("../../../locators/Widgets.json"); const widgetsPage = require("../../../../locators/Widgets.json");
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const pages = require("../../../locators/Pages.json"); const pages = require("../../../../locators/Pages.json");
describe("Moustache test Functionality", function() { describe("Moustache test Functionality", function() {
beforeEach(() => { beforeEach(() => {

View File

@ -3,7 +3,7 @@
* *
* */ * */
// /// <reference types="Cypress" /> // /// <reference types="Cypress" />
// const testdata = require("../../../fixtures/testdata.json"); // const testdata = require("../../../../fixtures/testdata.json");
// const apiwidget = require("../../../locators/apiWidgetslocator.json"); // const apiwidget = require("../../../locators/apiWidgetslocator.json");
// describe("API Panel Test Functionality ", function() { // describe("API Panel Test Functionality ", function() {
// it("Test Market place API by adding to a page", function() { // it("Test Market place API by adding to a page", function() {

View File

@ -1,4 +1,4 @@
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
describe("Create, test, save then delete a mongo datasource", function() { describe("Create, test, save then delete a mongo datasource", function() {
it("Create, test, save then delete a mongo datasource", function() { it("Create, test, save then delete a mongo datasource", function() {

View File

@ -1,5 +1,5 @@
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
const queryEditor = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName; let datasourceName;

View File

@ -1,6 +1,6 @@
const testdata = require("../../../fixtures/testdata.json"); const testdata = require("../../../../fixtures/testdata.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const pageid = "MyPage"; const pageid = "MyPage";
describe("Entity explorer API pane related testcases", function() { describe("Entity explorer API pane related testcases", function() {
@ -23,6 +23,9 @@ describe("Entity explorer API pane related testcases", function() {
cy.SaveAndRunAPI(); cy.SaveAndRunAPI();
cy.validateRequest(testdata.baseUrl, testdata.methods, testdata.Get); cy.validateRequest(testdata.baseUrl, testdata.methods, testdata.Get);
cy.ResponseStatusCheck(testdata.successStatusCode); cy.ResponseStatusCheck(testdata.successStatusCode);
cy.get(`.t--entity.action:contains(FirstAPI)`)
.find(explorer.collapse)
.click();
cy.get(apiwidget.propertyList).then(function($lis) { cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(3); expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}"); expect($lis.eq(0)).to.contain("{{FirstAPI.isLoading}}");

View File

@ -1,7 +1,8 @@
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
const datasource = require("../../../locators/DatasourcesEditor.json"); const datasource = require("../../../../locators/DatasourcesEditor.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const explorer = require("../../../../locators/explorerlocators.json");
const pageid = "MyPage"; const pageid = "MyPage";
let updatedName; let updatedName;
@ -20,7 +21,7 @@ describe("Entity explorer tests related to copy query", function() {
cy.NavigateToQueryEditor(); cy.NavigateToQueryEditor();
cy.get("@createDatasource").then(httpResponse => { cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name; datasourceName = httpResponse.response.body.data.name;
cy.contains(".t--datasource-name", datasourceName) cy.contains(".t--datasource-name", datasourceName)
@ -42,9 +43,12 @@ describe("Entity explorer tests related to copy query", function() {
cy.EvaluateCurrentValue("select * from users"); cy.EvaluateCurrentValue("select * from users");
cy.get("@createDatasource").then(httpResponse => { cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name; datasourceName = httpResponse.response.body.data.name;
cy.get(`.t--entity.action:contains(Query1)`)
.find(explorer.collapse)
.click();
cy.get(apiwidget.propertyList).then(function($lis) { cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(3); expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}"); expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");
@ -65,6 +69,9 @@ describe("Entity explorer tests related to copy query", function() {
cy.copyEntityToPage(pageid); cy.copyEntityToPage(pageid);
cy.SearchEntityandOpen("Query1Copy"); cy.SearchEntityandOpen("Query1Copy");
cy.runQuery(); cy.runQuery();
cy.get(`.t--entity.action:contains(Query1Copy)`)
.find(explorer.collapse)
.click();
cy.get(apiwidget.propertyList).then(function($lis) { cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(3); expect($lis).to.have.length(3);
expect($lis.eq(0)).to.contain("{{Query1Copy.isLoading}}"); expect($lis.eq(0)).to.contain("{{Query1Copy.isLoading}}");
@ -80,7 +87,7 @@ describe("Entity explorer tests related to copy query", function() {
cy.get(`.t--entity-name:contains(${datasourceName})`) cy.get(`.t--entity-name:contains(${datasourceName})`)
.last() .last()
.click(); .click();
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
updatedName = uid; updatedName = uid;
cy.log("complete uid :" + updatedName); cy.log("complete uid :" + updatedName);
updatedName = uid.replace(/-/g, "_").slice(1, 15); updatedName = uid.replace(/-/g, "_").slice(1, 15);

View File

@ -1,8 +1,8 @@
const explorer = require("../../../locators/explorerlocators.json"); const explorer = require("../../../../locators/explorerlocators.json");
const queryEditor = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../../locators/QueryEditor.json");
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
const commonlocators = require("../../../locators/commonlocators.json"); const commonlocators = require("../../../../locators/commonlocators.json");
const apiwidget = require("../../../locators/apiWidgetslocator.json"); const apiwidget = require("../../../../locators/apiWidgetslocator.json");
let datasourceName; let datasourceName;
@ -10,7 +10,7 @@ describe("Entity explorer datasource structure", function() {
beforeEach(() => { beforeEach(() => {
cy.ClearSearch(); cy.ClearSearch();
cy.createPostgresDatasource(); cy.createPostgresDatasource();
cy.get("@createDatasource").then(httpResponse => { cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name; datasourceName = httpResponse.response.body.data.name;
}); });
}); });
@ -140,7 +140,7 @@ describe("Entity explorer datasource structure", function() {
cy.get(".CodeMirror") cy.get(".CodeMirror")
.first() .first()
.then(editor => { .then((editor) => {
editor[0].CodeMirror.setValue(`DROP TABLE ${tableName}`); editor[0].CodeMirror.setValue(`DROP TABLE ${tableName}`);
cy.WaitAutoSave(); cy.WaitAutoSave();
cy.get(queryEditor.runQuery).click(); cy.get(queryEditor.runQuery).click();

View File

@ -1,6 +1,6 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
/* eslint-disable cypress/no-unnecessary-waiting */ /* eslint-disable cypress/no-unnecessary-waiting */
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
describe("Create new org and share with a user", function() { describe("Create new org and share with a user", function() {
let orgid; let orgid;

View File

@ -1,7 +1,7 @@
/// <reference types="Cypress" /> /// <reference types="Cypress" />
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
const publish = require("../../../locators/publishWidgetspage.json"); const publish = require("../../../../locators/publishWidgetspage.json");
describe("Create new org and share with a user", function() { describe("Create new org and share with a user", function() {
let orgid; let orgid;

View File

@ -1,11 +1,11 @@
const homePage = require("../../../locators/HomePage.json"); const homePage = require("../../../../locators/HomePage.json");
describe("Update Organization", function() { describe("Update Organization", function() {
let orgid; let orgid;
it("Open the org general settings and update org name. The update should reflect in the org. It should also reflect in the org names on the left side and the org dropdown. ", function() { it("Open the org general settings and update org name. The update should reflect in the org. It should also reflect in the org names on the left side and the org dropdown. ", function() {
cy.NavigateToHome(); cy.NavigateToHome();
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
orgid = uid; orgid = uid;
localStorage.setItem("OrgName", orgid); localStorage.setItem("OrgName", orgid);
cy.createOrg(orgid); cy.createOrg(orgid);
@ -19,17 +19,18 @@ describe("Update Organization", function() {
}); });
cy.get(homePage.orgSettingOption).click(); cy.get(homePage.orgSettingOption).click();
}); });
cy.generateUUID().then(uid => { cy.generateUUID().then((uid) => {
orgid = uid; orgid = uid;
localStorage.setItem("OrgName", orgid); localStorage.setItem("OrgName", orgid);
cy.get(homePage.orgNameInput).clear(); cy.get(homePage.orgNameInput).clear();
cy.get(homePage.orgNameInput).type(orgid); cy.get(homePage.orgNameInput).type(orgid);
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000); cy.wait(2000);
cy.get(homePage.orgHeaderName).should("have.text", orgid); cy.get(homePage.orgHeaderName).should("have.text", orgid);
}); });
cy.NavigateToHome(); cy.NavigateToHome();
cy.get(homePage.leftPanelContainer).within(() => { cy.get(homePage.leftPanelContainer).within(() => {
cy.get("span").should(item => { cy.get("span").should((item) => {
expect(item).to.contain.text(orgid); expect(item).to.contain.text(orgid);
}); });
}); });

View File

@ -0,0 +1,71 @@
const queryLocators = require("../../../../locators/QueryEditor.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
const dsl = require("../../../../fixtures/inputdsl.json");
const pages = require("../../../../locators/Pages.json");
const widgetsPage = require("../../../../locators/Widgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const testdata = require("../../../../fixtures/testdata.json");
const commonlocators = require("../../../../locators/commonlocators.json");
let datasourceName;
describe("Addwidget from Query and bind with other widgets", function() {
before(() => {
cy.addDsl(dsl);
});
it("Create a PostgresDataSource", () => {
cy.createPostgresDatasource();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
});
});
it("Create a query and populate response by choosing addWidget and validate in Table Widget", () => {
cy.NavigateToQueryEditor();
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.createQuery)
.click();
cy.get(queryLocators.templateMenu).click();
cy.get(".CodeMirror textarea")
.first()
.focus()
.type("SELECT * FROM configs LIMIT 10;");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(queryEditor.runQuery).click();
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get(".t--add-widget").click();
cy.SearchEntityandOpen("Table1");
cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then((tabData) => {
const tabValue = tabData;
cy.log("the value is" + tabValue);
expect(tabValue).to.be.equal("5");
});
});
it("Input widget test with default value from table widget", () => {
cy.SearchEntityandOpen("Input1");
cy.get(widgetsPage.defaultInput).type(testdata.addInputWidgetBinding);
cy.get(commonlocators.editPropCrossButton).click();
cy.wait("@updateLayout").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
});
it("validation of data displayed in input widget based on row data selected", function() {
cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then((tabData) => {
const tabValue = tabData;
cy.log("the value is" + tabValue);
expect(tabValue).to.be.equal("5");
cy.get(publish.inputWidget + " " + "input")
.first()
.invoke("attr", "value")
.should("contain", tabValue);
});
});
});

View File

@ -0,0 +1,42 @@
const queryLocators = require("../../../../locators/QueryEditor.json");
const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName;
describe("Add widget", function() {
beforeEach(() => {
cy.createPostgresDatasource();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
});
});
it("Add widget", () => {
cy.NavigateToQueryEditor();
cy.contains(".t--datasource-name", datasourceName)
.find(queryLocators.createQuery)
.click();
cy.get(queryLocators.templateMenu).click();
cy.get(".CodeMirror textarea")
.first()
.focus()
.type("select * from configs");
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get(queryEditor.runQuery).click();
cy.wait("@postExecute").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
cy.get(".t--add-widget").click();
cy.SearchEntityandOpen("Table1");
cy.isSelectRow(1);
cy.readTabledataPublish("1", "0").then((tabData) => {
const tabValue = tabData;
expect(tabValue).to.be.equal("5");
cy.log("the value is " + tabValue);
});
});
});

View File

@ -1,11 +1,11 @@
const queryLocators = require("../../../locators/QueryEditor.json"); const queryLocators = require("../../../../locators/QueryEditor.json");
const queryEditor = require("../../../locators/QueryEditor.json"); const queryEditor = require("../../../../locators/QueryEditor.json");
let datasourceName; let datasourceName;
describe("Confirm run action", function() { describe("Confirm run action", function() {
beforeEach(() => { beforeEach(() => {
cy.createPostgresDatasource(); cy.createPostgresDatasource();
cy.get("@createDatasource").then(httpResponse => { cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name; datasourceName = httpResponse.response.body.data.name;
}); });
}); });

Some files were not shown because too many files have changed in this diff Show More