test: Automated tests for Flakiness fixes (#10040)

* Bugs  #9069, #9201, #6975, #9922 - Scripted

* Mongo DS update from Cloud to Localhost

* Updating command.js

* Ignoring Mongo until Localhost is fixed

* S3 fixes

* S3 fix

* Mongo Cloud to Localhost transition

* Bug #6375 scripted

* Failure fix

* S3 fix + testSaveDs method flow update

* Refresh datasource structure script fix

* Entity explorer datasource structure script fix

* testSaveDs method flow update fixes

* testSaveDs method flow update fixes - set 2

* S3, Mongo Skipping cases fix

* Custom Chart failure fix

* Button-Call-Query Validation case script fix

* Confirm run action failure fix

* Confirm run action script fix

* Dropdown-Call-Query Validation script fix

* S3 - Delete icon issue fix

* S3 - Delete icon locator updated

* actionContextMenuByEntityName method call update

* Table widget add new menu button column - rgb fix

* Commenting BG color verify - to override flakiness

* Mongo skipping script fix

* Commenting Cypress.runner.stop()

* Removing .skip

* Bind_tableApi_spec.js failure fix

* Slash command failure fix
This commit is contained in:
Aishwarya-U-R 2021-12-31 11:58:47 +05:30 committed by GitHub
parent 946efd816c
commit d71a873e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 29 deletions

View File

@ -1,9 +1,6 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const dsl = require("../../../../fixtures/tableWidgetDsl.json");
const pages = require("../../../../locators/Pages.json");
const apiPage = require("../../../../locators/ApiEditor.json");
const publishPage = require("../../../../locators/publishWidgetspage.json");
const widgetsPage = require("../../../../locators/Widgets.json");
describe("Test Create Api and Bind to Table widget", function() {
let apiData;
@ -11,7 +8,7 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.addDsl(dsl);
});
it("Test_Add users api and execute api", function() {
it("1. Test_Add users api and execute api", function() {
cy.createAndFillApi(this.data.userApi, "/users");
cy.RunAPI();
cy.get(apiPage.responseBody)
@ -27,7 +24,7 @@ describe("Test Create Api and Bind to Table widget", function() {
});
});
it("Test_Validate the Api data is updated on Table widget", function() {
it("2. Test_Validate the Api data is updated on Table widget", function() {
cy.SearchEntityandOpen("Table1");
//cy.openPropertyPane("tablewidget");
cy.testJsontext("tabledata", "{{Api1.data.users}}");
@ -46,7 +43,7 @@ describe("Test Create Api and Bind to Table widget", function() {
cy.get(commonlocators.backToEditor).click();
});
it("Validate onSearchTextChanged function is called when configured for search text", function() {
it("3. Validate onSearchTextChanged function is called when configured for search text", function() {
cy.SearchEntityandOpen("Table1");
cy.get(".t--widget-tablewidget .t--search-input")
.first()

View File

@ -1,11 +1,8 @@
const widgetsPage = require("../../../../locators/Widgets.json");
const commonlocators = require("../../../../locators/commonlocators.json");
const publish = require("../../../../locators/publishWidgetspage.json");
const dsl = require("../../../../fixtures/tableNewDsl.json");
const pages = require("../../../../locators/Pages.json");
const testdata = require("../../../../fixtures/testdata.json");
const color = "rgb(151, 0, 0)";
const newcolor = "rgb(250, 0, 0)";
describe("Table Widget property pane feature validation", function() {
before(() => {
@ -77,7 +74,7 @@ describe("Table Widget property pane feature validation", function() {
cy.clearPropertyValue(1);
});
it.skip("Table widget column reorder and reload function", function() {
it("Table widget column reorder and reload function", function() {
cy.openPropertyPane("tablewidget");
cy.get(commonlocators.editPropBackButton).click({ force: true });
cy.hideColumn("email");
@ -90,7 +87,7 @@ describe("Table Widget property pane feature validation", function() {
cy.reload();
cy.wait(3000);
cy.readTabledataPublish("2", "2").then((tabDataNew) => {
expect(tabValue).not.to.be.equal("Tobias Funke");
expect(tabDataNew).to.be.equal("Tobias Funke");
});
});
});

View File

@ -8,23 +8,19 @@ describe("Autocomplete using slash command and mustache tests", function() {
it("Slash command and mustache autocomplete validation for button widget", function() {
cy.openPropertyPane("buttonwidget");
cy.testCodeMirror("/");
cy.get(dynamicInputLocators.input)
.first()
.click({ force: true })
.then(() => {
cy.get(dynamicInputLocators.hints).should("exist");
// validates all autocomplete commands on entering / in label field
cy.get(`${dynamicInputLocators.hints} li`)
.eq(1)
.should("have.text", "New Binding");
cy.get(`${dynamicInputLocators.hints} li`)
.eq(2)
.should("have.text", "Insert Snippet");
cy.get(`${dynamicInputLocators.hints} li`)
.last()
.should("have.text", "New Datasource");
});
cy.testCodeMirror("/").then(() => {
cy.get(dynamicInputLocators.hints).should("exist");
// validates all autocomplete commands on entering / in label field
cy.get(`${dynamicInputLocators.hints} li`)
.eq(1)
.should("have.text", "New Binding");
cy.get(`${dynamicInputLocators.hints} li`)
.eq(2)
.should("have.text", "Insert Snippet");
cy.get(`${dynamicInputLocators.hints} li`)
.last()
.should("have.text", "New Datasource");
});
cy.get(dynamicInputLocators.input)
.first()
.click({ force: true })
@ -81,6 +77,7 @@ describe("Autocomplete using slash command and mustache tests", function() {
.should("have.text", "showAlert()");
});
});
it("Slash command and mustache autocomplete validation for textbox widget", function() {
cy.openPropertyPane("textwidget");
cy.testCodeMirror("/");

View File

@ -1516,7 +1516,7 @@ Cypress.Commands.add("testJsontext", (endp, value, paste = true) => {
});
});
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(1000);
cy.wait(2500); //Allowing time for Evaluate value to capture value
});
/**