import { render, screen } from '@test-utils';
import { BreadcrumbList } from 'schema-dts';
import Layout from './layout';

const body =
  'Sit dolorem eveniet. Sit sit odio nemo vitae corrupti modi sint est rerum. Pariatur quidem maiores distinctio. Quia et illum aspernatur est cum.';

describe('Layout', () => {
  it('renders the website header', () => {
    render(<Layout>{body}</Layout>);
    expect(screen.getByRole('banner')).toBeInTheDocument();
  });

  it('renders the website main content', () => {
    render(<Layout>{body}</Layout>);
    expect(screen.getByRole('main')).toBeInTheDocument();
  });

  it('renders the website footer', () => {
    render(<Layout>{body}</Layout>);
    expect(screen.getByRole('contentinfo')).toBeInTheDocument();
  });

  it('renders a skip to content link', () => {
    render(<Layout>{body}</Layout>);
    expect(
      screen.getByRole('link', { name: 'Skip to content' })
    ).toBeInTheDocument();
  });

  it('renders an article', () => {
    render(<Layout>{body}</Layout>);
    expect(screen.getByRole('article')).toHaveTextContent(body);
  });
});
it();'>
<option value='main'>main</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>The frontend of my personal website.</td><td class='sub right'>Armand Philippot</td></tr></table>
<table class='tabs'><tr><td>
<a href='/www.armandphilippot.com/?h=v1.0.0'>summary</a><a href='/www.armandphilippot.com/refs/?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>refs</a><a href='/www.armandphilippot.com/log/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0'>log</a><a class='active' href='/www.armandphilippot.com/tree/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>tree</a><a href='/www.armandphilippot.com/commit/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>commit</a><a href='/www.armandphilippot.com/diff/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>diff</a><a href='/www.armandphilippot.com/stats/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/src/components/molecules/forms/ackee-select.module.scss'>
<input type='hidden' name='h' value='v1.0.0'/><input type='hidden' name='id' value='ae384aec5084b9fb9f02166890686a37d1260ef2'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>root</a>/<a href='/www.armandphilippot.com/tree/src?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>src</a>/<a href='/www.armandphilippot.com/tree/src/components?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>components</a>/<a href='/www.armandphilippot.com/tree/src/components/molecules?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>molecules</a>/<a href='/www.armandphilippot.com/tree/src/components/molecules/forms?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>forms</a>/<a href='/www.armandphilippot.com/tree/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>ackee-select.module.scss</a></div><div class='content'>blob: 87cd9ee0fa3e645dc42fed6433bdf960bfd3b626 (<a href='/www.armandphilippot.com/plain/src/components/molecules/forms/ackee-select.module.scss?h=v1.0.0&amp;id=ae384aec5084b9fb9f02166890686a37d1260ef2'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
</pre></td>
<td class='lines'><pre><code>