-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add svg config to graph node level * Add Node logic to decide on type of node to render * Implement svg prop at node level * Add jest.config.js * Update unit tests * Move cypress/common/page-objects into cypress/page-objects * Add sample.svg * Add functional tests for svg node prop * Add unit test for svg at config level * Update README. Fix sandbox favicon * Add sample GIF with custom svg feature
- Loading branch information
1 parent
a4ca82e
commit 7cb98c7
Showing
15 changed files
with
227 additions
and
105 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 was deleted.
Oops, something went wrong.
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,46 @@ | ||
/*global cy*/ | ||
|
||
/** | ||
* Page Object for interacting with sandbox interface. | ||
* @returns {undefined} | ||
*/ | ||
function SandboxPO() { | ||
// whitelist checkbox inputs | ||
this.checkboxes = ['node.renderLabel', 'staticGraph']; | ||
|
||
// actions | ||
this.playGraph = () => cy.get('.container__graph > :nth-child(1) > :nth-child(2)').click(); | ||
this.pauseGraph = () => cy.get('.container__graph > :nth-child(1) > :nth-child(3)').click(); | ||
this.addNode = () => cy.get('.container__graph > :nth-child(1) > :nth-child(5)').click(); | ||
this.removeNode = () => cy.get('.container__graph > :nth-child(1) > :nth-child(6)').click(); | ||
this.clickJsonTreeNodes = () => { | ||
cy | ||
.get('.container__graph-data') | ||
.contains('root') | ||
.scrollIntoView(); | ||
cy | ||
.get('.container__graph-data') | ||
.contains('nodes') | ||
.click(); | ||
}; | ||
// must be collapsed | ||
this.clickJsonTreeFirstNode = () => | ||
cy | ||
.get( | ||
':nth-child(2) > .rejt-not-collapsed > .rejt-not-collapsed-list > :nth-child(1) > .rejt-collapsed > .rejt-collapsed-text' | ||
) | ||
.click(); | ||
this.addJsonTreeFirstNodeProp = () => | ||
cy.get(':nth-child(2) > :nth-child(1) > .rejt-not-collapsed > :nth-child(4) > .rejt-plus-menu').click(); | ||
this.deleteJsonTreeFirstNodeProp = () => | ||
cy.get('.rejt-not-collapsed-list > :nth-child(2) > .rejt-minus-menu').click(); | ||
|
||
// element getters | ||
this.getFieldInput = field => | ||
this.checkboxes.includes(field) | ||
? cy.contains(field).children('input') | ||
: cy.contains(field).siblings('.form-control'); | ||
this.getGraphNumbers = () => cy.get('.container__graph-info'); | ||
} | ||
|
||
module.exports = SandboxPO; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,4 @@ | ||
module.exports = { | ||
verbose: true, | ||
rootDir: 'test' | ||
}; |
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.