import React from 'react'; import {render} from '@testing-library/react-native'; import {Column, Row} from './Layout'; import {Text} from 'react-native'; describe('Layout Components', () => { describe('Column Component', () => { it('should render Column component', () => { const {toJSON} = render( Test , ); expect(toJSON()).toBeTruthy(); }); it('should render children in column', () => { const {getByText} = render( Child 1 Child 2 , ); expect(getByText('Child 1')).toBeTruthy(); expect(getByText('Child 2')).toBeTruthy(); }); it('should render with fill prop', () => { const {getByLabelText} = render( Fill Column , ); expect(getByLabelText('fill-column')).toBeTruthy(); }); it('should render with multiple layout props', () => { const {getByLabelText} = render( Complex Column , ); expect(getByLabelText('complex-column')).toBeTruthy(); }); }); describe('Row Component', () => { it('should render Row component', () => { const {toJSON} = render( Test , ); expect(toJSON()).toBeTruthy(); }); it('should render children in row', () => { const {getByText} = render( Item 1 Item 2 Item 3 , ); expect(getByText('Item 1')).toBeTruthy(); expect(getByText('Item 2')).toBeTruthy(); expect(getByText('Item 3')).toBeTruthy(); }); it('should render with fill prop', () => { const {getByLabelText} = render( Fill Row , ); expect(getByLabelText('fill-row')).toBeTruthy(); }); it('should render with multiple layout props', () => { const {getByLabelText} = render( Complex Row , ); expect(getByLabelText('complex-row')).toBeTruthy(); }); it('should handle nested layouts', () => { const {getByText} = render( Nested 1 Nested 2 , ); expect(getByText('Nested 1')).toBeTruthy(); expect(getByText('Nested 2')).toBeTruthy(); }); }); });