VimŸUnDoå�´µÝîE鈲µ¹·OOÖiór2F\³9$mi7777USk‹#_ÐÿÿÿÿUSbõõ5�_ÐÿÿÿÿUSb0õ 5�_ÐÿÿÿÿUSb8õimport mockery from 'mockery';5�_ÐÿÿÿÿUSb8õ"import Immutable from 'immutable';5�_ÐÿÿÿÿUSb9õ)function passThrough(arg) { return arg; }5�_Ð ÿÿÿÿUSb9õ5�_Ð ÿÿÿÿVUSb<õ +// Helper function to get the breadbar text#function getBreadbarText(options) {( let Breadbar = require('../Breadbar');, let component = ;: var stub = ReactTestUtils.renderIntoDocument(component);" var results = stub.refs.results;* return results.getDOMNode().textContent;}5�_Ð  ÿÿÿÿVUSb?õ œdescribe("Breadbar", () => {5�_Ð ÿÿÿÿ VUSbGõ  mockery.enable({ warnOnUnregistered: false });& mockery.registerMock('ofs/i18n', { 'gettext': passThrough,+ 'interpolate': (fmt, obj, named) => { if (named) {W return fmt.replace(/%\(\w+\)s/g, (match) => String(obj[match.slice(2, -2)])); }= return fmt.replace(/%s/g, () => String(obj.shift())); } });) mockery.registerMock('ofs/payload', { 'urls': { 'map-search': '' } });5�_Ð  ÿÿÿÿVUSbHõ 5�_Ð ÿÿÿÿ  VUSbLõ 5�_Ðÿÿÿÿ  VUSbMõ ‡5�_Ðÿÿÿÿ  VUSbNõ5�_Ðÿÿÿÿ  VUSbNõ‡5�_Ð ÿÿÿÿ  VUSbZõˆ" describe("Results text", () => {5�_Ð ÿÿÿÿ  VUSb^õˆ/ describe("Renders with options text", () => {5�_Ð ÿÿÿÿ  VUSb^õˆ. describe("Renders with optionstext", () => {5�_Ð ÿÿÿÿ  VUSb^õˆ- describe("Renders with optionsext", () => {5�_Ð ÿÿÿÿ  VUSb^õˆ, describe("Renders with optionsxt", () => {5�_Ð ÿÿÿÿ  VUSb^õˆ+ describe("Renders with optionst", () => {5�_Ðÿÿÿÿ  VUSbbõ‰ õˆ5�_ÐÿÿÿÿˆVUSbtõr* describe("Renders with options", () => {B it("renders tiered number of results with no filters", () => { let options = { 'currentPage': 'search'," 'filters': Immutable.Map({ 'city': null, 'region': null, 'homeTitle': null }), 'totalResults': 999 };= assert.equal(getBreadbarText(options), '500+ results'); });7 it("renders result with home title search", () => { let options = { 'currentPage': 'search'," 'filters': Immutable.Map({ 'homeTitle': 'foo' }), 'totalResults': 10 };E assert.equal(getBreadbarText(options), "10 results for 'foo'"); });A it("renders result with region or local area search", () => { let options = { 'currentPage': 'search',% 'filters': Immutable.fromJS({ 'city': { 'code': 'LON',$ 'verbose_name': 'London' }, 'region': { 'id': 1, 'depth': 2, 'name': 'Chelsea', 'longitude': 0, 'latitude': 0 } }), 'totalResults': 10 };N assert.equal(getBreadbarText(options), "10 results in Chelsea, London"); });3 it("renders result with a city search", () => { let options = { 'currentPage': 'search',% 'filters': Immutable.fromJS({ 'city': { 'code': 'LON',$ 'verbose_name': 'London' } }), 'totalResults': 10 };E assert.equal(getBreadbarText(options), "10 results in London"); });4 it("renders results with a stay length", () => { let options = { 'currentPage': 'search',% 'filters': Immutable.Map({}), 'stayLength': 3, 'totalResults': 10 };H assert.equal(getBreadbarText(options), "10 results for 3 nights"); });? it("renders results with a stay length and region", () => { let options = { 'currentPage': 'search',% 'filters': Immutable.fromJS({ 'city': { 'code': 'LON',$ 'verbose_name': 'London' }, 'region': { 'id': 1, 'depth': 2, 'name': 'Chelsea', 'longitude': 0, 'latitude': 0 } }), 'stayLength': 3, 'totalResults': 10 };[ assert.equal(getBreadbarText(options), "10 results for 3 nights in Chelsea, London"); });= it("renders results with a stay length and city", () => { let options = { 'currentPage': 'search',% 'filters': Immutable.fromJS({ 'city': { 'code': 'LON',$ 'verbose_name': 'London' } }), 'stayLength': 3, 'totalResults': 10 };R assert.equal(getBreadbarText(options), "10 results for 3 nights in London"); }); });5�_ÐÿÿÿÿVUSbuõ 5�_ÐÿÿÿÿVUSbwõ5�_ÐÿÿÿÿVUSbõ5�_Ð ÿÿÿÿVUSb‰õ const Choice = require('5�_Ð! ÿÿÿÿVUSb‹õ const Sinlge = require('5�_Ð" ! ÿÿÿÿVUSbŽõ const Single = require('5�_Ð!$"ÿÿÿÿVUSb�õ const Choice = require('5�_Ð"%#$!ÿÿÿÿVUSb©õ õ5�_Ð$&%ÿÿÿÿVUSb¬õ0 let component = ;5�_Ð%'&ÿÿÿÿVUSb®õ: var stub = ReactTestUtils.renderIntoDocument(component);5�_Ð&('ÿÿÿÿVUSb®õ" var results = stub.refs.results;5�_Ð')(ÿÿÿÿVUSb¯õ5�_Ð(*)ÿÿÿÿVUSb°õ õ5�_Ð)+*ÿÿÿÿVUSbÚõ  õ5�_Ð*,+ÿÿÿÿ  VUSbâõ  (1, 'foo')5�_Ð+-,ÿÿÿÿ  VUSbäõ  (1, 'foo']5�_Ð,.-ÿÿÿÿ  VUSbåõ  [1, 'foo']5�_Ð-/.ÿÿÿÿ!!VUSbéõ! [2, 'bar']5�_Ð.0/ ÿÿÿÿ""VUSbïõ" [3, '5�_Ð/10ÿÿÿÿ""VUSbõõ"õ"5�_Ð021ÿÿÿÿ##VUSböõ# [2, 'bar'],5�_Ð132ÿÿÿÿ##VUSböõ# [3, 'buzz']5�_Ð243 ÿÿÿÿ##VUSb÷õ# [3, 'bar'],5�_Ð354ÿÿÿÿ##VUSbüõ #. let component = ;5�_Ð465#ÿÿÿÿ##VUScõ #3 let component = ;5�_Ð576#ÿÿÿÿ##VUScõ #2 let component = ;5�_Ð687#ÿÿÿÿ##VUScõ #1 let component = ;5�_Ð798#ÿÿÿÿ##VUScõ #0 let component = ;5�_Ð8:9#ÿÿÿÿ##VUScõ #/ let component = ;5�_Ð9;:#ÿÿÿÿ##VUScõ #. let component = ;5�_Ð:<;#ÿÿÿÿ##VUScõ #- let component = ;5�_Ð;=<#ÿÿÿÿ##VUScõ #, let component = ;5�_Ð<>=#ÿÿÿÿ##VUScõ #+ let component = ;5�_Ð=?>#ÿÿÿÿ##VUScõ #* let component = ;5�_Ð>@?#ÿÿÿÿ##VUScõ #) let component = ;5�_Ð?A@#ÿÿÿÿ##VUScõ #( let component = ;5�_Ð@BA"ÿÿÿÿ##VUScõ #' let component = ;5�_ÐACB"ÿÿÿÿ##VUScõ #& let component = ;5�_ÐBDC"ÿÿÿÿ##VUScõ #% let component = ;5�_ÐCED$ÿÿÿÿ##VUScõ #$ let component = ;5�_ÐDFE#ÿÿÿÿ##VUScõ #$ let component = ;5�_ÐEGFÿÿÿÿ##VUScõ!## let component = 5�_ÐFHG ÿÿÿÿ$$VUSc õ #% õ "$5�_ÐGIH ÿÿÿÿ&&VUScõ #' õ "&5�_ÐHJI" ÿÿÿÿ((VUScõ!#( });5�_ÐIKJ" ÿÿÿÿ((VUScõ!#( })};5�_ÐJLK! ÿÿÿÿ((VUScõ!$) õ!#(5�_ÐKML# ÿÿÿÿ**VUSc"õ"# );5�_ÐLNM"ÿÿÿÿ))VUSc"õ!#) return (5�_ÐMON"ÿÿÿÿ))VUSc#õ!#) return 5�_ÐNPO%ÿÿÿÿ))VUSc:õ%')5�_ÐOQPÿÿÿÿ**VUSc@õ mockery.deregisterAll();5�_ÐPRQÿÿÿÿ))VUScAõ mockery.disable();5�_ÐQSR%ÿÿÿÿ((VUScWõ%') õ%'(5�_ÐRTS ÿÿÿÿ))VUScnõ!)N return {choice[1]};5�_ÐSUTÿÿÿÿ))VUScpõ) 5�_ÐTVU& ÿÿÿÿ))VUScÁõ%') assert5�_ÐUWV&ÿÿÿÿ))VUScÅõ%') assert.equal(5�_ÐVXW'ÿÿÿÿ))VUScÓõ&'$ var results = stub.refs.results;5�_ÐWYXÿÿÿÿ"VUScñõ " {choices.map((choice) => {N return {choice[1]}; })} 5�_ÐXZY 1ÿÿÿÿVUScöõ"#< var stub = ReactTestUtils.renderIntoDocument(component);5�_ÐY[Z ÿÿÿÿVUScöõ &$õ !$5�_ÐZ\[&ÿÿÿÿVUScùõ%') component);5�_Ð[]\ÿÿÿÿVUScüõ let component = ( );5�_Ð\^]ÿÿÿÿVUSdõ& 5�_Ð]_^"ÿÿÿÿVUSdõ!#& 5�_Ð^`_ ÿÿÿÿVUSd%õ!&N return {choice[1]};5�_Ð_a` #ÿÿÿÿVUSd*õ!&Q return {choice[1]};5�_Ð`ba%ÿÿÿÿVUSeõ%'&5�_Ðacb&ÿÿÿÿVUSeõ%(' 5�_Ðbdc'ÿÿÿÿVUSeõ&' it5�_Ðced&ÿÿÿÿVUSeõ%&5�_Ðdfe%ÿÿÿÿVUSeõ%)' õ%'&5�_Ðegf&ÿÿÿÿVUSeõ%&5�_Ðfhg&ÿÿÿÿVUSe õ%'(5�_Ðgih'ÿÿÿÿ$VUSeLõ'9)õ'()5�_Ðhji2ÿÿÿÿ$VUSeSõ13: 5�_Ðikj2ÿÿÿÿ$VUSeSõ13: 5�_Ðjlk2ÿÿÿÿ$VUSeSõ13: 5�_Ðkml2ÿÿÿÿ$VUSeTõ13: 5�_Ðlnm2ÿÿÿÿ$VUSeTõ13: 5�_Ðmon2ÿÿÿÿ$VUSeTõ13: 5�_Ðnpo2ÿÿÿÿ$VUSeTõ13: 5�_Ðoqp2ÿÿÿÿ$VUSeTõ13: 5�_Ðprq2ÿÿÿÿ$VUSeTõ13: 5�_Ðqtr2ÿÿÿÿ$VUSeT õ13: 5�_Ðrust7ÿÿÿÿ$VUSeaõ7:; õ79:5�_Ðtvu9ÿÿÿÿ$VUSeiõ9<= õ9;<5�_Ðuwv:ÿÿÿÿ$VUSe“õ:=? õ:<>5�_Ðvxw<ÿÿÿÿ$VUSe˜õ;=@ assert.equal(5�_Ðwyx<ÿÿÿÿ$VUSe£õ;=@) assert.equal(stub._isActive(), true);5�_Ðxzy<ÿÿÿÿ$VUSe£õ;=@( assert.equal(stub.isActive(), true);5�_Ðy{z<ÿÿÿÿ$VUSe£õ;=@' assert.equal(stub.sActive(), true);5�_Ðz|{<ÿÿÿÿ$VUSe£õ;=@& assert.equal(stub.Active(), true);5�_Ð{}|<ÿÿÿÿ$VUSe£õ;=@% assert.equal(stub.ctive(), true);5�_Ð|~}<ÿÿÿÿ$VUSe¤õ;=@$ assert.equal(stub.tive(), true);5�_Ð}~<ÿÿÿÿ$VUSe¤õ;=@# assert.equal(stub.ive(), true);5�_Ð~€<ÿÿÿÿ$VUSe¤õ;=@" assert.equal(stub.ve(), true);5�_Ð�€<ÿÿÿÿ$VUSe¤õ;=@! assert.equal(stub.e(), true);5�_Ѐ‚�<ÿÿÿÿ$VUSe¤õ;=@ assert.equal(stub.(), true);5�_Ð�ƒ‚<ÿÿÿÿ$VUSe¤õ;=@ assert.equal(stub.), true);5�_Ђ„ƒ<ÿÿÿÿ$VUSe¤õ;=@ assert.equal(stub., true);5�_Ѓ…„>ÿÿÿÿ$VUSe¨õ=>8 assert.equal(stub.refs.input.getDOMNode().value, 3);5�_Є†…=ÿÿÿÿ$VUSe¨õ<=5�_Ð…‡†;ÿÿÿÿ$VUSeÅõ;=? õ;=>5�_Іˆ‡< ÿÿÿÿ$VUSeÍõ;=? const options = 5�_Ї‰ˆ<ÿÿÿÿ$VUSeÐõ;=? const results = 5�_ÐˆŠ‰<ÿÿÿÿ$VUSeØõ;=? let results = 5�_Љ‹Š:ÿÿÿÿ$VUSeÝõ9;?7 ReactTestUtils.Simulate.focus(stub.refs.textInput);5�_ЊŒ‹:ÿÿÿÿ$VUSeÝõ9;?6 eactTestUtils.Simulate.focus(stub.refs.textInput);5�_Ћ�Œ:ÿÿÿÿ$VUSeÝõ9;?5 actTestUtils.Simulate.focus(stub.refs.textInput);5�_ÐŒŽ�:ÿÿÿÿ$VUSeÝõ9;?4 ctTestUtils.Simulate.focus(stub.refs.textInput);5�_Ð��Ž:ÿÿÿÿ$VUSeÞõ9;?3 tTestUtils.Simulate.focus(stub.refs.textInput);5�_ÐŽ��<ÿÿÿÿ$VUSeàõ;=?B let results = ReactTestUtils.findRenderedDOMComponentWithClass5�_Ð�‘�<ÿÿÿÿ$VUSeàõ;=?A let results = eactTestUtils.findRenderedDOMComponentWithClass5�_Ð�’‘<ÿÿÿÿ$VUSeàõ;=?@ let results = actTestUtils.findRenderedDOMComponentWithClass5�_Б“’<ÿÿÿÿ$VUSeàõ;=?? let results = ctTestUtils.findRenderedDOMComponentWithClass5�_Ð’”“<ÿÿÿÿ$VUSeàõ;=?> let results = tTestUtils.findRenderedDOMComponentWithClass5�_Г•”1ÿÿÿÿ$VUSeâõ02?1 var stub = ReactTestUtils.renderIntoDocument(5�_Д–•1ÿÿÿÿ$VUSeâõ02?0 var stub = eactTestUtils.renderIntoDocument(5�_Е—–1ÿÿÿÿ$VUSeâõ02?/ var stub = actTestUtils.renderIntoDocument(5�_Ж˜—1ÿÿÿÿ$VUSeâõ02?. var stub = ctTestUtils.renderIntoDocument(5�_З™˜1ÿÿÿÿ$VUSeãõ02?- var stub = tTestUtils.renderIntoDocument(5�_Иš™ÿÿÿÿ$VUSeåõ?1 var stub = ReactTestUtils.renderIntoDocument(5�_Й›šÿÿÿÿ$VUSeåõ?0 var stub = eactTestUtils.renderIntoDocument(5�_Кœ›ÿÿÿÿ$VUSeåõ?/ var stub = actTestUtils.renderIntoDocument(5�_Л�œÿÿÿÿ$VUSeåõ?. var stub = ctTestUtils.renderIntoDocument(5�_Мž�ÿÿÿÿ$VUSeæõ?- var stub = tTestUtils.renderIntoDocument(5�_Ð�Ÿžÿÿÿÿ$VUSeéõ?var ReactTestUtils;5�_О Ÿÿÿÿÿ$VUSeéõ?var eactTestUtils;5�_П¡ ÿÿÿÿ$VUSeéõ?var actTestUtils;5�_Р¢¡ÿÿÿÿ$VUSeéõ?var ctTestUtils;5�_С£¢ÿÿÿÿ$VUSeêõ?var tTestUtils;5�_Т¤£ ÿÿÿÿ$VUSeìõ ?, ReactTestUtils = React.addons.TestUtils;5�_У¥¤ ÿÿÿÿ$VUSeíõ ?+ eactTestUtils = React.addons.TestUtils;5�_Ф¦¥ ÿÿÿÿ$VUSeíõ ?* actTestUtils = React.addons.TestUtils;5�_Ð¥§¦ ÿÿÿÿ$VUSeíõ ?) ctTestUtils = React.addons.TestUtils;5�_Ц¨§ ÿÿÿÿ$VUSeíõ ?( tTestUtils = React.addons.TestUtils;5�_Ч©¨<=ÿÿÿÿ$VUSeòõ;>?= let results = TestUtils.findRenderedDOMComponentWithClass5�_Шª©<Bÿÿÿÿ$VUSfõ;=@C let results = TestUtils.findRenderedDOMComponentWithClass(stub,U 'react-choice-option');5�_Щ«ª;ÿÿÿÿ$VUSfõ;=@ õ;=?5�_Ъ¬«=>ÿÿÿÿ$VUSfõ<>@[ let results = TestUtils.findRenderedDOMComponentWithClass(stub, 'react-choice-option');5�_Ы­¬>ÿÿÿÿ$VUSfõ=?@* assert.equal(stub.refs.options, true);5�_Ь®­>ÿÿÿÿ$VUSfõ=?@) assert.equal(tub.refs.options, true);5�_Э¯®>ÿÿÿÿ$VUSfõ=?@( assert.equal(ub.refs.options, true);5�_Ю°¯>ÿÿÿÿ$VUSfõ=?@' assert.equal(b.refs.options, true);5�_Я±°>ÿÿÿÿ$VUSfõ=?@& assert.equal(.refs.options, true);5�_а²±>ÿÿÿÿ$VUSfõ=?@% assert.equal(refs.options, true);5�_б³²>ÿÿÿÿ$VUSfõ=?@$ assert.equal(efs.options, true);5�_в´³>ÿÿÿÿ$VUSfõ=?@# assert.equal(fs.options, true);5�_гµ´>ÿÿÿÿ$VUSfõ=?@" assert.equal(s.options, true);5�_д¶µ>ÿÿÿÿ$VUSfõ=?@! assert.equal(.options, true);5�_е·¶>ÿÿÿÿ$VUSfõ=?@ assert.equal(options, true);5�_ж¸·>ÿÿÿÿ$VUSfõ=?@ assert.equal(ptions, true);5�_з¹¸>ÿÿÿÿ$VUSfõ=?@ assert.equal(tions, true);5�_иº¹>ÿÿÿÿ$VUSfõ=?@ assert.equal(ions, true);5�_й»º>ÿÿÿÿ$VUSfõ=?@ assert.equal(ons, true);5�_к¼»>ÿÿÿÿ$VUSfõ=?@ assert.equal(ns, true);5�_л½¼>ÿÿÿÿ$VUSfõ=?@ assert.equal(s, true);5�_м¾½>ÿÿÿÿ$VUSfõ=?@ assert.equal(, true);5�_н¿¾>!ÿÿÿÿ$VUSf õ=?@' assert.equal(results.length, true);5�_оÀ¿=ÿÿÿÿ$VUSf( õ<>@^ let results = TestUtils.findRenderedDOMComponentWithClass(options, 'react-choice-option');5�_пÁÀ=ÿÿÿÿ$VUSf4 õ<>@] let results = TestUtils.scryRenderedDOMComponentsWithTag(options, 'react-choice-option');5�_ÐÀÂÁ>#ÿÿÿÿ$VUSf;õ>AA õ>@@5�_ÐÁÃÂ?ÿÿÿÿ$VUSf?õ>?5�_ÐÂÄÃ?ÿÿÿÿ$VUSf?õ>@A5�_ÐÃÅÄ@ÿÿÿÿ$VUSf@õ?AB // search for 5�_ÐÄÆÅ@ÿÿÿÿ$VUSf@õ?AB // search for5�_ÐÅÇÆ@ÿÿÿÿ$VUSf@õ?AB // search fo5�_ÐÆÈÇ@ÿÿÿÿ$VUSfAõ?AB // search f5�_ÐÇÉÈ@ ÿÿÿÿ$VUSfAõ?AB // search 5�_ÐÈÊÉ@ÿÿÿÿ: : V USfCõ@BBõ@AB5�_ÐÉËÊAÿÿÿÿ: : V USfEõ@BC2 TestUtils.Simulate.focus(stub.refs.textInput);5�_ÐÊÌËA1ÿÿÿÿ: : V USfJõ@BC3 TestUtils.Simulate.change(stub.refs.textInput);5�_ÐËÍÌA<ÿÿÿÿ: : V USfQõ@BCC TestUtils.Simulate.change(stub.refs.textInput, {target: value);5�_ÐÌÎÍABÿÿÿÿ: : V USfRõ@BCD TestUtils.Simulate.change(stub.refs.textInput, {target: {value);5�_ÐÍÏÎAEÿÿÿÿ: : V USfYõ@BCG TestUtils.Simulate.change(stub.refs.textInput, {target: {value: ');5�_ÐÎÐÏAÿÿÿÿ=H>$VHUSf^õADCõABC5�_ÐÏÑÐBÿÿÿÿ=H>$VHUSf_õACE_ let results = TestUtils.scryRenderedDOMComponentsWithClass(options, 'react-choice-option');5�_ÐÐÒÑBÿÿÿÿ=H>$VHUSf_õACE^ et results = TestUtils.scryRenderedDOMComponentsWithClass(options, 'react-choice-option');5�_ÐÑÓÒBÿÿÿÿ=H>$VHUSf_õACE] t results = TestUtils.scryRenderedDOMComponentsWithClass(options, 'react-choice-option');5�_ÐÒÔÓBÿÿÿÿ=H>$VHUSf_õACE\ results = TestUtils.scryRenderedDOMComponentsWithClass(options, 'react-choice-option');5�_ÐÓÕÔC!ÿÿÿÿ=H>$VHUSfaõBDE$ assert.equal(results.length, 4);5�_ÐÔÖÕDÿÿÿÿ'!'!V!USfrõDFEõDEE5�_ÐÕ×ÖEÿÿÿÿ'!'!V!USfrõDFF5�_ÐÖØ×Fÿÿÿÿ'!'!V!USfsõEGG' it("filters based on search", () => {5�_Ð×ÙØF!ÿÿÿÿ'!'!V!USf‚õEGG; it("clicking on result fires on based on search", () => {5�_ÐØÚÙF0ÿÿÿÿ'!'!V!USfŠõEGGJ it("clicking on result fires onSelect callback based on search", () => {5�_ÐÙÛÚF0ÿÿÿÿ'!'!V!USf‹õEGGI it("clicking on result fires onSelect callbackbased on search", () => {5�_ÐÚÜÛF0ÿÿÿÿ'!'!V!USf‹õEGGH it("clicking on result fires onSelect callbackased on search", () => {5�_ÐÛÝÜF0ÿÿÿÿ'!'!V!USf‹õEGGG it("clicking on result fires onSelect callbacksed on search", () => {5�_ÐÜÞÝF0ÿÿÿÿ'!'!V!USf‹õEGGF it("clicking on result fires onSelect callbacked on search", () => {5�_ÐÝßÞF0ÿÿÿÿ'!'!V!USf‹õEGGE it("clicking on result fires onSelect callbackd on search", () => {5�_ÐÞàßF0ÿÿÿÿ'!'!V!USf‹õEGGD it("clicking on result fires onSelect callback on search", () => {5�_ÐßáàF0ÿÿÿÿ'!'!V!USf‹õEGGC it("clicking on result fires onSelect callbackon search", () => {5�_ÐàâáF0ÿÿÿÿ'!'!V!USf‹õEGGB it("clicking on result fires onSelect callbackn search", () => {5�_ÐáãâF0ÿÿÿÿ'!'!V!USf‹õEGGA it("clicking on result fires onSelect callback search", () => {5�_ÐâäãF0ÿÿÿÿ'!'!V!USf‹õEGG@ it("clicking on result fires onSelect callbacksearch", () => {5�_ÐãåäF0ÿÿÿÿ'!'!V!USf‹õEGG? it("clicking on result fires onSelect callbackearch", () => {5�_ÐäæåF0ÿÿÿÿ'!'!V!USf‹õEGG> it("clicking on result fires onSelect callbackarch", () => {5�_ÐåçæF0ÿÿÿÿ'!'!V!USf‹õEGG= it("clicking on result fires onSelect callbackrch", () => {5�_ÐæèçF0ÿÿÿÿ'!'!V!USfŒõEGG< it("clicking on result fires onSelect callbackch", () => {5�_ÐçéèF0ÿÿÿÿ'!'!V!USfŒõEGG; it("clicking on result fires onSelect callbackh", () => {5�_ÐèêéF0ÿÿÿÿ'!'!V!USf�õFHH õFHG5�_ÐéìêFÿÿÿÿ(CVUSf‘õFcHõFGH5�_Ðêíëì]ÿÿÿÿ]bVUSf¢õ\]$ assert.equal(results.length, 4); // searchK TestUtils.Simulate.change(stub.refs.textInput, {target: {value: 'f'}});[ results = TestUtils.scryRenderedDOMComponentsWithClass(options, 'react-choice-option');$ assert.equal(results.length, 2);5�_Ðìîíÿÿÿÿ]]VUSgõ_õ^5�_ÐíïîOÿÿÿÿ^^VUSg/õOR` õOQ_5�_ÐîðïQÿÿÿÿ``VUSg2õPRa callback = sinon.spy();5�_ÐïñðQ ÿÿÿÿ``VUSg3õPRa! const callback = sinon.spy();5�_ÐðòñTÿÿÿÿ``VUSg7õSUa 5�_Ðñóò_'ÿÿÿÿ``VUSg?õ_aa5�_Ðòôó`ÿÿÿÿaaVUSgCõ_bb 5�_Ðóõô`ÿÿÿÿbbVUSgKõ_`5�_Ðôöõ`ÿÿÿÿaaVUSgKõ_ab5�_Ðõ÷öaÿÿÿÿbbVUSgLõadd õacc5�_Ðöø÷bÿÿÿÿddVUSgZõab5�_Ð÷ùøbÿÿÿÿccVUSgZõacd5�_ÐøúùbÿÿÿÿddVUSgpõbdf õbde5�_ÐùûúdÿÿÿÿeeVUSgvõcef assert(onSelect.calledOnce);5�_ÐúüûdÿÿÿÿeeVUSgwõdfg õdff5�_ÐûýüG4ÿÿÿÿffVUSg�õFHg: it("clicking on result fires onSelect callback", () => {5�_Ðüþýd!ÿÿÿÿffVUSg„õdfh õdfg5�_Ðýÿþ`ÿÿÿÿggVUSgÎõ`bi õ`bh5�_ÐþÿaÿÿÿÿhhVUSgæõ`a console.log(results[0]);5�_Ðÿ a'ÿÿÿÿggVUSgçõ`bh) TestUtils.Simulate.click(results[0]);5�_Ð   aÿÿÿÿggVUSh%õ`bh6 TestUtils.Simulate.click(results[0].getDOMNode());5�_Ð  a+ÿÿÿÿggVUSh1õ`bh: TestUtils.Simulate.mouseDown(results[0].getDOMNode());5�_Ð a+ÿÿÿÿggVUSh1õ`bh9 TestUtils.Simulate.mouseDown(results[0]getDOMNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh8 TestUtils.Simulate.mouseDown(results[0]etDOMNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh7 TestUtils.Simulate.mouseDown(results[0]tDOMNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh6 TestUtils.Simulate.mouseDown(results[0]DOMNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh5 TestUtils.Simulate.mouseDown(results[0]OMNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh4 TestUtils.Simulate.mouseDown(results[0]MNode());5�_Ða+ÿÿÿÿggVUSh1õ`bh3 TestUtils.Simulate.mouseDown(results[0]Node());5�_Ða+ÿÿÿÿggVUSh1õ`bh2 TestUtils.Simulate.mouseDown(results[0]ode());5�_Ða+ÿÿÿÿggVUSh2õ`bh1 TestUtils.Simulate.mouseDown(results[0]de());5�_Ða+ÿÿÿÿggVUSh2õ`bh0 TestUtils.Simulate.mouseDown(results[0]e());5�_Ða+ÿÿÿÿggVUSh2õ`bh/ TestUtils.Simulate.mouseDown(results[0]());5�_Ða+ÿÿÿÿggVUSh2õ`bh. TestUtils.Simulate.mouseDown(results[0]));5�_ÐcÿÿÿÿggVUShAõbc setTimeout(() => {5�_ÐeÿÿÿÿffVUShAõde }, 0);5�_ÐdÿÿÿÿeeVUShAõcd done();5�_ÐG4ÿÿÿÿddVUShDõFHe> it("clicking on result fires onSelect callback", (done) => {5�_ÐG4ÿÿÿÿddVUShDõFHe= it("clicking on result fires onSelect callback", (one) => {5�_Ð G4ÿÿÿÿddVUShDõFHe< it("clicking on result fires onSelect callback", (ne) => {5�_Ð! G4ÿÿÿÿddVUShEõFHe; it("clicking on result fires onSelect callback", (e) => {5�_Ð "!cÿÿÿÿddVUShLõbde" assert(onSelect.calledOnce);5�_Ð!#"bÿÿÿÿddVUShMõab5�_Ð"$#bÿÿÿÿccVUShMõacd5�_Ð#%$cÿÿÿÿddVUSh‹õcff õcee5�_Ð$&%dÿÿÿÿffVUSh�õcd5�_Ð%(&dÿÿÿÿeeVUSh�õcef5�_Ð&)'(e ÿÿÿÿffVUSh’õdfg const arguments = 5�_Ð(*)eÿÿÿÿffVUSh”õdfg const args = 5�_Ð)+*e!ÿÿÿÿffVUSh—õegh õegg5�_Ð*,+eÿÿÿÿggVUSh¢õehi õegh5�_Ð+-,gÿÿÿÿiiVUSh®õfhj assert.equal(args5�_Ð,.-hÿÿÿÿiiVUSh¹õgh console.log(args);5�_Ð-/.TÿÿÿÿhhVUShÞõSUi) 5�_Ð.0/a)ÿÿÿÿhhVUShüõ`bi- TestUtils.Simulate.mouseDown(results[0]);5�_Ð/20a)ÿÿÿÿhhVUShþõ`bi- TestUtils.Simulate.mouseDown(results[2]);5�_Ð0312g'ÿÿÿÿhhVUSiõfhi* assert.equal(args[0].target.value, 1);5�_Ð243TÿÿÿÿhhVUSiõSUi4 5�_Ð354fÿÿÿÿUSk; õfhj õfhi5�_Ð465gÿÿÿÿUSkH!õfhj console.log(args);5�_Ð576gÿÿÿÿUSkZ"õfhj# console.log(args.target.value);5�_Ð67gÿÿÿÿUSkŠ#õfg& console.log(args[0].target.value);5�_Ð021g(ÿÿÿÿhhVUSiõfhi* assert.equal(args[0].target.value, 1h;5�_Ð&('e ÿÿÿÿffVUSh‘õdfg const ar = 5�_Ð  aÿÿÿÿhhVUShõabh õaci console.log5�_Ð cÿÿÿÿffVUSgêõbd5�_ÐeÿÿÿÿeeVUSgëõdf5�_ÐdÿÿÿÿddVUSgëõce5�_ÐcÿÿÿÿddVUSgìõbde assert(onSelect.calledOnce);5�_ÐbÿÿÿÿccVUSgìõac5�_ÐbÿÿÿÿddVUSgíõabd5�_ÐG4ÿÿÿÿddVUSgðõFHe= it("clicking on result fires onSelect callback", (one) => {5�_Ð G4ÿÿÿÿddVUSgðõFHe< it("clicking on result fires onSelect callback", (ne) => {5�_Ð  G4ÿÿÿÿddVUSgðõFHe; it("clicking on result fires onSelect callback", (e) => {5�_Ð  G4ÿÿÿÿddVUSgñõFHe: it("clicking on result fires onSelect callback", () => {5�_Ðêìë[ÿÿÿÿ[[VUSf—õZ_5�_Ðrts7ÿÿÿÿ$VUSeXõ78:5�_Ð"$#!ÿÿÿÿVUSb¨õõ( const Choice = require('../');Single5�_Ð!  ÿÿÿÿVUSb�õ constSingle = require('5�_Ð ÿÿÿÿVUSbˆõ consChoice = require('5�_Ð ÿÿÿÿVUSb=õ5�_ÐÿÿÿÿUSb#õ—C/* global describe, beforeEach, afterEach, it, initDOM, cleanDOM */import mockery from 'mockery';import {Flux} from 'fluxxor';import assert from 'assert';1import actions from 'ofs/apps/core/base-actions';const LIFE_STAGES = [ ['adult', 'Adult'], ['child', 'Child (4-12)'], ['toddler', 'Toddler (1-3)'], ['baby', 'Baby (under 1)']];)function passThrough(arg) { return arg; }function createFlux() { return new Flux({}, actions);} var React;var ReactTestUtils;describe("GuestsForm", () => { beforeEach(() => { initDOM();$ React = require('react/addons');, ReactTestUtils = React.addons.TestUtils; mockery.enable({ warnOnUnregistered: false });* mockery.registerMock('ofs/settings', { 'LANGUAGE': 'en' });& mockery.registerMock('ofs/i18n', { 'gettext': passThrough });: // for some reason this is causing the test to timeoutI mockery.registerMock('ofs/components/contact/booking/component', {}); }); afterEach(() => { cleanDOM(); mockery.deregisterAll(); mockery.disable(); });" it("renders lead guest", () => {. var GuestsForm = require('../GuestsForm'); var config = { 'initialGuests': [], 'sleepsMax': 4, 'lifeStages': LIFE_STAGES, 'homeTruths': "", 'errors': {} }; var flux = createFlux();; var component = ;< var stub = ReactTestUtils.renderIntoDocument(component);N var table = ReactTestUtils.findRenderedDOMComponentWithTag(stub, 'table');N var guests = ReactTestUtils.scryRenderedDOMComponentsWithTag(table, 'tr');# assert.equal(guests.length, 2);U var label = ReactTestUtils.findRenderedDOMComponentWithClass(guests[1], 'label');? assert.equal(label.getDOMNode().textContent, 'Lead guest');( // make sure all inputs are disabledU var inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag(guests[1], 'input'); inputs.map((input) => {/ assert.equal(input.props.disabled, true); }); });( it("changes number of guests", () => {. var GuestsForm = require('../GuestsForm'); var config = { 'initialGuests': [], 'sleepsMax': 4, 'lifeStages': LIFE_STAGES, 'homeTruths': "", 'errors': {} }; var flux = createFlux();; var component = ;< var stub = ReactTestUtils.renderIntoDocument(component);6 var selectNode = stub.refs.numGuests.getDOMNode();E ReactTestUtils.Simulate.change(selectNode, {target: {value: 3}});N var table = ReactTestUtils.findRenderedDOMComponentWithTag(stub, 'table');N var guests = ReactTestUtils.scryRenderedDOMComponentsWithTag(table, 'tr');# assert.equal(guests.length, 4);$ // label should be set correctlyU var label = ReactTestUtils.findRenderedDOMComponentWithClass(guests[2], 'label');< assert.equal(label.getDOMNode().textContent, 'Guest 2'); // inputs default to blankU var inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag(guests[2], 'input');0 assert.equal(inputs[0].props.checked, true);< assert.equal(inputs[0].props.name, 'form-0-life_stage'); });" it("changes life stage", () => {. var GuestsForm = require('../GuestsForm'); var config = { 'initialGuests': [], 'sleepsMax': 4, 'lifeStages': LIFE_STAGES, 'homeTruths': "", 'errors': {} }; var flux = createFlux();; var component = ;< var stub = ReactTestUtils.renderIntoDocument(component);6 var selectNode = stub.refs.numGuests.getDOMNode();E ReactTestUtils.Simulate.change(selectNode, {target: {value: 2}});N var table = ReactTestUtils.findRenderedDOMComponentWithTag(stub, 'table');N var guests = ReactTestUtils.scryRenderedDOMComponentsWithTag(table, 'tr');# assert.equal(guests.length, 3);U var inputs = ReactTestUtils.scryRenderedDOMComponentsWithTag(guests[2], 'input');1 assert.equal(inputs[1].props.checked, false);, var adultInput = inputs[1].getDOMNode();. ReactTestUtils.Simulate.click(adultInput);0 assert.equal(inputs[1].props.checked, true); });}); 5�_ÐÿÿÿÿUSbõ "scripts": {- "postinstall": "node create-symlinks.js",F "test": "mocha 'static/js/onefinestay/**/__tests__/**/*.{js,jsx}'" }, 5�çª