-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alanna Scott
committed
Jun 15, 2017
1 parent
fb6ef26
commit f0a8ea6
Showing
1 changed file
with
21 additions
and
1 deletion.
There are no files selected for viewing
22 changes: 21 additions & 1 deletion
22
superset/assets/spec/javascripts/sqllab/AlertsWrapper_spec.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
import React from 'react'; | ||
import { describe, it } from 'mocha'; | ||
import { expect } from 'chai'; | ||
|
||
import { shallow } from 'enzyme'; | ||
import AlertContainer from 'react-alert'; | ||
import AlertsWrapper from '../../../javascripts/components/AlertsWrapper'; | ||
|
||
describe('AlertsWrapper', () => { | ||
let wrapper; | ||
|
||
beforeEach(() => { | ||
wrapper = shallow(<AlertsWrapper />); | ||
}); | ||
|
||
it('is valid', () => { | ||
expect(React.isValidElement(<AlertsWrapper />)).to.equal(true); | ||
}); | ||
|
||
it('renders AlertContainer', () => { | ||
expect(wrapper.find(AlertContainer)).to.have.length(1); | ||
}); | ||
|
||
it('expects AlertContainer to have correct props', () => { | ||
const alertContainerProps = wrapper.find(AlertContainer).props(); | ||
expect(alertContainerProps.offset).to.be.equal(14); | ||
expect(alertContainerProps.position).to.be.equal('top right'); | ||
expect(alertContainerProps.theme).to.be.equal('dark'); | ||
expect(alertContainerProps.time).to.be.equal(5000); | ||
expect(alertContainerProps.transition).to.be.equal('fade'); | ||
}); | ||
}); |