Skip to content

Commit

Permalink
Test passing--grabbing data from dalliance.org for now
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Mar 19, 2015
1 parent f3fee97 commit e7be169
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions test/components-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/* @flow */
'use strict';

var chai = require('chai');
var expect = chai.expect;

var Q = require('q');
var _ = require('underscore');

var React = require('react/addons'),
TwoBit = require('../src/TwoBit'),
Expand Down Expand Up @@ -40,19 +40,12 @@ function waitFor(predFn, timeoutMs) {
}


/**
* Apply a CSS selector to a React tree. Returns an array of DOM nodes.
*/
function findInComponent(selector, component) {
return _.toArray(component.getDOMNode().querySelectorAll(selector));
}


describe('Root component', function() {
var genome = new TwoBit('/hg19.2bit');
// var genome = new TwoBit('/test/data/test.2bit');
var genome = new TwoBit('http://www.biodalliance.org/datasets/hg19.2bit');
var dataSource = createTwoBitDataSource(genome);

var ensembl = new BigBed('/ensGene.bb');
var ensembl = new BigBed('/test/data/ensembl.chr17.bb');
var ensemblDataSource = createBigBedDataSource(ensembl);

var testDiv = document.getElementById('testdiv');
Expand All @@ -68,8 +61,8 @@ describe('Root component', function() {
div.setAttribute('style', 'width: 800px; height: 200px;');
testDiv.appendChild(div);

var root = React.render(<Root referenceSource={dataSource}
geneSource={ensemblDataSource} />, div);
React.render(<Root referenceSource={dataSource}
geneSource={ensemblDataSource} />, div);

var ready = (() =>
div.querySelectorAll('.basepair').length > 0 &&
Expand Down

0 comments on commit e7be169

Please sign in to comment.