import React from 'react'
import { render, screen } from '../utilities/test-utils'
import Nav from './_nav'
import NavItem from './_item'
const navTestId = 'nav'
const itemTestId = 'item'
const activeTestBorderlessId = 'activeborderless'
const activeTestBorderId = 'active'
const navClassName = 'custom-class-name-nav'
const itemClassName = 'custom-class-name-item'
const navTitle = 'Menu'
const itemTitle = 'Photos'
const itemImageUrl = 'https://upload.wikimedia.org/wikipedia/commons/0/00/Apple_News_icon_%28macOS%29.png'
const NavDefault = (props) => {
return (
)
}
test('should pass data prop', () => {
render()
const kit = screen.getByTestId(itemTestId)
expect(kit).toBeInTheDocument()
})
test('should pass className prop', () => {
render()
const kit = screen.getByTestId(itemTestId)
expect(kit).toHaveClass(itemClassName)
})
test('should pass aria prop', () => {
render()
const kit = screen.getByTestId(itemTestId)
expect(kit).toHaveAttribute('aria-label', itemTestId)
})
test('should render title', () => {
render()
const kit = screen.getByText(itemTitle)
expect(kit).toBeInTheDocument()
})
test('should have a left border', () => {
render()
const kit = screen.getByTestId(activeTestBorderId)
expect(kit).toContainHTML('pb_nav_list_kit_item_active')
})
test('should not have a left border', () => {
render()
const kit = screen.getByTestId(activeTestBorderlessId)
expect(kit).toContainHTML('pb_nav_list_kit_item_active_highlighted_border_none')
})
test('should have a right icon', () => {
render()
const kit = screen.getByTestId(itemTestId)
expect(kit).toContainHTML('')
})
test('should have a left icon', () => {
render()
const kit = screen.getByTestId(itemTestId)
expect(kit).toContainHTML('')
})