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

Simplified test folder file structure merging "component" and "snapshot" #155

Merged
merged 1 commit into from Dec 19, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,6 +1,6 @@
import * as collapseHelper from '../../../src/components/graph/collapse.helper';
import * as graphData from '../../../sandbox/data/default';
import { initializeGraphState } from '../../../src/components/graph/graph.helper';
import * as collapseHelper from '../../src/components/graph/collapse.helper';
import * as graphData from '../../sandbox/data/default';
import { initializeGraphState } from '../../src/components/graph/graph.helper';

describe('Collapse Helper', () => {
let directedState;
Expand Down
@@ -1,9 +1,9 @@
import * as graphHelper from '../../../src/components/graph/graph.helper';
import * as graphHelper from '../../src/components/graph/graph.helper';

import config from '../../../src/components/graph/graph.config';
import config from '../../src/components/graph/graph.config';

import utils from '../../../src/utils';
import * as linkHelper from '../../../src/components/link/link.helper';
import utils from '../../src/utils';
import * as linkHelper from '../../src/components/link/link.helper';

jest.mock('d3-force');
import {
Expand Down
File renamed without changes.
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Graph from '../../../src/components/graph/Graph';
import Graph from '../../src/components/graph/Graph';
import graphMock from './graph.mock.js';

describe('Snapshot - Graph Component', () => {
Expand Down Expand Up @@ -34,9 +34,13 @@ describe('Snapshot - Graph Component', () => {

beforeEach(() => {
const config = { ...that.config, collapsible: true };
const data = {
nodes: [...graphMock.nodes, { id: 'Simba', x: '290', y: '290' }],
links: graphMock.links
};

that.graph = renderer.create(
<Graph id="graphId" data={graphMock} config={config} onMouseOverNode={that.mouseOverNodeCallback} />
<Graph id="graphId" data={data} config={config} onMouseOverNode={that.mouseOverNodeCallback} />
);

that.tree = that.graph.toJSON();
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Graph from '../../../src/components/graph/Graph';
import Graph from '../../src/components/graph/Graph';
import graphMock from './graph.mock.js';

describe('Graph Component', () => {
Expand Down
@@ -1,4 +1,4 @@
import * as linkHelper from '../../../src/components/link/link.helper';
import * as linkHelper from '../../src/components/link/link.helper';

describe('Link Helper', () => {
describe('#buildLinkPathDefinition', () => {
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Link from '../../../src/components/link/Link';
import Link from '../../src/components/link/Link';

describe('Snapshot - Link Component', () => {
let that = {};
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Link from '../../../src/components/link/Link';
import Link from '../../src/components/link/Link';

describe('Link Component', () => {
let that = {};
Expand Down
@@ -1,4 +1,4 @@
import * as markerHelper from '../../../src/components/marker/marker.helper';
import * as markerHelper from '../../src/components/marker/marker.helper';

describe('Marker Helper', () => {
describe('#getMarkerId', () => {
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Marker from '../../../src/components/marker/Marker';
import Marker from '../../src/components/marker/Marker';

describe('Snapshot - Marker Component', () => {
let that = {};
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Node from '../../../src/components/node/Node';
import Node from '../../src/components/node/Node';

describe('Snapshot - Node Component', () => {
let that = {};
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';

import Node from '../../../src/components/node/Node';
import Node from '../../src/components/node/Node';

describe('Node Component', () => {
let that = {};
Expand Down
251 changes: 0 additions & 251 deletions test/snapshot/graph/graph.mock.js

This file was deleted.

File renamed without changes.