Publish Test Cases
This commit is contained in:
parent
2fb29290f1
commit
17bddbda75
|
|
@ -1,4 +1,5 @@
|
||||||
const commonlocators = require("../../../locators/commonlocators.json");
|
const commonlocators = require("../../../locators/commonlocators.json");
|
||||||
|
const publish = require("../../../locators/publishWidgetspage.json");
|
||||||
const dsl = require("../../../fixtures/TextTabledsl.json");
|
const dsl = require("../../../fixtures/TextTabledsl.json");
|
||||||
|
|
||||||
describe("Text-Table Binding Functionality", function() {
|
describe("Text-Table Binding Functionality", function() {
|
||||||
|
|
@ -20,9 +21,16 @@ describe("Text-Table Binding Functionality", function() {
|
||||||
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.PublishtheApp();
|
||||||
|
cy.isSelectRow(1);
|
||||||
|
cy.readTabledataPublish("1", "0").then(tabDataP => {
|
||||||
|
const tabValueP = tabDataP;
|
||||||
|
cy.get(commonlocators.TextInside).should("have.text", tabValueP);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("Text-Table Binding Functionality For Email", function() {
|
it("Text-Table Binding Functionality For Email", function() {
|
||||||
|
cy.get(publish.backToEditor).click();
|
||||||
cy.isSelectRow(2);
|
cy.isSelectRow(2);
|
||||||
cy.openPropertyPane("textwidget");
|
cy.openPropertyPane("textwidget");
|
||||||
cy.testJsontext("text", "{{Table1.selectedRow.email}}");
|
cy.testJsontext("text", "{{Table1.selectedRow.email}}");
|
||||||
|
|
@ -33,9 +41,16 @@ describe("Text-Table Binding Functionality", function() {
|
||||||
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.PublishtheApp();
|
||||||
|
cy.isSelectRow(2);
|
||||||
|
cy.readTabledataPublish("2", "1").then(tabDataP => {
|
||||||
|
const tabValueP = tabDataP;
|
||||||
|
cy.get(commonlocators.TextInside).should("have.text", tabValueP);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("Text-Table Binding Functionality For Total Length", function() {
|
it("Text-Table Binding Functionality For Total Length", function() {
|
||||||
|
cy.get(publish.backToEditor).click();
|
||||||
cy.pageNo(1);
|
cy.pageNo(1);
|
||||||
cy.openPropertyPane("textwidget");
|
cy.openPropertyPane("textwidget");
|
||||||
cy.testJsontext("text", "{{Table1.pageSize}}");
|
cy.testJsontext("text", "{{Table1.pageSize}}");
|
||||||
|
|
@ -44,13 +59,24 @@ describe("Text-Table Binding Functionality", function() {
|
||||||
.then(listing => {
|
.then(listing => {
|
||||||
const listingCount = listing.length.toString();
|
const listingCount = listing.length.toString();
|
||||||
cy.get(commonlocators.TextInside).should("have.text", listingCount);
|
cy.get(commonlocators.TextInside).should("have.text", listingCount);
|
||||||
|
cy.PublishtheApp();
|
||||||
|
cy.pageNo(1);
|
||||||
|
cy.get(publish.tableLength)
|
||||||
|
.find("tr")
|
||||||
|
.then(listing => {
|
||||||
|
const listingCountP = listing.length.toString();
|
||||||
|
cy.get(commonlocators.TextInside).should(
|
||||||
|
"have.text",
|
||||||
|
listingCountP,
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
it("Text-Table Binding Functionality For Username", function() {
|
it("Text-Table Binding Functionality For Username", function() {
|
||||||
|
cy.get(publish.backToEditor).click();
|
||||||
/**
|
/**
|
||||||
* @param(Index) Provide index value to select the row.
|
* @param(Index) Provide index value to select the row.
|
||||||
*/
|
*/
|
||||||
cy.pageNo(1);
|
|
||||||
cy.isSelectRow(1);
|
cy.isSelectRow(1);
|
||||||
cy.openPropertyPane("textwidget");
|
cy.openPropertyPane("textwidget");
|
||||||
cy.testJsontext("text", "{{Table1.selectedRow.userName}}");
|
cy.testJsontext("text", "{{Table1.selectedRow.userName}}");
|
||||||
|
|
@ -61,10 +87,15 @@ describe("Text-Table Binding Functionality", function() {
|
||||||
cy.readTabledata("1", "2").then(tabData => {
|
cy.readTabledata("1", "2").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.PublishtheApp();
|
||||||
|
cy.isSelectRow(1);
|
||||||
|
cy.readTabledataPublish("1", "2").then(tabDataP => {
|
||||||
|
const tabValueP = tabDataP;
|
||||||
|
cy.get(commonlocators.TextInside).should("have.text", tabValueP);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
afterEach(() => {
|
});
|
||||||
// put your clean up code if any
|
afterEach(() => {
|
||||||
cy.get(commonlocators.editPropCrossButton).click();
|
// put your clean up code if any
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,18 @@
|
||||||
{
|
{
|
||||||
"buttonWidget": ".t--widget-buttonwidget",
|
"buttonWidget": ".t--widget-buttonwidget",
|
||||||
"textWidget": ".t--widget-textwidget",
|
"textWidget": ".t--widget-textwidget",
|
||||||
"richTextEditorWidget": ".t--widget-richtexteditorwidget",
|
"richTextEditorWidget": ".t--widget-richtexteditorwidget",
|
||||||
"datepickerWidget": ".t--widget-datepickerwidget",
|
"datepickerWidget": ".t--widget-datepickerwidget",
|
||||||
"backToEditor": ".bp3-icon.bp3-icon-chevron-left",
|
"backToEditor": ".bp3-icon.bp3-icon-chevron-left",
|
||||||
"inputWidget": ".t--widget-inputwidget",
|
"inputWidget": ".t--widget-inputwidget",
|
||||||
"checkboxWidget": ".t--widget-checkboxwidget",
|
"checkboxWidget": ".t--widget-checkboxwidget",
|
||||||
"radioWidget": ".t--widget-radiogroupwidget",
|
"radioWidget": ".t--widget-radiogroupwidget",
|
||||||
"formWidget": ".t--widget-formwidget",
|
"formWidget": ".t--widget-formwidget",
|
||||||
"imageWidget": ".t--widget-imagewidget",
|
"imageWidget": ".t--widget-imagewidget",
|
||||||
"dropdownWidget": ".t--widget-dropdownwidget",
|
"dropdownWidget": ".t--widget-dropdownwidget",
|
||||||
"tabWidget": ".t--widget-tabswidget",
|
"tabWidget": ".t--widget-tabswidget",
|
||||||
"chartWidget": ".t--widget-chartwidget",
|
"chartWidget": ".t--widget-chartwidget",
|
||||||
"horizontalTab": ".t--widget-chartwidget g[class='raphael-group-104-axis-Line-group'] rect",
|
"horizontalTab": ".t--widget-chartwidget g[class='raphael-group-104-axis-Line-group'] rect",
|
||||||
"tableWidget": ".t--widget-tablewidget"
|
"tableWidget": ".t--widget-tablewidget",
|
||||||
}
|
"tableLength": ".t--widget-tablewidget .e-gridcontent.e-lib.e-droppable"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user