Merge branch 'Add/publish-map-tests' into 'release'
added map widget publish tests See merge request theappsmith/internal-tools-client!665
This commit is contained in:
commit
76b0c65528
|
|
@ -1,13 +1,17 @@
|
|||
const commonlocators = require("../../../locators/commonlocators.json");
|
||||
const viewWidgetsPage = require("../../../locators/ViewWidgets.json");
|
||||
const dsl = require("../../../fixtures/Mapdsl.json");
|
||||
const publishPage = require("../../../locators/publishWidgetspage.json");
|
||||
|
||||
describe("Map Widget Functionality", function() {
|
||||
beforeEach(() => {
|
||||
before(() => {
|
||||
cy.addDsl(dsl);
|
||||
});
|
||||
it("Map Widget Functionality", function() {
|
||||
|
||||
this.beforeEach(() => {
|
||||
cy.openPropertyPane("mapwidget");
|
||||
});
|
||||
it("Map Widget Functionality", function() {
|
||||
/**
|
||||
* @param{Text} Random Text
|
||||
* @param{MapWidget}Mouseover
|
||||
|
|
@ -35,18 +39,88 @@ describe("Map Widget Functionality", function() {
|
|||
cy.get(viewWidgetsPage.zoomLevel)
|
||||
.eq(1)
|
||||
.click({ force: true });
|
||||
|
||||
cy.get(viewWidgetsPage.mapSearch).should("be.visible");
|
||||
cy.get(viewWidgetsPage.mapSearch)
|
||||
.invoke("attr", "placeholder")
|
||||
.should("contain", "Enter location to search");
|
||||
cy.get(viewWidgetsPage.mapSearch)
|
||||
.click({ force: true })
|
||||
.clear()
|
||||
.type(this.data.location2)
|
||||
.type("{enter}");
|
||||
});
|
||||
afterEach(() => {
|
||||
// put your clean up code if any
|
||||
it("Map-Enable Location,Map search and Create Marker Property Validation", function() {
|
||||
/**
|
||||
* Enable the Search Location checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.CheckWidgetProperties(commonlocators.enableSearchLocCheckbox);
|
||||
cy.get(viewWidgetsPage.mapSearch).should("be.visible");
|
||||
cy.get(viewWidgetsPage.mapSearch)
|
||||
.invoke("attr", "placeholder")
|
||||
.should("contain", "Enter location to search");
|
||||
/**
|
||||
* Enable the Pick Location checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.CheckWidgetProperties(commonlocators.enablePickLocCheckbox);
|
||||
cy.get(viewWidgetsPage.pickMyLocation).should("exist");
|
||||
|
||||
/**
|
||||
* Enable the Createnew Marker checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.CheckWidgetProperties(commonlocators.enableCreateMarkerCheckbox);
|
||||
/**
|
||||
* Validation will be added when create marker fun is working fine
|
||||
*/
|
||||
|
||||
cy.PublishtheApp();
|
||||
/**
|
||||
* Publish mode Validation
|
||||
*/
|
||||
cy.get(publishPage.mapSearch).should("be.visible");
|
||||
cy.get(publishPage.mapSearch)
|
||||
.invoke("attr", "placeholder")
|
||||
.should("contain", "Enter location to search");
|
||||
cy.get(publishPage.pickMyLocation).should("exist");
|
||||
cy.get(publishPage.backToEditor).click();
|
||||
});
|
||||
|
||||
it("Map-Disable Location, Mapsearch and Create Marker Property Validation", function() {
|
||||
/**
|
||||
* Disable the Search Location checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.UncheckWidgetProperties(commonlocators.enableSearchLocCheckbox);
|
||||
cy.get(viewWidgetsPage.mapSearch).should("not.be.visible");
|
||||
/**
|
||||
* Disable the Pick Location checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.UncheckWidgetProperties(commonlocators.enablePickLocCheckbox);
|
||||
cy.get(viewWidgetsPage.pickMyLocation).should("not.exist");
|
||||
|
||||
/**
|
||||
* Disable the Createnew Marker checkbox and Validate the same in editor mode
|
||||
*/
|
||||
cy.UncheckWidgetProperties(commonlocators.enableCreateMarkerCheckbox);
|
||||
/**
|
||||
* Validation will be added when create marker fun is working fine
|
||||
*/
|
||||
|
||||
cy.PublishtheApp();
|
||||
/**
|
||||
* Publish mode Validation
|
||||
*/
|
||||
cy.get(publishPage.mapSearch).should("not.be.visible");
|
||||
cy.get(publishPage.pickMyLocation).should("not.exist");
|
||||
cy.get(publishPage.backToEditor).click();
|
||||
});
|
||||
|
||||
it("Map-Check Visible field Validation", function() {
|
||||
//Check the disableed checkbox and Validate
|
||||
cy.CheckWidgetProperties(commonlocators.visibleCheckbox);
|
||||
cy.PublishtheApp();
|
||||
cy.get(publishPage.mapWidget).should("be.visible");
|
||||
cy.get(publishPage.backToEditor).click();
|
||||
});
|
||||
|
||||
it("Map-Unckeck Visible field Validation", function() {
|
||||
//Uncheck the disabled checkbox and validate
|
||||
cy.UncheckWidgetProperties(commonlocators.visibleCheckbox);
|
||||
cy.PublishtheApp();
|
||||
cy.get(publishPage.mapWidget).should("not.be.visible");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@
|
|||
"createMarker": ".t--property-control-createnewmarker [type='checkbox']",
|
||||
"zoomLevel": ".t--property-control-zoomlevel svg",
|
||||
"defaultImage": ".t--property-control-defaultimage .CodeMirror-code",
|
||||
"Chartlabel": ".t--draggable-chartwidget g:nth-child(5) text"
|
||||
"Chartlabel": ".t--draggable-chartwidget g:nth-child(5) text",
|
||||
"pickMyLocation": ".t--draggable-mapwidget div[title='Pick My Location']"
|
||||
}
|
||||
|
|
@ -45,5 +45,8 @@
|
|||
"disabledBtn": " button[disabled='disabled']",
|
||||
"inputField": " .bp3-input",
|
||||
"csvSupport": ".t--property-control-csvexport input",
|
||||
"backToEditor": ".bp3-icon.bp3-icon-chevron-left + span.bp3-button-text"
|
||||
"backToEditor": ".bp3-icon.bp3-icon-chevron-left + span.bp3-button-text",
|
||||
"enableSearchLocCheckbox": ".t--property-control-enablesearchlocation input",
|
||||
"enablePickLocCheckbox": ".t--property-control-enablepicklocation input",
|
||||
"enableCreateMarkerCheckbox": ".t--property-control-createnewmarker input"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,8 @@
|
|||
"chartWidget": ".t--widget-chartwidget",
|
||||
"horizontalTab": ".t--widget-chartwidget g[class='raphael-group-104-axis-Line-group'] rect",
|
||||
"tableWidget": ".t--widget-tablewidget",
|
||||
"tableLength": ".t--widget-tablewidget .e-gridcontent.e-lib.e-droppable"
|
||||
"mapWidget": ".t--widget-mapwidget",
|
||||
"tableLength": ".t--widget-tablewidget .e-gridcontent.e-lib.e-droppable",
|
||||
"mapSearch": ".t--widget-mapwidget input",
|
||||
"pickMyLocation": ".t--widget-mapwidget div[title='Pick My Location']"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user