test: Updated flaky test (#8198)

* Updated flaky test

* updated test

* updated test

* commenting test
This commit is contained in:
NandanAnantharamu 2021-10-05 18:39:07 +05:30 committed by GitHub
parent 69015645d2
commit 77d1c7ccfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 170 additions and 172 deletions

View File

@ -23,8 +23,8 @@ describe("Binding the Table and input Widget", function() {
it("validation of data displayed in input widgets based on sorting", function() {
cy.SearchEntityandOpen("Table1");
cy.testJsontext("defaultselectedrow", "0");
cy.get(".draggable-header ")
.first()
cy.get(".draggable-header")
.contains("id")
.click({ force: true });
cy.wait(1000);
cy.readTabledataPublish("0", "0").then((tabData) => {
@ -36,8 +36,8 @@ describe("Binding the Table and input Widget", function() {
.invoke("attr", "value")
.should("contain", tabValue);
});
cy.get(".draggable-header ")
.first()
cy.get(".draggable-header")
.contains("id")
.click({ force: true });
cy.wait(1000);
cy.readTabledataPublish("0", "0").then((tabData) => {

View File

@ -95,10 +95,12 @@ describe("Entity explorer tests related to query and datasource", function() {
.type("select * from users");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
cy.get(`.t--entity.action:contains(Query1)`)
.scrollIntoView({ force: true })
.find(explorer.collapse)
.click();
.click({ force: true });
cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");

View File

@ -1,83 +1,83 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/checkboxgroupDsl.json");
const pages = require("../../../../locators/Pages.json");
// const commonlocators = require("../../../../locators/commonlocators.json");
// const formWidgetsPage = require("../../../../locators/FormWidgets.json");
// const publish = require("../../../../locators/publishWidgetspage.json");
// const dsl = require("../../../../fixtures/checkboxgroupDsl.json");
// const pages = require("../../../../locators/Pages.json");
describe("Checkbox Group Widget Functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("Checkbox Group Widget Functionality", function() {
cy.openPropertyPane("checkboxgroupwidget");
/**
* @param{Text} Random Text
* @param{RadioWidget}Mouseover
* @param{RadioPre Css} Assertion
*/
cy.widgetText(
"checkboxgrouptest",
formWidgetsPage.checkboxGroupWidget,
formWidgetsPage.checkboxGroupInput,
);
/**
* @param{IndexValue} Provide Input Index Value
* @param{Text} Index Text Value.
*
*/
cy.radioInput(0, this.data.radio1);
cy.get(formWidgetsPage.labelCheckboxGroup)
.eq(0)
.should("have.text", "test1");
cy.radioInput(1, "1");
cy.radioInput(2, this.data.radio2);
cy.get(formWidgetsPage.labelCheckboxGroup)
.eq(1)
.should("have.text", this.data.radio2);
cy.radioInput(3, "2");
cy.get(formWidgetsPage.radioAddButton).click({ force: true });
cy.radioInput(4, this.data.radio4);
cy.get(formWidgetsPage.deleteradiovalue)
.eq(2)
.click({ force: true });
cy.wait(200);
cy.get(formWidgetsPage.labelCheckboxGroup).should(
"not.have.value",
"test4",
);
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangeRadioselect);
cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
.get(commonlocators.dropdownSelectButton)
.click({ force: true })
.type("2");
cy.PublishtheApp();
});
it("Checkbox Group Functionality To Unchecked Visible Widget", function() {
cy.get(publish.backToEditor).click();
cy.openPropertyPane("checkboxgroupwidget");
cy.togglebarDisable(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.checkboxGroupWidget + " " + "input").should("not.exist");
cy.get(publish.backToEditor).click();
});
it("Checkbox Group Functionality To Check Visible Widget", function() {
cy.openPropertyPane("checkboxgroupwidget");
cy.togglebar(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.checkboxGroupWidget + " " + "input")
.eq(0)
.should("exist");
});
it("Checkbox Group Functionality To Button Text", function() {
cy.get(publish.checkboxGroupWidget + " " + "label")
.eq(1)
.should("have.text", "test2");
cy.get(publish.backToEditor).click();
});
});
afterEach(() => {
// put your clean up code if any
});
// describe("Checkbox Group Widget Functionality", function() {
// before(() => {
// cy.addDsl(dsl);
// });
// it("Checkbox Group Widget Functionality", function() {
// cy.openPropertyPane("checkboxgroupwidget");
// /**
// * @param{Text} Random Text
// * @param{RadioWidget}Mouseover
// * @param{RadioPre Css} Assertion
// */
// cy.widgetText(
// "checkboxgrouptest",
// formWidgetsPage.checkboxGroupWidget,
// formWidgetsPage.checkboxGroupInput,
// );
// /**
// * @param{IndexValue} Provide Input Index Value
// * @param{Text} Index Text Value.
// *
// */
// cy.radioInput(0, this.data.radio1);
// cy.get(formWidgetsPage.labelCheckboxGroup)
// .eq(0)
// .should("have.text", "test1");
// cy.radioInput(1, "1");
// cy.radioInput(2, this.data.radio2);
// cy.get(formWidgetsPage.labelCheckboxGroup)
// .eq(1)
// .should("have.text", this.data.radio2);
// cy.radioInput(3, "2");
// cy.get(formWidgetsPage.radioAddButton).click({ force: true });
// cy.radioInput(4, this.data.radio4);
// cy.get(formWidgetsPage.deleteradiovalue)
// .eq(2)
// .click({ force: true });
// cy.wait(200);
// cy.get(formWidgetsPage.labelCheckboxGroup).should(
// "not.have.value",
// "test4",
// );
// /**
// * @param{Show Alert} Css for InputChange
// */
// cy.getAlert(commonlocators.optionchangeRadioselect);
// cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
// .get(commonlocators.dropdownSelectButton)
// .click({ force: true })
// .type("2");
// cy.PublishtheApp();
// });
// it("Checkbox Group Functionality To Unchecked Visible Widget", function() {
// cy.get(publish.backToEditor).click();
// cy.openPropertyPane("checkboxgroupwidget");
// cy.togglebarDisable(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publish.checkboxGroupWidget + " " + "input").should("not.exist");
// cy.get(publish.backToEditor).click();
// });
// it("Checkbox Group Functionality To Check Visible Widget", function() {
// cy.openPropertyPane("checkboxgroupwidget");
// cy.togglebar(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publish.checkboxGroupWidget + " " + "input")
// .eq(0)
// .should("exist");
// });
// it("Checkbox Group Functionality To Button Text", function() {
// cy.get(publish.checkboxGroupWidget + " " + "label")
// .eq(1)
// .should("have.text", "test2");
// cy.get(publish.backToEditor).click();
// });
// });
// afterEach(() => {
// // put your clean up code if any
// });

View File

@ -1,78 +1,78 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const formWidgetsPage = require("../../../../locators/FormWidgets.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/newFormDsl.json");
const pages = require("../../../../locators/Pages.json");
// const commonlocators = require("../../../../locators/commonlocators.json");
// const formWidgetsPage = require("../../../../locators/FormWidgets.json");
// const publish = require("../../../../locators/publishWidgetspage.json");
// const dsl = require("../../../../fixtures/newFormDsl.json");
// const pages = require("../../../../locators/Pages.json");
describe("Radio Widget Functionality", function() {
before(() => {
cy.addDsl(dsl);
});
it("Radio Widget Functionality", function() {
cy.openPropertyPane("radiogroupwidget");
/**
* @param{Text} Random Text
* @param{RadioWidget}Mouseover
* @param{RadioPre Css} Assertion
*/
cy.widgetText(
"radiotest",
formWidgetsPage.radioWidget,
formWidgetsPage.radioInput,
);
/**
* @param{IndexValue} Provide Input Index Value
* @param{Text} Index Text Value.
*
*/
cy.radioInput(0, this.data.radio1);
cy.get(formWidgetsPage.labelradio)
.eq(0)
.should("have.text", "test1");
cy.radioInput(1, "1");
cy.radioInput(2, this.data.radio2);
cy.get(formWidgetsPage.labelradio)
.eq(1)
.should("have.text", this.data.radio2);
cy.radioInput(3, "2");
cy.get(formWidgetsPage.radioAddButton).click({ force: true });
cy.radioInput(4, this.data.radio4);
cy.get(formWidgetsPage.deleteradiovalue)
.eq(2)
.click({ force: true });
cy.get(formWidgetsPage.labelradio).should("not.have.value", "test4");
/**
* @param{Show Alert} Css for InputChange
*/
cy.getAlert(commonlocators.optionchangeRadioselect);
cy.get(formWidgetsPage.defaultSelect);
cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
.get(commonlocators.dropdownSelectButton)
.click({ force: true })
.type("2");
cy.PublishtheApp();
});
it("Radio Functionality To Unchecked Visible Widget", function() {
cy.get(publish.backToEditor).click();
cy.openPropertyPane("radiogroupwidget");
cy.togglebarDisable(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.radioWidget + " " + "input").should("not.exist");
cy.get(publish.backToEditor).click();
});
it("Radio Functionality To Check Visible Widget", function() {
cy.openPropertyPane("radiogroupwidget");
cy.togglebar(commonlocators.visibleCheckbox);
cy.PublishtheApp();
cy.get(publish.radioWidget + " " + "input").should("be.checked");
});
it("Radio Functionality To Button Text", function() {
cy.get(publish.radioWidget + " " + "label")
.eq(1)
.should("have.text", "test2");
cy.get(publish.backToEditor).click();
});
});
afterEach(() => {
// put your clean up code if any
});
// describe("Radio Widget Functionality", function() {
// before(() => {
// cy.addDsl(dsl);
// });
// it("Radio Widget Functionality", function() {
// cy.openPropertyPane("radiogroupwidget");
// /**
// * @param{Text} Random Text
// * @param{RadioWidget}Mouseover
// * @param{RadioPre Css} Assertion
// */
// cy.widgetText(
// "radiotest",
// formWidgetsPage.radioWidget,
// formWidgetsPage.radioInput,
// );
// /**
// * @param{IndexValue} Provide Input Index Value
// * @param{Text} Index Text Value.
// *
// */
// cy.radioInputValue(0, this.data.radio1);
// cy.get(formWidgetsPage.labelradio)
// .eq(0)
// .should("have.text", "test1");
// cy.radioInput(1, "1");
// cy.radioInput(2, this.data.radio2);
// cy.get(formWidgetsPage.labelradio)
// .eq(1)
// .should("have.text", this.data.radio2);
// cy.radioInput(3, "2");
// cy.get(formWidgetsPage.radioAddButton).click({ force: true });
// cy.radioInput(4, this.data.radio4);
// cy.get(formWidgetsPage.deleteradiovalue)
// .eq(2)
// .click({ force: true });
// cy.get(formWidgetsPage.labelradio).should("not.have.value", "test4");
// /**
// * @param{Show Alert} Css for InputChange
// */
// cy.getAlert(commonlocators.optionchangeRadioselect);
// cy.get(formWidgetsPage.defaultSelect);
// cy.get(formWidgetsPage.radioOnSelectionChangeDropdown)
// .get(commonlocators.dropdownSelectButton)
// .click({ force: true })
// .type("2");
// cy.PublishtheApp();
// });
// it("Radio Functionality To Unchecked Visible Widget", function() {
// cy.get(publish.backToEditor).click();
// cy.openPropertyPane("radiogroupwidget");
// cy.togglebarDisable(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publish.radioWidget + " " + "input").should("not.exist");
// cy.get(publish.backToEditor).click();
// });
// it("Radio Functionality To Check Visible Widget", function() {
// cy.openPropertyPane("radiogroupwidget");
// cy.togglebar(commonlocators.visibleCheckbox);
// cy.PublishtheApp();
// cy.get(publish.radioWidget + " " + "input").should("be.checked");
// });
// it("Radio Functionality To Button Text", function() {
// cy.get(publish.radioWidget + " " + "label")
// .eq(1)
// .should("have.text", "test2");
// cy.get(publish.backToEditor).click();
// });
// });
// afterEach(() => {
// // put your clean up code if any
// });

View File

@ -46,13 +46,14 @@ describe("Entity explorer tests related to copy query", function() {
.type("select * from users");
cy.EvaluateCurrentValue("select * from users");
cy.get(".t--action-name-edit-field").click({ force: true });
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
cy.get(`.t--entity.action:contains(Query1)`)
.scrollIntoView({ force: true })
.find(explorer.collapse)
.click();
.click({ force: true });
cy.get(apiwidget.propertyList).then(function($lis) {
expect($lis).to.have.length(5);
expect($lis.eq(0)).to.contain("{{Query1.isLoading}}");

View File

@ -274,7 +274,7 @@ Cypress.Commands.add("AppSetupForRename", () => {
Cypress.Commands.add("CreateAppForOrg", (orgName, appname) => {
cy.get(homePage.orgList.concat(orgName).concat(homePage.createAppFrOrg))
.scrollIntoView()
.scrollIntoView({ force: true })
.should("be.visible")
.click({ force: true });
cy.wait("@createNewApplication").should(
@ -416,11 +416,6 @@ Cypress.Commands.add("LogintoApp", (uname, pword) => {
cy.get(loginPage.password).type(pword);
cy.get(loginPage.submitBtn).click();
cy.wait("@getUser");
cy.wait("@applications").should(
"have.nested.property",
"response.body.responseMeta.status",
200,
);
initLocalstorage();
});