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 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(navTestId) expect(kit).toBeInTheDocument() }) test('should pass className prop', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass(navClassName) }) test('should pass aria prop', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveAttribute('aria-label', navTestId) }) test('should render nav title', () => { render() const kit = screen.getByText(navTitle) expect(kit).toBeInTheDocument() }) test('should not be borderless by default', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical_highlight') }) test('should be borderless', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical_highlight_borderless') }) test('should highlight by default', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical_highlight') }) test('should not highlight', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical') }) test('should have vertical orientation by default', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical_highlight') }) test('should change orientation', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_horizontal_highlight') }) test('should have normal variant by default', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_normal_vertical_highlight') }) test('should change variant', () => { render() const kit = screen.getByTestId(navTestId) expect(kit).toHaveClass('pb_nav_list_subtle_vertical_highlight') })