Skip to content

Commit

Permalink
fix: TreeWidgets issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooluloope committed Aug 30, 2022
1 parent 4c94849 commit 9fbf9d3
Show file tree
Hide file tree
Showing 50 changed files with 614 additions and 273 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ Lets build great software together.
[![somangshu](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11089579?v=4&w=50&h=50&mask=circle)](https://github.com/somangshu)
[![ApekshaBhosale](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7846888?v=4&w=50&h=50&mask=circle)](https://github.com/ApekshaBhosale)
[![sidhantgoel](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/3933675?v=4&w=50&h=50&mask=circle)](https://github.com/sidhantgoel)
[![Aishwarya-U-R](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/91450662?v=4&w=50&h=50&mask=circle)](https://github.com/Aishwarya-U-R)
[![Irongade](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/37867493?v=4&w=50&h=50&mask=circle)](https://github.com/Irongade)
[![ankitakinger](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/28362912?v=4&w=50&h=50&mask=circle)](https://github.com/ankitakinger)
[![Aishwarya-U-R](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/91450662?v=4&w=50&h=50&mask=circle)](https://github.com/Aishwarya-U-R)
[![rahulramesha](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/71900764?v=4&w=50&h=50&mask=circle)](https://github.com/rahulramesha)
[![ankitakinger](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/28362912?v=4&w=50&h=50&mask=circle)](https://github.com/ankitakinger)
[![SatishGandham](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/441914?v=4&w=50&h=50&mask=circle)](https://github.com/SatishGandham)
[![yatinappsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/84702014?v=4&w=50&h=50&mask=circle)](https://github.com/yatinappsmith)
[![marks0351](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/35134347?v=4&w=50&h=50&mask=circle)](https://github.com/marks0351)
Expand Down Expand Up @@ -250,6 +250,7 @@ Lets build great software together.
[![ramsaptami](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/79509062?v=4&w=50&h=50&mask=circle)](https://github.com/ramsaptami)
[![AnandiKulkarni](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/80756091?v=4&w=50&h=50&mask=circle)](https://github.com/AnandiKulkarni)
[![momcilo-appsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/81744497?v=4&w=50&h=50&mask=circle)](https://github.com/momcilo-appsmith)
[![vivekverma2312](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/83569920?v=4&w=50&h=50&mask=circle)](https://github.com/vivekverma2312)
[![UXFalcon](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/90375262?v=4&w=50&h=50&mask=circle)](https://github.com/UXFalcon)
[![shwetha-ramesh](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/92293815?v=4&w=50&h=50&mask=circle)](https://github.com/shwetha-ramesh)
[![vasanth-appsmith](https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/92305123?v=4&w=50&h=50&mask=circle)](https://github.com/vasanth-appsmith)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ describe("PgAdmin Clone App", function() {
// authenticating datasource
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();

cy.getPluginFormsAndCreateDatasource();

cy.fillPostgresDatasourceForm();

cy.testSaveDatasource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe("Binding the multiple widgets and validating default data", function()
it("1. Create a postgres datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm();
cy.testSaveDatasource();
cy.get("@createDatasource").then((httpResponse) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ describe("Entity explorer tests related to copy query", function() {
cy.wait(2000);
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm();
cy.testSaveDatasource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ describe("Entity explorer tests related to query and datasource", function() {
cy.wait(2000);
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm();

// checking that conflicting names are not allowed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ describe("Git discard changes:", function() {
// Create new postgres datasource
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();

cy.getPluginFormsAndCreateDatasource();

cy.fillPostgresDatasourceForm();

cy.testSaveDatasource();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
const commonlocators = require("../../../../locators/commonlocators.json");
const explorer = require("../../../../locators/explorerlocators.json");
const themelocator = require("../../../../locators/ThemeLocators.json");
import { ObjectsRegistry } from "../../../../support/Objects/Registry";

let themeBackgroudColor;
let themeFont;
let themeColour;
let propPane = ObjectsRegistry.PropertyPane;

describe("Theme validation usecase for multi-select widget", function() {
it("Drag and drop multi-select widget and validate Default font and list of font validation + Bug 15007", function() {
Expand All @@ -25,7 +23,7 @@ describe("Theme validation usecase for multi-select widget", function() {
"response.body.responseMeta.status",
200,
);
cy.wait(1000);
cy.wait(3000);
cy.get(themelocator.canvas).click({ force: true });
cy.wait(2000);

Expand All @@ -43,7 +41,7 @@ describe("Theme validation usecase for multi-select widget", function() {
"response.body.responseMeta.status",
200,
);
cy.wait(1000);
cy.wait(3000);
cy.contains("Border").click({ force: true });

//Shadow validation
Expand All @@ -61,7 +59,7 @@ describe("Theme validation usecase for multi-select widget", function() {
"response.body.responseMeta.status",
200,
);
cy.wait(1000);
cy.wait(5000);
cy.contains("Shadow").click({ force: true });

//Font
Expand Down Expand Up @@ -95,17 +93,27 @@ describe("Theme validation usecase for multi-select widget", function() {
.text();
});
});
cy.contains("Font").click({ force: true });
//cy.contains("Font").click({ force: true });

//Color
cy.wait(1000);
propPane.ChangeColor("purple", "Primary");
cy.wait(3000);
cy.get(themelocator.inputColor)
.clear()
.wait(200)
.click()
.type("purple");
cy.get(themelocator.inputColor).should("have.value", "purple");
cy.wait(1000);

propPane.ChangeColor("brown", "Background");
cy.get(themelocator.color)
.eq(1)
.click({ force: true });
cy.wait(2000);
cy.get(themelocator.inputColor)
.clear()
.wait(200)
.click()
.type("brown");
cy.get(themelocator.inputColor).should("have.value", "brown");
cy.wait(1000);
cy.wait(2000);
cy.contains("Color").click({ force: true });
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
WIDGET,
PROPERTY_SELECTOR,
getWidgetSelector,
getWidgetInputSelector,
} from "../../../../locators/WidgetLocators";
import { ObjectsRegistry } from "../../../../support/Objects/Registry";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,4 @@ describe("Currency widget - ", () => {
cy.get(themelocators.popover).should("not.exist");
});
});

it("Currency change dropdown should not close unexpectedly", function() {
cy.openPropertyPane(widgetName);

// Select the Currency dropdown option from property pane
// and enter a value that has space and returns 0 results
cy.get(".t--property-control-currency").click();
cy.get(".t--search-input input").type("gdp gdp");

// assert that the dropdown is still option
cy.get(".t--search-input input").should("be.visible");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,4 @@ describe("Phone input widget - ", () => {
// Check if isDirty is set to false
cy.get(".t--widget-textwidget").should("contain", "false");
});

it("Currency change dropdown should not close unexpectedly", function() {
cy.openPropertyPane(widgetName);

// Select the Currency dropdown option from property pane
// and enter a value that has space and returns 0 results
cy.get(".t--property-control-defaultcountrycode").click();
cy.get(".t--search-input input").type("AFDB (+93)");

// assert that the dropdown is still option
cy.get(".t--search-input input").should("be.visible");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ describe("Verify various Table_Filter combinations", function() {

it("30. Import TableFilter application & verify all filters for same FirstName (one word column) + Bug 13334", () => {
deployMode.NavigateBacktoEditor();
table.WaitUntilTableLoad();
homePage.NavigateToHome();
homePage.ImportApp("Table/TableFilterImportApp.json");
homePage.AssertImportToast();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ describe("Arango datasource test cases", function() {
});

it("1. Create, test, save then delete a Arango datasource", function() {
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("ArangoDB");
agHelper.RenameWithInPane("ArangoWithnoTrailing", false);
cy.NavigateToDatasourceEditor();
cy.get(datasource.ArangoDB).click();
cy.getPluginFormsAndCreateDatasource();
cy.renameDatasource("ArangoWithnoTrailing");
cy.fillArangoDBDatasourceForm();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand All @@ -29,9 +30,10 @@ describe("Arango datasource test cases", function() {
});

it("2. Create with trailing white spaces in host address and database name, test, save then delete a Arango datasource", function() {
dataSources.NavigateToDSCreateNew();
dataSources.CreatePlugIn("ArangoDB");
agHelper.RenameWithInPane("ArangoWithTrailing", false);
cy.NavigateToDatasourceEditor();
cy.get(datasource.ArangoDB).click();
cy.getPluginFormsAndCreateDatasource();
cy.renameDatasource("ArangoWithTrailing");
cy.fillArangoDBDatasourceForm(true);
cy.intercept("POST", "/api/v1/datasources/test", {
fixture: "testAction.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("Datasource form related tests", function() {

it("1. Check whether the delete button has the right color", function() {
cy.NavigateToAPI_Panel();
cy.CreateAPI(); //Not giving name to enable for cypress re-attempt
cy.CreateAPI("Testapi");
cy.enterDatasourceAndPath(testdata.baseUrl, testdata.methods);

cy.get(".t--store-as-datasource")
Expand All @@ -31,11 +31,11 @@ describe("Datasource form related tests", function() {
it("3. Check if saved api as a datasource does not fail on cloning", function() {
cy.NavigateToAPI_Panel();
cy.get(".t--entity-name")
.contains("Api")
.contains("Testapi")
.trigger("mouseover");
cy.hoverAndClickParticularIndex(1);
cy.get('.single-select:contains("Copy to page")').click();
cy.get('.single-select:contains("Page1")').click({ force: true });
cy.validateToastMessage("action copied to page Page1 successfully");
cy.validateToastMessage("Testapi action copied to page Page1 successfully");
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ describe("Create, test, save then delete a mongo datasource", function() {
it("Create, test, save then delete a mongo datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MongoDB).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMongoDatasourceForm();
cy.testSaveDeleteDatasource();
});

it("Create with trailing white spaces in host address and database name, test, save then delete a mongo datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MongoDB).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMongoDatasourceForm(true); //fills form with trailing white spaces
cy.testSaveDeleteDatasource();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ describe("MsSQL datasource test cases", function() {
it("1. Create, test, save then delete a MsSQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MsSQL).click();
cy.getPluginFormsAndCreateDatasource();

cy.fillMsSQLDatasourceForm();
cy.generateUUID().then((UUID) => {
datasourceName = `MsSQL MOCKDS ${UUID}`;
Expand All @@ -29,6 +31,7 @@ describe("MsSQL datasource test cases", function() {
it("2. Create with trailing white spaces in host address and database name, test, save then delete a MsSQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MsSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMsSQLDatasourceForm(true);
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ describe("MySQL datasource test cases", function() {
it("1. Create, test, save then delete a MySQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MySQL).click();
cy.getPluginFormsAndCreateDatasource();

cy.fillMySQLDatasourceForm();
cy.generateUUID().then((UUID) => {
datasourceName = `MySQL MOCKDS ${UUID}`;
Expand All @@ -30,6 +32,7 @@ describe("MySQL datasource test cases", function() {
it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MySQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMySQLDatasourceForm(true);
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ describe("MySQL noise test", function() {
.type(datasourceName, { force: true })
.should("have.value", datasourceName)
.blur();
cy.getPluginFormsAndCreateDatasource();
cy.fillMySQLDatasourceForm();
cy.testSaveDatasource();
cy.NavigateToActiveDSQueryPane(datasourceName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe("MySQL datasource test cases", function() {
it("1. Create, test, save then delete a MySQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MySQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMySQLDatasourceForm();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand All @@ -22,6 +23,7 @@ describe("MySQL datasource test cases", function() {
it("2. Create with trailing white spaces in host address and database name, test, save then delete a MySQL datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.MySQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillMySQLDatasourceForm(true);
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe("Postgres datasource test cases", function() {
it("1. Create, test, save then delete a postgres datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm();
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand All @@ -22,6 +23,7 @@ describe("Postgres datasource test cases", function() {
it("2. Create with trailing white spaces in host address and database name, test, save then delete a postgres datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm(true);
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ describe("Redshift datasource test cases", function() {
it("1. Create, test, save then delete a Redshift datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.Redshift).click();
cy.getPluginFormsAndCreateDatasource();

cy.fillRedshiftDatasourceForm();
cy.generateUUID().then((UUID) => {
datasourceName = `Redshift MOCKDS ${UUID}`;
Expand All @@ -30,6 +32,7 @@ describe("Redshift datasource test cases", function() {
it("2. Create with trailing white spaces in host address and database name, test, save then delete a Redshift datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.Redshift).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillRedshiftDatasourceForm(true);
cy.get("@createDatasource").then((httpResponse) => {
datasourceName = httpResponse.response.body.data.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe("SMTP datasource test cases using ted", function() {
.should("have.value", SMTPDatasourceName)
.blur();

cy.getPluginFormsAndCreateDatasource();
cy.fillSMTPDatasourceForm();
cy.testSaveDatasource();
cy.NavigateToActiveDSQueryPane(SMTPDatasourceName);
Expand Down Expand Up @@ -110,7 +111,7 @@ describe("SMTP datasource test cases using ted", function() {
cy.get(".bp3-spinner").should("have.length", 1);
//eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(500);
cy.get("button").contains("1 files selected");
cy.get("button").contains("1 files selected");
cy.xpath(
"//span[text()='Run query' and @class='bp3-button-text']",
).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ describe("Validate MySQL Generate CRUD with JSON Form", () => {

//Validating loaded table
agHelper.AssertElementExist(dataSources._selectedRow);
table.ReadTableRowColumnData(0, 0, 4000).then(($cellData) => {
table.ReadTableRowColumnData(0, 0, 2500).then(($cellData) => {
expect($cellData).to.eq(col1Text);
});
table.ReadTableRowColumnData(0, 1, 200).then(($cellData) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,7 @@ describe("Validate Postgres Generate CRUD with JSON Form", () => {
) {
agHelper.ClickButton("Update"); //Update does not work, Bug 14063
agHelper.AssertElementAbsence(locator._toastMsg); //Validating fix for Bug 14063 - for common table columns
//agHelper.Sleep(2000); //for update to reflect!
agHelper.WaitUntilEleDisappear(locator._spinner);
agHelper.Sleep(2000); //for update to reflect!
agHelper.ValidateNetworkStatus("@postExecute", 200);
agHelper.ValidateNetworkStatus("@postExecute", 200);
table.AssertSelectedRow(rowIndex); //Validate Primary key column selection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ describe("API Panel Test Functionality", function() {
it("1. Create a postgres datasource", function() {
cy.NavigateToDatasourceEditor();
cy.get(datasource.PostgreSQL).click();
cy.getPluginFormsAndCreateDatasource();
cy.fillPostgresDatasourceForm();
cy.testSaveDatasource();
cy.get("@createDatasource").then((httpResponse) => {
Expand Down
Loading

0 comments on commit 9fbf9d3

Please sign in to comment.