parent
03b8bebf65
commit
c8792b1bae
|
|
@ -8,8 +8,9 @@ import {
|
||||||
describe("Dynamic Height Width validation", function () {
|
describe("Dynamic Height Width validation", function () {
|
||||||
function validateCssProperties(property) {
|
function validateCssProperties(property) {
|
||||||
agHelper.GetNClickByContains("button", "Small", 0, true);
|
agHelper.GetNClickByContains("button", "Small", 0, true);
|
||||||
agHelper.Sleep(3000);
|
agHelper.Sleep(2000);
|
||||||
entityExplorer.SelectEntityByName("Text1");
|
entityExplorer.SelectEntityByName("Text1");
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(draggableWidgets.TEXT),
|
locators._widgetInDeployed(draggableWidgets.TEXT),
|
||||||
|
|
@ -26,6 +27,7 @@ describe("Dynamic Height Width validation", function () {
|
||||||
)
|
)
|
||||||
.then((CurrentValueOfSecondText) => {
|
.then((CurrentValueOfSecondText) => {
|
||||||
entityExplorer.SelectEntityByName("Text3");
|
entityExplorer.SelectEntityByName("Text3");
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(draggableWidgets.TEXT),
|
locators._widgetInDeployed(draggableWidgets.TEXT),
|
||||||
|
|
@ -34,6 +36,7 @@ describe("Dynamic Height Width validation", function () {
|
||||||
)
|
)
|
||||||
.then((CurrentValueOfThirdText) => {
|
.then((CurrentValueOfThirdText) => {
|
||||||
entityExplorer.SelectEntityByName("Text4");
|
entityExplorer.SelectEntityByName("Text4");
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(draggableWidgets.TEXT),
|
locators._widgetInDeployed(draggableWidgets.TEXT),
|
||||||
|
|
@ -120,8 +123,9 @@ describe("Dynamic Height Width validation", function () {
|
||||||
0,
|
0,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
agHelper.Sleep(3000);
|
agHelper.Sleep(2000);
|
||||||
entityExplorer.SelectEntityByName("Text1");
|
entityExplorer.SelectEntityByName("Text1");
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(
|
locators._widgetInDeployed(
|
||||||
|
|
@ -147,6 +151,7 @@ describe("Dynamic Height Width validation", function () {
|
||||||
entityExplorer.SelectEntityByName(
|
entityExplorer.SelectEntityByName(
|
||||||
"Text3",
|
"Text3",
|
||||||
);
|
);
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(
|
locators._widgetInDeployed(
|
||||||
|
|
@ -162,6 +167,7 @@ describe("Dynamic Height Width validation", function () {
|
||||||
entityExplorer.SelectEntityByName(
|
entityExplorer.SelectEntityByName(
|
||||||
"Text4",
|
"Text4",
|
||||||
);
|
);
|
||||||
|
agHelper.Sleep(2000);
|
||||||
agHelper
|
agHelper
|
||||||
.GetWidgetCSSFrAttribute(
|
.GetWidgetCSSFrAttribute(
|
||||||
locators._widgetInDeployed(
|
locators._widgetInDeployed(
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,15 @@ 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");
|
||||||
import * as _ from "../../../../../support/Objects/ObjectsCore";
|
import {
|
||||||
|
agHelper,
|
||||||
|
deployMode,
|
||||||
|
propPane,
|
||||||
|
} from "../../../../../support/Objects/ObjectsCore";
|
||||||
|
|
||||||
describe("Tab widget test", function () {
|
describe("Tab widget test", function () {
|
||||||
before(() => {
|
before(() => {
|
||||||
_.agHelper.AddDsl("layoutdsl");
|
agHelper.AddDsl("layoutdsl");
|
||||||
});
|
});
|
||||||
it("1. Tab Widget Functionality Test", function () {
|
it("1. Tab Widget Functionality Test", function () {
|
||||||
cy.openPropertyPane("tabswidget");
|
cy.openPropertyPane("tabswidget");
|
||||||
|
|
@ -45,7 +49,7 @@ describe("Tab widget test", function () {
|
||||||
.scrollIntoView({ easing: "linear" })
|
.scrollIntoView({ easing: "linear" })
|
||||||
.should("be.visible");
|
.should("be.visible");
|
||||||
cy.assertPageSave();
|
cy.assertPageSave();
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("2. Tab Widget Functionality To Select Tabs", function () {
|
it("2. Tab Widget Functionality To Select Tabs", function () {
|
||||||
|
|
@ -54,23 +58,23 @@ describe("Tab widget test", function () {
|
||||||
.last()
|
.last()
|
||||||
.click({ force: true })
|
.click({ force: true })
|
||||||
.should("have.class", "is-selected");
|
.should("have.class", "is-selected");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("3. Tab Widget Functionality To Unchecked Visible Widget", function () {
|
it("3. Tab Widget Functionality To Unchecked Visible Widget", function () {
|
||||||
cy.openPropertyPane("tabswidget");
|
cy.openPropertyPane("tabswidget");
|
||||||
cy.togglebarDisable(commonlocators.visibleCheckbox);
|
cy.togglebarDisable(commonlocators.visibleCheckbox);
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(publish.tabWidget).should("not.exist");
|
cy.get(publish.tabWidget).should("not.exist");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("4. Tab Widget Functionality To Check Visible Widget", function () {
|
it("4. Tab Widget Functionality To Check Visible Widget", function () {
|
||||||
cy.openPropertyPane("tabswidget");
|
cy.openPropertyPane("tabswidget");
|
||||||
cy.togglebar(commonlocators.visibleCheckbox);
|
cy.togglebar(commonlocators.visibleCheckbox);
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(publish.tabWidget).should("be.visible");
|
cy.get(publish.tabWidget).should("be.visible");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("5. Tab Widget Functionality To Check tab invisiblity", function () {
|
it("5. Tab Widget Functionality To Check tab invisiblity", function () {
|
||||||
|
|
@ -80,9 +84,9 @@ describe("Tab widget test", function () {
|
||||||
});
|
});
|
||||||
cy.get(Layoutpage.tabVisibility).first().click({ force: true });
|
cy.get(Layoutpage.tabVisibility).first().click({ force: true });
|
||||||
cy.get(Layoutpage.tabWidget).contains("Tab 1").should("not.exist");
|
cy.get(Layoutpage.tabWidget).contains("Tab 1").should("not.exist");
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(publish.tabWidget).contains("Tab 1").should("not.exist");
|
cy.get(publish.tabWidget).contains("Tab 1").should("not.exist");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
|
|
||||||
it("6. Tab Widget Functionality To Check tab visibility", function () {
|
it("6. Tab Widget Functionality To Check tab visibility", function () {
|
||||||
|
|
@ -92,9 +96,9 @@ describe("Tab widget test", function () {
|
||||||
});
|
});
|
||||||
cy.get(Layoutpage.tabVisibility).first().click({ force: true });
|
cy.get(Layoutpage.tabVisibility).first().click({ force: true });
|
||||||
cy.get(Layoutpage.tabWidget).contains("Tab 1").should("be.visible");
|
cy.get(Layoutpage.tabWidget).contains("Tab 1").should("be.visible");
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(publish.tabWidget).contains("Tab 1").should("be.visible");
|
cy.get(publish.tabWidget).contains("Tab 1").should("be.visible");
|
||||||
_.deployMode.NavigateBacktoEditor();
|
deployMode.NavigateBacktoEditor();
|
||||||
});
|
});
|
||||||
/* Test to be revisted as the undo action is inconsistent in automation
|
/* Test to be revisted as the undo action is inconsistent in automation
|
||||||
it("7. Tab Widget Functionality To Check undo action after delete", function() {
|
it("7. Tab Widget Functionality To Check undo action after delete", function() {
|
||||||
|
|
@ -115,7 +119,7 @@ describe("Tab widget test", function () {
|
||||||
cy.get(Layoutpage.tabWidget)
|
cy.get(Layoutpage.tabWidget)
|
||||||
.contains("Tab 1")
|
.contains("Tab 1")
|
||||||
.should("be.visible");
|
.should("be.visible");
|
||||||
_.deployMode.DeployApp();
|
deployMode.DeployApp();
|
||||||
cy.get(publish.tabWidget)
|
cy.get(publish.tabWidget)
|
||||||
.contains("Tab 1")
|
.contains("Tab 1")
|
||||||
.should("be.visible");
|
.should("be.visible");
|
||||||
|
|
@ -129,8 +133,8 @@ describe("Tab widget test", function () {
|
||||||
|
|
||||||
cy.openPropertyPane("tabswidget");
|
cy.openPropertyPane("tabswidget");
|
||||||
// Add a new tab
|
// Add a new tab
|
||||||
cy.get(Layoutpage.tabButton).last().click({ force: true });
|
agHelper.ClickButton("Add tab");
|
||||||
cy.get(Layoutpage.tabButton).last().click({ force: true });
|
agHelper.ClickButton("Add tab");
|
||||||
cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls");
|
cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls");
|
||||||
// Should show off right navigation arrow
|
// Should show off right navigation arrow
|
||||||
cy.get(leftNavButtonSelector).should("exist");
|
cy.get(leftNavButtonSelector).should("exist");
|
||||||
|
|
@ -141,7 +145,7 @@ describe("Tab widget test", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("8. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function () {
|
it("8. Tab Widget Functionality To Check Default Tab selected After Selected Tab Delete", function () {
|
||||||
cy.testJsontext("defaulttab", "Tab 2");
|
propPane.UpdatePropertyFieldValue("Default tab", "Tab 1");
|
||||||
cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls");
|
cy.tabVerify(3, "Tab3-for-testing-scroll-navigation-controls");
|
||||||
cy.get(Layoutpage.tabWidget)
|
cy.get(Layoutpage.tabWidget)
|
||||||
.contains("Tab3-for-testing-scroll-navigation-controls")
|
.contains("Tab3-for-testing-scroll-navigation-controls")
|
||||||
|
|
@ -153,19 +157,20 @@ describe("Tab widget test", function () {
|
||||||
),
|
),
|
||||||
).click({ force: true });
|
).click({ force: true });
|
||||||
cy.get(Layoutpage.tabWidget)
|
cy.get(Layoutpage.tabWidget)
|
||||||
.contains("Tab 2")
|
.contains("Tab 1")
|
||||||
.should("have.class", "is-selected");
|
.should("have.class", "is-selected");
|
||||||
});
|
});
|
||||||
|
|
||||||
it("9. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function () {
|
it("9. Tab Widget Functionality To Check First Tab Selected After Selected Tab(Default one) Delete", function () {
|
||||||
cy.get(Layoutpage.tabDelete).eq(2).click({ force: true });
|
cy.get(Layoutpage.tabDelete).eq(1).click({ force: true });
|
||||||
|
cy.wait(1000);
|
||||||
cy.get(Layoutpage.tabWidget)
|
cy.get(Layoutpage.tabWidget)
|
||||||
.contains("Aditya")
|
.contains("Aditya")
|
||||||
.should("have.class", "is-selected");
|
.should("have.class", "is-selected");
|
||||||
// Validates Total Number Of Tabs Displayed In The Property Pane
|
// Validates Total Number Of Tabs Displayed In The Property Pane
|
||||||
cy.get(Layoutpage.tabNumber).should("have.text", "2");
|
cy.get(Layoutpage.tabNumber).should("have.text", "2");
|
||||||
// Validates Total Number Of Tabs Displayed In The Property Pane After Adding A Tab
|
// Validates Total Number Of Tabs Displayed In The Property Pane After Adding A Tab
|
||||||
cy.get(Layoutpage.tabButton).last().click({ force: true });
|
agHelper.ClickButton("Add tab");
|
||||||
cy.get(Layoutpage.tabNumber).should("have.text", "3");
|
cy.get(Layoutpage.tabNumber).should("have.text", "3");
|
||||||
//Validates Total Number Of Tabs Displayed In The Property Pane After Deleting A Tab
|
//Validates Total Number Of Tabs Displayed In The Property Pane After Deleting A Tab
|
||||||
cy.get(Layoutpage.tabDelete).eq(1).click({ force: true });
|
cy.get(Layoutpage.tabDelete).eq(1).click({ force: true });
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user