Skip to content

Commit 3a58812

Browse files
committed
Correct fill && correct tests
1 parent 3beddde commit 3a58812

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/fields/TraceSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class TraceSelector extends Component {
8686
updateContainer({
8787
type: 'scatter',
8888
mode: fullContainer.mode,
89-
fill: 'none',
89+
fill: fullContainer.fill || container.fill,
9090
});
9191
}
9292
this.fullValue = plotlyTraceToCustomTrace(container);

src/components/fields/__tests__/TraceSelector-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('TraceSelector', () => {
8181
const innerDropdown = wrapper.find(Dropdown);
8282
innerDropdown.prop('onChange')('line');
8383

84-
const payload = onUpdateTraces.mock.calls[1][0];
84+
const payload = onUpdateTraces.mock.calls[0][0];
8585
expect(payload.update).toEqual({
8686
fill: 'none',
8787
mode: 'lines',
@@ -107,7 +107,7 @@ describe('TraceSelector', () => {
107107
const innerDropdown = wrapper.find(Dropdown);
108108
innerDropdown.prop('onChange')('area');
109109

110-
const payload = onUpdateTraces.mock.calls[1][0];
110+
const payload = onUpdateTraces.mock.calls[0][0];
111111
expect(payload.update).toEqual({fill: 'tozeroy', type: 'scatter'});
112112
});
113113
});

0 commit comments

Comments
 (0)