UNPKG

@kiwicom/smart-faq

Version:

Smart FAQ

34 lines (29 loc) 1.14 kB
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var React = _interopRequireWildcard(require("react")); var _enzyme = require("enzyme"); var _Notification = require("../Notification"); // @flow describe('Notification', function () { it('should render', function () { var wrapper = (0, _enzyme.render)(React.createElement(_Notification.RawNotification, { isUrgent: true, hoursLeft: 25 })); expect(wrapper).toMatchSnapshot(); }); it('should show warning when message is urgent', function () { var wrapper = (0, _enzyme.render)(React.createElement(_Notification.RawNotification, { isUrgent: true, hoursLeft: 25 })); expect(wrapper.text()).toContain('smartfaq.single_booking_page.notification.urgent_message'); }); it('should show just info when it is not urgent', function () { var wrapper = (0, _enzyme.render)(React.createElement(_Notification.RawNotification, { isUrgent: false, hoursLeft: 62 })); expect(wrapper.text()).toContain('smartfaq.single_booking_page.notification.normal_message'); }); });