-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into UI-Text-Fix
- Loading branch information
Showing
77 changed files
with
2,321 additions
and
299 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
[ | ||
{ | ||
"id": "node-red-tab-text", | ||
"type": "tab", | ||
"label": "UI Text", | ||
"disabled": false, | ||
"info": "", | ||
"env": [] | ||
}, | ||
{ | ||
"id": "dashboard-ui-base", | ||
"type": "ui-base", | ||
"name": "UI Name", | ||
"path": "/dashboard", | ||
"includeClientData": true, | ||
"acceptsClientConfig": [ | ||
"ui-notification", | ||
"ui-control" | ||
] | ||
}, | ||
{ | ||
"id": "dashboard-ui-group", | ||
"type": "ui-group", | ||
"name": "Group 1", | ||
"page": "dashboard-ui-page-1", | ||
"width": "6", | ||
"height": "1", | ||
"order": 1, | ||
"showTitle": true, | ||
"className": "", | ||
"visible": "true", | ||
"disabled": "false", | ||
"groupType": "default" | ||
}, | ||
{ | ||
"id": "dashboard-ui-page-1", | ||
"type": "ui-page", | ||
"name": "Page 1", | ||
"ui": "dashboard-ui-base", | ||
"path": "/page1", | ||
"icon": "", | ||
"layout": "grid", | ||
"theme": "dashboard-ui-theme", | ||
"order": 1, | ||
"className": "", | ||
"visible": "true", | ||
"disabled": false | ||
}, | ||
{ | ||
"id": "dashboard-ui-theme", | ||
"type": "ui-theme", | ||
"name": "Theme Name", | ||
"colors": { | ||
"surface": "#ffffff", | ||
"primary": "#0094ce", | ||
"bgPage": "#eeeeee", | ||
"groupBg": "#ffffff", | ||
"groupOutline": "#cccccc" | ||
} | ||
}, | ||
{ | ||
"id": "dashboard-ui-spacer", | ||
"type": "ui-spacer", | ||
"group": "dashboard-ui-group", | ||
"name": "spacer", | ||
"order": 1, | ||
"width": "3", | ||
"height": "3", | ||
"className": "class1 class2" | ||
}, | ||
{ | ||
"id": "2a04f859315b5a00", | ||
"type": "ui-button", | ||
"z": "node-red-tab-text", | ||
"group": "dashboard-ui-group", | ||
"name": "", | ||
"label": "button", | ||
"order": 2, | ||
"width": "3", | ||
"height": "3", | ||
"emulateClick": false, | ||
"tooltip": "", | ||
"color": "", | ||
"bgcolor": "", | ||
"className": "", | ||
"icon": "", | ||
"iconPosition": "left", | ||
"payload": "", | ||
"payloadType": "str", | ||
"topic": "topic", | ||
"topicType": "msg", | ||
"buttonColor": "", | ||
"textColor": "", | ||
"iconColor": "", | ||
"enableClick": true, | ||
"enablePointerdown": false, | ||
"pointerdownPayload": "", | ||
"pointerdownPayloadType": "str", | ||
"enablePointerup": false, | ||
"pointerupPayload": "", | ||
"pointerupPayloadType": "str", | ||
"x": 110, | ||
"y": 100, | ||
"wires": [ | ||
[] | ||
] | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
describe('Node-RED Dashboard 2.0 - Spacer', () => { | ||
beforeEach(() => { | ||
cy.deployFixture('dashboard-spacer') | ||
cy.visit('/dashboard/page1') | ||
}) | ||
|
||
it('Is rendered', () => { | ||
// should have one child | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').children().should('have.length', 1) | ||
// and that child should be a div | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').children().eq(0).should('have.prop', 'tagName', 'DIV') | ||
|
||
// inner div should have no content and no children | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').children().eq(0).should('not.have.text') | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer > div').children().should('not.exist') | ||
}) | ||
|
||
it('Has correct class names and styling', () => { | ||
// default classes are applied to main widget | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').should('have.class', 'nrdb-ui-widget') | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').should('have.class', 'nrdb-ui-spacer') | ||
// custom classes .class1 and .class2 are applied to main widget div | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').should('have.class', 'class1') | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').should('have.class', 'class2') | ||
// check widget styling | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer').children().eq(0).should('have.css', 'grid-row-end', 'span 3') | ||
// check inner div classes | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer > div').should('have.class', 'nrdb-spacer') | ||
cy.get('#nrdb-ui-widget-dashboard-ui-spacer > div').should('have.class', 'v-spacer') // vuetify class | ||
}) | ||
}) |
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
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
Oops, something went wrong.