Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to babel7 #225

Merged
merged 6 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"presets": ["react", "es2015", "stage-2"],
"plugins": ["transform-object-rest-spread"]
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
124 changes: 62 additions & 62 deletions cypress/integration/graph.directed.e2e.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const SANDBOX_URL = Cypress.env('SANDBOX_URL');
const SANDBOX_URL = Cypress.env("SANDBOX_URL");

const LinkPO = require('../page-objects/link.po');
const NodePO = require('../page-objects/node.po');
const SandboxPO = require('../page-objects/sandbox.po');
const LinkPO = require("../page-objects/link.po");
const NodePO = require("../page-objects/node.po");
const SandboxPO = require("../page-objects/sandbox.po");

describe('[rd3g-graph] directed graph tests', function() {
describe("[rd3g-graph-directed]", function() {
beforeEach(function() {
this.sandboxPO = new SandboxPO();
// visit sandbox
Expand All @@ -14,13 +14,13 @@ describe('[rd3g-graph] directed graph tests', function() {
// pause the graph
this.sandboxPO.pauseGraph();
// make graph directed and remove labels
['node.renderLabel', 'directed'].forEach(formKey => {
["node.renderLabel", "directed"].forEach(formKey => {
cy.contains(formKey).scrollIntoView();
this.sandboxPO.getFieldInput(formKey).click();
});
});

describe('check for graph elements', function() {
describe("check for graph elements", function() {
beforeEach(function() {
this.node1PO = new NodePO(1);
this.node2PO = new NodePO(2);
Expand All @@ -32,27 +32,27 @@ describe('[rd3g-graph] directed graph tests', function() {
this.link34PO = new LinkPO(3);
});

it('should properly display elements for directed graph', function() {
it("should properly display elements for directed graph", function() {
// Check if other , links and markers are visible
this.node1PO.getPath().should('be.visible');
this.node2PO.getPath().should('be.visible');
this.node3PO.getPath().should('be.visible');
this.node4PO.getPath().should('be.visible');
this.link12PO.getLine().should('be.visible');
this.node1PO.getPath().should("be.visible");
this.node2PO.getPath().should("be.visible");
this.node3PO.getPath().should("be.visible");
this.node4PO.getPath().should("be.visible");
this.link12PO.getLine().should("be.visible");
this.link12PO.hasMarker();
this.link13PO.getLine().should('be.visible');
this.link13PO.getLine().should("be.visible");
this.link13PO.hasMarker();
this.link14PO.getLine().should('be.visible');
this.link14PO.getLine().should("be.visible");
this.link14PO.hasMarker();
this.link34PO.getLine().should('be.visible');
this.link34PO.getLine().should("be.visible");
this.link34PO.hasMarker();
});
});

describe('when graph is collapsible', function() {
describe("when graph is collapsible", function() {
beforeEach(function() {
cy.contains('collapsible').scrollIntoView();
this.sandboxPO.getFieldInput('collapsible').click();
cy.contains("collapsible").scrollIntoView();
this.sandboxPO.getFieldInput("collapsible").click();

this.node1PO = new NodePO(1);
this.node2PO = new NodePO(2);
Expand All @@ -64,87 +64,87 @@ describe('[rd3g-graph] directed graph tests', function() {
this.link34PO = new LinkPO(3);
});

it('should behave correctly when directed is disabled after collapsed node', function() {
it("should behave correctly when directed is disabled after collapsed node", function() {
const toggledLine = this.link12PO.getLine();

// Check the leaf node & link is present
this.node2PO.getPath().should('be.visible');
toggledLine.should('be.visible');
this.node2PO.getPath().should("be.visible");
toggledLine.should("be.visible");

// Click 'Node 1' in order to collapse the leafs
this.node1PO.getPath().click();

// Check the leaf node & link is no longer visible
this.node2PO.getPath().should('not.be.visible');
toggledLine.should('not.be.visible');
this.node2PO.getPath().should("not.be.visible");
toggledLine.should("not.be.visible");

// Check if other nodes and links are still visible
this.node1PO.getPath().should('be.visible');
this.node3PO.getPath().should('be.visible');
this.node4PO.getPath().should('be.visible');
this.node1PO.getPath().should("be.visible");
this.node3PO.getPath().should("be.visible");
this.node4PO.getPath().should("be.visible");

this.link13PO.getLine().should('be.visible');
this.link14PO.getLine().should('be.visible');
this.link34PO.getLine().should('be.visible');
this.link13PO.getLine().should("be.visible");
this.link14PO.getLine().should("be.visible");
this.link34PO.getLine().should("be.visible");

// Disable "directed"
cy.contains('directed').scrollIntoView();
this.sandboxPO.getFieldInput('directed').click();
cy.contains("directed").scrollIntoView();
this.sandboxPO.getFieldInput("directed").click();

// Check if other nodes and links are still visible
this.node1PO.getPath().should('be.visible');
this.node2PO.getPath().should('be.visible');
this.node3PO.getPath().should('be.visible');
this.node4PO.getPath().should('be.visible');

toggledLine.should('be.visible');
this.link13PO.getLine().should('be.visible');
this.link14PO.getLine().should('be.visible');
this.link34PO.getLine().should('be.visible');
this.node1PO.getPath().should("be.visible");
this.node2PO.getPath().should("be.visible");
this.node3PO.getPath().should("be.visible");
this.node4PO.getPath().should("be.visible");

toggledLine.should("be.visible");
this.link13PO.getLine().should("be.visible");
this.link14PO.getLine().should("be.visible");
this.link34PO.getLine().should("be.visible");
});

it('should behave correctly when collapsible is disabled after collapsible node', function() {
it("should behave correctly when collapsible is disabled after collapsible node", function() {
const toggledLine = this.link12PO.getLine();

// Check the leaf node & link is present
this.node2PO.getPath().should('be.visible');
toggledLine.should('be.visible');
this.node2PO.getPath().should("be.visible");
toggledLine.should("be.visible");

// Click 'Node 1' in order to collapse the leafs
this.node1PO.getPath().click();

// Check the leaf node & link is no longer visible
this.node2PO.getPath().should('not.be.visible');
toggledLine.should('not.be.visible');
this.node2PO.getPath().should("not.be.visible");
toggledLine.should("not.be.visible");

// Check if other nodes and links are still visible
this.node1PO.getPath().should('be.visible');
this.node3PO.getPath().should('be.visible');
this.node4PO.getPath().should('be.visible');
this.node1PO.getPath().should("be.visible");
this.node3PO.getPath().should("be.visible");
this.node4PO.getPath().should("be.visible");

this.link13PO.getLine().should('be.visible');
this.link14PO.getLine().should('be.visible');
this.link34PO.getLine().should('be.visible');
this.link13PO.getLine().should("be.visible");
this.link14PO.getLine().should("be.visible");
this.link34PO.getLine().should("be.visible");

// Disable "collapsible"
cy.contains('collapsible').scrollIntoView();
this.sandboxPO.getFieldInput('collapsible').click();
cy.contains("collapsible").scrollIntoView();
this.sandboxPO.getFieldInput("collapsible").click();

// The previously hidden node should reappear
this.node2PO.getPath().should('be.visible');
toggledLine.should('be.visible');
this.node2PO.getPath().should("be.visible");
toggledLine.should("be.visible");
this.link12PO.hasMarker();

// Check if other nodes and links are still visible
this.node1PO.getPath().should('be.visible');
this.node3PO.getPath().should('be.visible');
this.node4PO.getPath().should('be.visible');
this.node1PO.getPath().should("be.visible");
this.node3PO.getPath().should("be.visible");
this.node4PO.getPath().should("be.visible");

this.link13PO.getLine().should('be.visible');
this.link13PO.getLine().should("be.visible");
this.link13PO.hasMarker();
this.link14PO.getLine().should('be.visible');
this.link14PO.getLine().should("be.visible");
this.link14PO.hasMarker();
this.link34PO.getLine().should('be.visible');
this.link34PO.getLine().should("be.visible");
this.link34PO.hasMarker();
});
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/link.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const LinkPO = require("../page-objects/link.po");
const NodePO = require("../page-objects/node.po");
const SandboxPO = require("../page-objects/sandbox.po");

describe("[rd3g-link] link tests", function() {
describe("[rd3g-link]", function() {
before(function() {
this.sandboxPO = new SandboxPO();
// visit sandbox
Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/node.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SandboxPO = require("../page-objects/sandbox.po");
const defaultNodes = require("./../../sandbox/data/default").nodes;
let nodes = require("./../../sandbox/data/default").nodes.map(({ id }) => id);

describe("[rd3g-node] node tests", function() {
describe("[rd3g-node]", function() {
before(function() {
this.sandboxPO = new SandboxPO();
// visit sandbox
Expand Down
Loading