react-ions
Version:
An open source set of React components that implement Ambassador's Design and UX patterns.
59 lines (46 loc) • 2.14 kB
JavaScript
;
var _styles = require('../styles.css');
describe('Alerts::Styles', function () {
describe('alertSystemWrapper', function () {
it('should return styles for alerts that do not slide in from the right', function () {
expect((0, _styles.alertSystemWrapper)()).toMatchSnapshot();
});
it('should return styles for alerts that slide in from the right', function () {
expect((0, _styles.alertSystemWrapper)(true)).toMatchSnapshot();
});
});
describe('alertWrapper', function () {
it('should return styles for a success alert', function () {
expect((0, _styles.alertWrapper)('success')).toMatchSnapshot();
});
it('should return styles for a warning alert', function () {
expect((0, _styles.alertWrapper)('warning')).toMatchSnapshot();
});
it('should return styles for an info alert', function () {
expect((0, _styles.alertWrapper)('info')).toMatchSnapshot();
});
it('should return styles for a danger alert', function () {
expect((0, _styles.alertWrapper)('danger')).toMatchSnapshot();
});
it('should return styles for an alert that is closable', function () {
expect((0, _styles.alertWrapper)('success', true)).toMatchSnapshot();
});
it('should return styles for an alert that slides in from the right', function () {
expect((0, _styles.alertWrapper)('success', true, true)).toMatchSnapshot();
});
});
describe('countdownBar', function () {
it('should return countdown bar styles for a success alert', function () {
expect((0, _styles.countdownBar)('success', 1000)).toMatchSnapshot();
});
it('should return countdown bar styles for a warning alert', function () {
expect((0, _styles.countdownBar)('warning', 2000)).toMatchSnapshot();
});
it('should return countdown bar styles for an info alert', function () {
expect((0, _styles.countdownBar)('info', 3000)).toMatchSnapshot();
});
it('should return countdown bar styles for a danger alert', function () {
expect((0, _styles.countdownBar)('danger', 4000)).toMatchSnapshot();
});
});
});