mirror of
https://github.com/HSLdevcom/digitransit-ui
synced 2025-07-06 09:30:37 +02:00
28 lines
759 B
JavaScript
28 lines
759 B
JavaScript
import React from 'react';
|
|
import { expect } from 'chai';
|
|
import { describe, it } from 'mocha';
|
|
|
|
import { mountWithIntl } from '../../helpers/mock-intl-enzyme';
|
|
import { Component as MarkerPopupBottomWithoutLeaflet } from '../../../../app/component/map/MarkerPopupBottom';
|
|
|
|
describe('<MarkerPopupBottom />', () => {
|
|
it('should render a viapoint button when asked so', () => {
|
|
const props = {
|
|
location: {},
|
|
leaflet: {
|
|
map: {
|
|
closePopup: () => {},
|
|
},
|
|
},
|
|
locationPopup: 'all',
|
|
onSelectLocation: () => null,
|
|
};
|
|
|
|
const wrapper = mountWithIntl(
|
|
<MarkerPopupBottomWithoutLeaflet {...props} />,
|
|
{},
|
|
);
|
|
|
|
expect(wrapper.find('.route-add-viapoint').length).to.equal(1);
|
|
});
|
|
});
|