Skip to content

Commit dc40796

Browse files
committed
Fix failing integration tests
1 parent acf6e6e commit dc40796

File tree

17 files changed

+2967
-79
lines changed

17 files changed

+2967
-79
lines changed

dash/dash-renderer/src/components/error/menu/DebugMenu.react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ const MenuContent = ({
4040
? 'dash-debug-menu__button--selected'
4141
: null) + ' dash-debug-menu__button'
4242
}
43+
id='dash-debug-menu__errors-button'
4344
>
4445
<ErrorIcon className='dash-debug-menu__icon' />
4546
Errors
@@ -56,6 +57,7 @@ const MenuContent = ({
5657
? 'dash-debug-menu__button--selected'
5758
: '') + ' dash-debug-menu__button'
5859
}
60+
id='dash-debug-menu__callback-graph-button'
5961
>
6062
<GraphIcon className='dash-debug-menu__icon' />
6163
Callbacks

tests/integration/clientside/assets/clientside.js

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
if (!window.dash_clientside) {
2-
window.dash_clientside = {}
2+
window.dash_clientside = {};
33
}
44
window.dash_clientside.clientside = {
5-
6-
add: function(a, b) {
5+
add: function (a, b) {
76
return window.R.add(a, b);
87
},
98

@@ -17,7 +16,7 @@ window.dash_clientside.clientside = {
1716

1817
add1_break_at_11: function (value) {
1918
if (parseInt(value, 10) === 11) {
20-
throw new Error('Unexpected error');
19+
throw new Error("Unexpected error");
2120
}
2221
return parseInt(value, 10) + 1;
2322
},
@@ -36,71 +35,71 @@ window.dash_clientside.clientside = {
3635
return [parseInt(value2, 10) + 1, parseInt(value3, 10) + 1];
3736
},
3837

39-
add_to_four_outputs: function(value) {
38+
add_to_four_outputs: function (value) {
4039
return [
4140
parseInt(value) + 1,
4241
parseInt(value) + 2,
4342
parseInt(value) + 3,
44-
parseInt(value) + 4
45-
]
43+
parseInt(value) + 4,
44+
];
4645
},
4746

48-
side_effect_and_return_a_promise: function(value) {
49-
return new Promise(function(resolve, reject) {
50-
setTimeout(function() {
51-
setTimeout(function() {
52-
document.getElementById('side-effect').innerText = (
53-
'side effect'
54-
);
47+
side_effect_and_return_a_promise: function (value) {
48+
return new Promise(function (resolve, reject) {
49+
setTimeout(function () {
50+
setTimeout(function () {
51+
document.getElementById("side-effect").innerText =
52+
"side effect";
5553
}, 100);
56-
resolve('foo');
54+
resolve("foo");
5755
}, 1);
5856
});
5957
},
6058

61-
triggered_to_str: function(n_clicks0, n_clicks1) {
59+
triggered_to_str: function (n_clicks0, n_clicks1) {
6260
const triggered = dash_clientside.callback_context.triggered;
63-
return triggered.map(t => `${t.prop_id} = ${t.value}`).join(', ');
61+
return triggered.map((t) => `${t.prop_id} = ${t.value}`).join(", ");
6462
},
6563

66-
triggered_id_to_str: function(n_clicks0, n_clicks1) {
64+
triggered_id_to_str: function (n_clicks0, n_clicks1) {
6765
const triggered = dash_clientside.callback_context.triggered_id;
68-
const triggered_id = typeof triggered === "string" ? triggered : triggered.btn1
69-
return triggered_id
66+
const triggered_id =
67+
typeof triggered === "string" ? triggered : triggered.btn1;
68+
return triggered_id;
7069
},
7170

72-
inputs_to_str: function(n_clicks0, n_clicks1) {
71+
inputs_to_str: function (n_clicks0, n_clicks1) {
7372
const inputs = dash_clientside.callback_context.inputs;
7473
const keys = Object.keys(inputs);
75-
return keys.map(k => `${k} = ${inputs[k]}`).join(', ');
74+
return keys.map((k) => `${k} = ${inputs[k]}`).join(", ");
7675
},
7776

78-
inputs_list_to_str: function(n_clicks0, n_clicks1) {
77+
inputs_list_to_str: function (n_clicks0, n_clicks1) {
7978
return JSON.stringify(dash_clientside.callback_context.inputs_list);
8079
},
8180

82-
states_to_str: function(val0, val1, st0, st1) {
81+
states_to_str: function (val0, val1, st0, st1) {
8382
const states = dash_clientside.callback_context.states;
8483
const keys = Object.keys(states);
85-
return keys.map(k => `${k} = ${states[k]}`).join(', ');
84+
return keys.map((k) => `${k} = ${states[k]}`).join(", ");
8685
},
8786

88-
states_list_to_str: function(val0, val1, st0, st1) {
87+
states_list_to_str: function (val0, val1, st0, st1) {
8988
return JSON.stringify(dash_clientside.callback_context.states_list);
9089
},
9190

92-
input_output_callback: function(inputValue) {
91+
input_output_callback: function (inputValue) {
9392
const triggered = dash_clientside.callback_context.triggered;
94-
if (triggered.length==0){
93+
if (triggered.length == 0) {
9594
return inputValue;
9695
} else {
9796
return inputValue + 1;
9897
}
9998
},
10099

101-
input_output_follower: function(inputValue) {
100+
input_output_follower: function (inputValue) {
102101
if (!window.callCount) {
103-
window.callCount = 0
102+
window.callCount = 0;
104103
}
105104
window.callCount += 1;
106105
return inputValue.toString();

tests/integration/clientside/assets/ramda-0.25.0.min.js

Lines changed: 2884 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
window.tested = ['load_first'];
2-
var ramdaTest = document.getElementById('ramda-test');
1+
window.tested = ["load_first"];
2+
var ramdaTest = document.getElementById("ramda-test");
33
if (ramdaTest) {
4-
ramdaTest.innerHTML = R.join(' ', R.concat(['hello'], ['world']).map(function(x) {
5-
return _.capitalize(x);
6-
}));
4+
ramdaTest.innerHTML = R.join(
5+
" ",
6+
R.concat(["hello"], ["world"]).map(function (x) {
7+
return _.capitalize(x);
8+
}),
9+
);
710
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested = 'IGNORED'; // Break the chain.
1+
window.tested = "IGNORED"; // Break the chain.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested.push('load_after');
1+
window.tested.push("load_after");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested.push('load_after1');
1+
window.tested.push("load_after1");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested.push('load_after10');
1+
window.tested.push("load_after10");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested.push('load_after11');
1+
window.tested.push("load_after11");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
window.tested.push('load_after2');
1+
window.tested.push("load_after2");

0 commit comments

Comments
 (0)