import React from 'react' import { render, screen } from '../utilities/test-utils' import MultipleUsersStacked from './_multiple_users_stacked' const testId = 'multipleUsersStacked' const className = 'custom-class-name' const nameUser1 = 'Patrick Welch' const nameUser2 = 'Lucille Sanchez' const imageUser1 = 'https://randomuser.me/api/portraits/men/9.jpg' const imageUser2 = 'https://randomuser.me/api/portraits/women/6.jpg' const MultipleUsersStackedDefault = () => { return ( ) } test('should render alt names and images', () => { render() const image1 = screen.getByAltText(nameUser1) const image2 = screen.getByAltText(nameUser2) expect(image1).toHaveAttribute('src', imageUser1) expect(image2).toHaveAttribute('src', imageUser2) }) test('should pass data prop', () => { render() const kit = screen.getByTestId(testId) expect(kit).toBeInTheDocument() }) test('should pass className prop', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveClass(className) }) test('should pass aria prop', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveAttribute('aria-label', testId) }) const MultipleUsersStackedSingleBubble = () => { return ( ) } test('should have a single bubble', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveClass("pb_multiple_users_stacked_kit_single_bubble_size_sm") const firstItem = kit.querySelector('.first_item'); expect(firstItem).toBeInTheDocument(); }) const MultipleUsersStackedDoubleBubble = () => { return ( ) } test('should have a double bubble', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble_size_sm") const firstItem = kit.querySelector('.first_item'); expect(firstItem).toBeInTheDocument(); const secondItem = kit.querySelector('.second_item'); expect(secondItem).toBeInTheDocument(); }) const MultipleUsersStackedTripleBubble = () => { return ( ) } test('should have a triple bubble', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble_size_sm") const firstItem = kit.querySelector('.first_item'); expect(firstItem).toBeInTheDocument(); expect(firstItem).toHaveClass("triple_bubble") const secondItem = kit.querySelector('.second_item'); expect(secondItem).toBeInTheDocument(); expect(secondItem).toHaveClass("triple_bubble") const thirdItem = kit.querySelector('.third_item'); expect(thirdItem).toBeInTheDocument(); }) const MultipleUsersStackedQuadrupleBubble = () => { return ( ) } test('should have a quadruple bubble', () => { render() const kit = screen.getByTestId(testId) expect(kit).toHaveClass("pb_multiple_users_stacked_kit_bubble_size_sm") const firstItem = kit.querySelector('.first_item'); expect(firstItem).toBeInTheDocument(); expect(firstItem).toHaveClass("quadruple_bubble") const secondItem = kit.querySelector('.second_item'); expect(secondItem).toBeInTheDocument(); expect(secondItem).toHaveClass("quadruple_bubble") const thirdItem = kit.querySelector('.third_item'); expect(thirdItem).toBeInTheDocument(); expect(thirdItem).toHaveClass("quadruple_bubble") const fourthItem = kit.querySelector('.fourth_item'); expect(fourthItem).toBeInTheDocument(); })