Skip to content
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
5 changes: 4 additions & 1 deletion test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ func.defaultConfig = {
singleRun: argv.nowatch,

// how long will Karma wait for a message from a browser before disconnecting (30 ms)
browserNoActivityTimeout: 30000,
browserNoActivityTimeout: 60000,

// how long does Karma wait for a browser to reconnect (in ms).
browserDisconnectTimeout: 60000,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
Expand Down
45 changes: 20 additions & 25 deletions test/jasmine/tests/parcoords_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@ function mostOfDrag(x1, y1, x2, y2) {
mouseEvent('mousemove', x2, y2);
}

function purgeGraphDiv(done) {
var gd = d3Select('.js-plotly-plot').node();
if(gd) Plotly.purge(gd);
destroyGraphDiv();

return delay(50)().then(done);
}

function getAvgPixelByChannel(id) {
var canvas = d3Select(id).node();

Expand Down Expand Up @@ -371,12 +363,12 @@ describe('parcoords initialization tests', function() {
describe('parcoords edge cases', function() {
var gd;
beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;

gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

it('@gl Works fine with one panel only', function(done) {
var mockCopy = Lib.extendDeep({}, mock2);
Expand Down Expand Up @@ -644,8 +636,11 @@ describe('parcoords edge cases', function() {

describe('parcoords Lifecycle methods', function() {
var gd;
beforeEach(function() { gd = createGraphDiv(); });
afterEach(purgeGraphDiv);
beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
gd = createGraphDiv();
});
afterEach(destroyGraphDiv);

it('Plotly.deleteTraces with one trace removes the plot', function(done) {
var mockCopy = Lib.extendDeep({}, mock);
Expand Down Expand Up @@ -904,7 +899,7 @@ describe('parcoords basic use', function() {
var gd;

beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;

mockCopy = Lib.extendDeep({}, mock);
mockCopy.data[0].domain = {
Expand All @@ -915,7 +910,7 @@ describe('parcoords basic use', function() {
gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

it('@gl should create three WebGL contexts per graph', function(done) {
Plotly.react(gd, mockCopy)
Expand Down Expand Up @@ -1220,10 +1215,11 @@ describe('parcoords react more attributes', function() {
var gd;

beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

it('@gl should change various axis parameters', function(done) {
Plotly.react(gd, mock3)
Expand Down Expand Up @@ -1365,22 +1361,21 @@ describe('parcoords constraint interactions - without defined axis ranges', func
var snapDelay = 100;
var noSnapDelay = 20;
beforeAll(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

initialSnapDuration = PC.bar.snapDuration;
PC.bar.snapDuration = shortenedSnapDuration;
});

afterAll(function() {
purgeGraphDiv();
destroyGraphDiv();
PC.bar.snapDuration = initialSnapDuration;
});

beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

function getDashArray(index) {
var highlight = document.querySelectorAll('.highlight')[index];
Expand Down Expand Up @@ -1651,22 +1646,21 @@ describe('parcoords constraint interactions - with defined axis ranges', functio
var shortenedSnapDuration = 20;
var noSnapDelay = 20;
beforeAll(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

initialSnapDuration = PC.bar.snapDuration;
PC.bar.snapDuration = shortenedSnapDuration;
});

afterAll(function() {
purgeGraphDiv();
destroyGraphDiv();
PC.bar.snapDuration = initialSnapDuration;
});

beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

it('@gl updates constraints above and below axis ranges', function(done) {
var x = 295;
Expand Down Expand Up @@ -1740,15 +1734,16 @@ describe('parcoords constraint click interactions - with pre-defined constraint
});

afterAll(function() {
purgeGraphDiv();
destroyGraphDiv();
PC.bar.snapDuration = initialSnapDuration;
});

beforeEach(function() {
jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000;
gd = createGraphDiv();
});

afterEach(purgeGraphDiv);
afterEach(destroyGraphDiv);

it('@gl should not drop constraintrange on click', function(done) {
Plotly.react(gd, initialFigure())
Expand Down