Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import * as React from 'react';
import { createDriverFactory } from 'wix-ui-test-utils/driver-factory';
import { addressInputDriverFactory } from './AddressInput.driver';
import { AddressInput } from '.';
import { mount } from 'enzyme';
import { GoogleMapsClientStub } from 'wix-ui-core/dist/src/components/address-input/GoogleMapsClientStub';
import * as helper from 'wix-ui-core/dist/src/components/address-input/AddressInputTestHelper';
import * as waitForCond from 'wait-for-cond';
import { AddressInputProps } from './AddressInput';
import Search from 'wix-ui-icons-common/Search';
GoogleMapsClientStub.setAddresses([helper.ADDRESS_1, helper.ADDRESS_2]);
GoogleMapsClientStub.setGeocode(helper.GEOCODE_1);
const commonProps = {
apiKey: '',
Client: GoogleMapsClientStub,
lang: 'ru',
onSelect: () => null
};
describe('AddressInput', () => {
const createDriver = createDriverFactory(addressInputDriverFactory);
it('should always set the core prop forceContentElementVisibility to false', () => {
const props = {
...commonProps,
forceContentElementVisibility: true
} as AddressInputProps;
import * as React from 'react';
import { AddressInput } from '../src/components/AddressInput';
import { Option } from 'wix-ui-core/dist/src/components/dropdown-option';
import { GoogleMapsClientStub } from 'wix-ui-core/dist/src/components/address-input/GoogleMapsClientStub';
import * as helper from 'wix-ui-core/dist/src/components/address-input/AddressInputTestHelper';
GoogleMapsClientStub.setAddresses([helper.ADDRESS_1, helper.ADDRESS_2]);
GoogleMapsClientStub.setGeocode(helper.GEOCODE_1);
export default {
category: 'Components',
storyName: 'AddressInput',
component: AddressInput,
componentPath: '../src/components/AddressInput/AddressInput.tsx',
componentProps: {
'data-hook': 'storybook-address-input',
fixedFooter: 'Fixed Footer',
fixedHeader: 'Fixed Header',
Client: GoogleMapsClientStub
},
exampleProps: {
onSelect: (option: Option) => option.value,