mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-09-19 19:02:48 +02:00
21 lines
707 B
JavaScript
21 lines
707 B
JavaScript
import { expect } from 'chai';
|
|
import { describe, it } from 'mocha';
|
|
import React from 'react';
|
|
import { shallowWithIntl } from './helpers/mock-intl-enzyme';
|
|
import { mockContext } from './helpers/mock-context';
|
|
|
|
import { component as CanceledLegsBar } from '../../app/component/CanceledLegsBar';
|
|
|
|
describe('<CanceledLegsBar />', () => {
|
|
it('should render the banner if there are canceled legs', () => {
|
|
const props = {
|
|
showCanceledLegsBanner: true,
|
|
};
|
|
const wrapper = shallowWithIntl(<CanceledLegsBar {...props} />, {
|
|
context: { ...mockContext },
|
|
});
|
|
expect(
|
|
wrapper.find('.canceled-legs-banner').prop('style'),
|
|
).to.have.property('display', 'block');
|
|
});
|
|
});
|