-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Feature: Modal Widget(DIP) * Adding cypress tests.
- Loading branch information
Showing
8 changed files
with
196 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
|
||
{ | ||
"dsl": { | ||
"widgetName": "MainContainer", | ||
"backgroundColor": "none", | ||
"rightColumn": 1224, | ||
"snapColumns": 16, | ||
"detachFromLayout": true, | ||
"widgetId": "0", | ||
"topRow": 0, | ||
"bottomRow": 1280, | ||
"containerStyle": "none", | ||
"snapRows": 33, | ||
"parentRowSpace": 1, | ||
"type": "CANVAS_WIDGET", | ||
"canExtend": true, | ||
"version": 10, | ||
"minHeight": 1292, | ||
"parentColumnSpace": 1, | ||
"dynamicBindingPathList": [], | ||
"leftColumn": 0, | ||
"children": [ | ||
{ | ||
"size": "MODAL_SMALL", | ||
"canEscapeKeyClose": true, | ||
"detachFromLayout": true, | ||
"canOutsideClickClose": true, | ||
"shouldScrollContents": true, | ||
"widgetName": "Modal1", | ||
"children": [ | ||
{ | ||
"isVisible": true, | ||
"widgetName": "Canvas1", | ||
"detachFromLayout": true, | ||
"canExtend": true, | ||
"isDisabled": false, | ||
"shouldScrollContents": false, | ||
"children": [ | ||
{ | ||
"isVisible": true, | ||
"widgetName": "Icon1", | ||
"iconName": "cross", | ||
"iconSize": 24, | ||
"color": "#040627", | ||
"type": "ICON_WIDGET", | ||
"isLoading": false, | ||
"leftColumn": 14, | ||
"rightColumn": 16, | ||
"topRow": 0, | ||
"bottomRow": 1, | ||
"parentId": "yyyrxs383y", | ||
"widgetId": "kxdvolusyp", | ||
"onClick": "{{closeModal('Modal1')}}" | ||
}, | ||
{ | ||
"isVisible": true, | ||
"text": "Modal Title", | ||
"textStyle": "HEADING", | ||
"textAlign": "LEFT", | ||
"widgetName": "Text1", | ||
"type": "TEXT_WIDGET", | ||
"isLoading": false, | ||
"leftColumn": 0, | ||
"rightColumn": 10, | ||
"topRow": 0, | ||
"bottomRow": 1, | ||
"parentId": "yyyrxs383y", | ||
"widgetId": "3fugqdtg8g" | ||
}, | ||
{ | ||
"isVisible": true, | ||
"text": "Cancel", | ||
"buttonStyle": "SECONDARY_BUTTON", | ||
"widgetName": "Button1", | ||
"isDisabled": false, | ||
"isDefaultClickDisabled": true, | ||
"type": "BUTTON_WIDGET", | ||
"isLoading": false, | ||
"leftColumn": 9, | ||
"rightColumn": 12, | ||
"topRow": 4, | ||
"bottomRow": 5, | ||
"parentId": "yyyrxs383y", | ||
"widgetId": "6cjfbnjfa4" | ||
}, | ||
{ | ||
"isVisible": true, | ||
"text": "Confirm", | ||
"buttonStyle": "PRIMARY_BUTTON", | ||
"widgetName": "Button2", | ||
"isDisabled": false, | ||
"isDefaultClickDisabled": true, | ||
"type": "BUTTON_WIDGET", | ||
"isLoading": false, | ||
"leftColumn": 12, | ||
"rightColumn": 16, | ||
"topRow": 4, | ||
"bottomRow": 5, | ||
"parentId": "yyyrxs383y", | ||
"widgetId": "3tmnukkm7m" | ||
} | ||
], | ||
"minHeight": 240, | ||
"type": "CANVAS_WIDGET", | ||
"isLoading": false, | ||
"parentColumnSpace": 1, | ||
"parentRowSpace": 1, | ||
"leftColumn": 0, | ||
"rightColumn": 444, | ||
"topRow": 0, | ||
"bottomRow": 240, | ||
"parentId": "287u6pannr", | ||
"widgetId": "yyyrxs383y" | ||
} | ||
], | ||
"type": "MODAL_WIDGET", | ||
"isLoading": false, | ||
"parentColumnSpace": 74, | ||
"parentRowSpace": 40, | ||
"leftColumn": 5, | ||
"rightColumn": 11, | ||
"topRow": 15, | ||
"bottomRow": 21, | ||
"parentId": "0", | ||
"widgetId": "287u6pannr" | ||
} | ||
] | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
app/client/cypress/integration/Smoke_TestSuite/DisplayWidgets/Modal_spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const dsl = require("../../../fixtures/ModalDsl.json"); | ||
const publishPage = require("../../../locators/publishWidgetspage.json"); | ||
const explorer = require("../../../locators/explorerlocators.json"); | ||
|
||
describe("Modal Widget Functionality", function() { | ||
beforeEach(() => { | ||
cy.addDsl(dsl); | ||
}); | ||
|
||
it("Add new Modal", () => { | ||
cy.get(explorer.addWidget).click(); | ||
cy.dragAndDropToCanvas("modalwidget", { x: 300, y: -300 }); | ||
cy.get(".t--modal-widget").should("exist"); | ||
}); | ||
|
||
it("Open Existing Modal from created Widgets list", () => { | ||
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Widgets)").click({ | ||
multiple: true, | ||
}); | ||
cy.get(".bp3-icon-caret-right ~ .t--entity-name:contains(Modal1)").click({ | ||
multiple: true, | ||
}); | ||
cy.get(".t--modal-widget").should("exist"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters