Skip to content

Commit

Permalink
Fix #2602 loader spinner on file import
Browse files Browse the repository at this point in the history
  • Loading branch information
amusso01 authored and offtherailz committed Mar 14, 2018
1 parent 5fe67f5 commit 6d3cab6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion web/client/components/shapefile/SelectShape.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SelectShape extends React.Component {

render() {
return (
this.props.loading ? <div className="btn btn-info" style={{"float": "center"}}> <Spinner spinnerName="circle" overrideSpinnerClassName="spinner"/></div> :
this.props.loading ? <div className="btn btn-info" style={{"float": "center"}}> <Spinner spinnerName="circle" noFadeIn overrideSpinnerClassName="spinner"/></div> :
<Dropzone rejectClassName="alert-danger" className="alert alert-info" onDrop={this.checkfile}>
<div className="dropzone-content" style={{textAlign: "center"}}>{this.props.text}</div>
</Dropzone>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,12 @@ describe("Test the select shapefile component", () => {
}];
TestUtils.Simulate.drop(content, { dataTransfer: { files } });
});

it('upload local vector, show loader', () => {
const cmp = ReactDOM.render(<SelectShape loading />, document.getElementById("container"));
expect(cmp).toExist();
const spinner = document.querySelector('.spinner');
/* check class sk-fade-in not present to ensure loader is not fade and correctly shown */
expect(spinner.className.indexOf('sk-fade-in')).toBe(-1);
});
});

0 comments on commit 6d3cab6

Please sign in to comment.