it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { errorMessage: 'Location information is unavailable.' }) expect(ctx.props.onChange.callCount, 'does not trigger onChange').to.equal(0) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { errorMessage: 'The request to get your location timed out.' }) expect(ctx.props.onChange.callCount, 'does not trigger onChange').to.equal(0) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { errorMessage: 'Location lookup is currently disabled in your browser.' }) expect(ctx.props.onChange.callCount, 'does not trigger onChange').to.equal(0) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { latitude: '37.4274795', longitude: '-122.152378' }) expectOnChangeState(ctx, { address: { latitude: 37.4274795, longitude: -122.152378 } }) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { address: '99 Abrams Ct', city: 'Stanford', country: 'United States of America', postalCode: '94305-7100', state: 'CA' }) expectOnChangeState(ctx, { address: { address: '99 Abrams Ct', city: 'Stanford', country: 'US', postalCode: '94305-7100', state: 'CA' } }) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { address: '99 Abrams Ct', city: 'Stanford', country: 'United States of America', latitude: '37.4274795', longitude: '-122.152378', postalCode: '94305-7100', state: 'CA' }) expectOnChangeState(ctx, { address: { latitude: 37.4274795, longitude: -122.152378, country: 'US', state: 'CA', city: 'Stanford', postalCode: '94305-7100', address: '99 Abrams Ct' } }) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', { address: '99 Abrams Ct', city: 'Stanford', country: 'United States of America', latitude: '37.4274795', longitude: '-122.152378', postalCode: '94305-7100', state: 'CA' }) expectOnChangeState(ctx, { address: { street: '99 Abrams Ct', hometown: 'Stanford', overlord: 'US', zip: '94305-7100', babysitter: 'CA', lat: '37.4274795', lon: '-122.152378' } }) })
it('renders as expected', function () { expectBunsenGeolocationRendererWithState('address', {}) expect(ctx.props.onChange.callCount, 'does not trigger onChange').to.equal(0) })