Skip to content

Commit

Permalink
Merge branch 'fix-deprecated-tests' of https://github.com/plotly/plot…
Browse files Browse the repository at this point in the history
…ly.js into fix-deprecated-tests
  • Loading branch information
emilykl committed Jan 21, 2025
2 parents 7c418a5 + a6dcc4f commit 6cab6be
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions test/jasmine/assets/mouse_event.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ var Lib = require('../../../src/lib');

module.exports = function(type, x, y, opts) {
var visibility = document.visibilityState;
if(visibility && visibility !== 'visible') {
throw new Error('document.visibilityState = "' + visibility + '" - Please make the window visible.');
}
// if(visibility && visibility !== 'visible') {
// throw new Error('document.visibilityState = "' + visibility + '" - Please make the window visible.');
// }

var fullOpts = {
bubbles: true,
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/plot_api_react_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ describe('@noCIdep Plotly.react', function() {
Plotly.newPlot(gd, data, layout)
.then(countPlots)
.then(function() {
layout.title.text = 'XXXXX';
layout.title = { text: 'XXXXX' };
layout.hovermode = 'closest';
data[0].marker = {color: 'rgb(0, 100, 200)'};
return Plotly.react(gd, data, layout);
Expand Down
6 changes: 3 additions & 3 deletions test/jasmine/tests/sankey_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -816,8 +816,8 @@ describe('sankey tests', function() {

var g = d3Select('.hovertext');
var pos = g.node().getBoundingClientRect();
expect(pos.x).toBeCloseTo(279, -1.5, 'it should have correct x position');
expect(pos.y).toBeCloseTo(500, -1.5, 'it should have correct y position');
expect(pos.x).toBeCloseTo(279, -1.5);
expect(pos.y).toBeCloseTo(500, -1.5);
})
.then(done, done.fail);
});
Expand Down Expand Up @@ -1513,7 +1513,7 @@ function assertLabel(content, style) {

function assertMultipleLabels(contentArray, styleArray) {
var g = d3SelectAll('.hovertext');
expect(g.size()).toEqual(contentArray.length, 'wrong number of hoverlabels, expected to find ' + contentArray.length);
expect(g.size()).toEqual(contentArray.length);
g.each(function(el, i) {
_assertLabelGroup(d3Select(this), contentArray[i], styleArray[i]);
});
Expand Down
5 changes: 4 additions & 1 deletion test/jasmine/tests/select_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,10 @@ describe('Test select box and lasso per trace:', function() {

return function(expected) {
var msg = '(call #' + callNumber + ') lasso points ';
var lassoPoints = selectedData.lassoPoints || {};
var lassoPoints = {};
if (selectedData && selectedData.lassoPoints) {
lassoPoints = selectedData.lassoPoints;
}

if(subplot) {
expect(lassoPoints[subplot] || [])
Expand Down

0 comments on commit 6cab6be

Please # to comment.