-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
karma/jamsine plot interaction tests #61
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
Changes from all commits
b00966c
3b0e6ab
1dc2a01
a466517
8f28b80
6add1a4
1970855
24caa5e
35c59c9
7deeec7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
module.exports = function createGraphDiv() { | ||
var gd = document.createElement('div'); | ||
gd.id = 'graph'; | ||
document.body.appendChild(gd); | ||
return gd; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
'use strict'; | ||
|
||
module.exports = function destroyGraphDiv() { | ||
var gd = document.getElementById('graph'); | ||
document.body.removeChild(gd); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
var d3 = require('d3'); | ||
|
||
var Plotly = require('@src/index'); | ||
|
||
var createGraphDiv = require('../assets/create_graph_div'); | ||
var destroyGraphDiv = require('../assets/destroy_graph_div'); | ||
|
||
/* | ||
* WebGL interaction test cases fail on the CircleCI | ||
* most likely due to a WebGL/driver issue | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah gotcha, perhaps we can put this comment in the karma.ciconf.js file There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this the same issue with the bunny-hill test? If it is can we link all these to an issue? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
No. We can't have WebGL karma tests at the moment because karma fails to render I'm not sure what's special about the bunny hull test case that makes output random pixel in 1 out of 10 runs. Maybe increasing the delay on snapshot can fix it. |
||
* | ||
*/ | ||
|
||
|
||
describe('Test plot structure', function () { | ||
'use strict'; | ||
|
||
afterEach(destroyGraphDiv); | ||
|
||
describe('gl3d plots', function() { | ||
var mock = require('@mocks/gl3d_marker-arrays.json'); | ||
|
||
beforeEach(function(done) { | ||
Plotly.plot(createGraphDiv(), mock.data, mock.layout).then(done); | ||
}); | ||
|
||
it('has one *canvas* node', function() { | ||
var nodes = d3.selectAll('canvas'); | ||
expect(nodes[0].length).toEqual(1); | ||
}); | ||
}); | ||
|
||
describe('gl2d plots', function() { | ||
var mock = require('@mocks/gl2d_10.json'); | ||
|
||
beforeEach(function(done) { | ||
Plotly.plot(createGraphDiv(), mock.data, mock.layout).then(done); | ||
}); | ||
|
||
it('has one *canvas* node', function() { | ||
var nodes = d3.selectAll('canvas'); | ||
expect(nodes[0].length).toEqual(1); | ||
}); | ||
}); | ||
|
||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this particular 3d mock fails in ~ 1 out of 10 attempts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make an issue for this and embed the issue number in this comment?