import React from 'react';
import 'jest-styled-components/native';
import { render } from '@testing-library/react-native';
import { OrganismPromoQR } from '.';
import { IPromoQRProps } from './index.interfaces';

describe('[Native] OrganismPromoQR', () => {
	it('Rendered component', () => {
		const props: IPromoQRProps = {
			title: 'Title',
			data: { code: 'ABC123', image: '' },
			textLink: 'See Locations',
			urlLink: 'https://github.com',
		};
		const component = render(<OrganismPromoQR {...props} />);
		expect(component).toBeTruthy();
	});

	it('Rendered component with width', () => {
		const props: IPromoQRProps = {
			title: 'Title',
			data: { code: 'ABC123', image: '' },
			textLink: 'See Locations',
			urlLink: 'https://github.com',
			width: '396px',
		};
		const component = render(<OrganismPromoQR {...props} />);
		expect(component).toBeTruthy();
	});

	it('Rendered component with width & height', () => {
		const props: IPromoQRProps = {
			title: 'Title',
			data: { code: 'ABC123', image: '' },
			textLink: 'See Locations',
			urlLink: 'https://github.com',
			width: '396px',
			height: '414px',
		};
		const component = render(<OrganismPromoQR {...props} />);
		expect(component).toBeTruthy();
	});
});
