import { describe, expect, it } from '@jest/globals';
import { render, screen as rtlScreen } from '@testing-library/react';
import { Notice } from './notice';

describe('Notice', () => {
  it('can render an error notice', () => {
    const body = 'culpa sint ut';

    render(<Notice kind="error">{body}</Notice>);

    expect(rtlScreen.getByText(body)).toHaveClass('notice--error');
  });

  it('can render an informative notice', () => {
    const body = 'labore optio rerum';

    render(<Notice kind="info">{body}</Notice>);

    expect(rtlScreen.getByText(body)).toHaveClass('notice--info');
  });

  it('can render a success notice', () => {
    const body = 'dolorem voluptatem velit';

    render(<Notice kind="success">{body}</Notice>);

    expect(rtlScreen.getByText(body)).toHaveClass('notice--success');
  });

  it('can render a warning notice', () => {
    const body = 'ut non nihil';

    render(<Notice kind="warning">{body}</Notice>);

    expect(rtlScreen.getByText(body)).toHaveClass('notice--warning');
  });
});
mit();'>
<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=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>refs</a><a href='/www.armandphilippot.com/log/public/prism/prism-t4-vb.min.js?h=v1.0.0'>log</a><a class='active' href='/www.armandphilippot.com/tree/public/prism/prism-t4-vb.min.js?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>tree</a><a href='/www.armandphilippot.com/commit/public/prism/prism-t4-vb.min.js?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>commit</a><a href='/www.armandphilippot.com/diff/public/prism/prism-t4-vb.min.js?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>diff</a><a href='/www.armandphilippot.com/stats/public/prism/prism-t4-vb.min.js?h=v1.0.0'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/public/prism/prism-t4-vb.min.js'>
<input type='hidden' name='h' value='v1.0.0'/><input type='hidden' name='id' value='86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'/><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=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>root</a>/<a href='/www.armandphilippot.com/tree/public?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>public</a>/<a href='/www.armandphilippot.com/tree/public/prism?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>prism</a>/<a href='/www.armandphilippot.com/tree/public/prism/prism-t4-vb.min.js?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>prism-t4-vb.min.js</a></div><div class='content'>blob: 7571b112a963dcce9449e8532ebe615d36a4c4e3 (<a href='/www.armandphilippot.com/plain/public/prism/prism-t4-vb.min.js?h=v1.0.0&amp;id=86d3e30ef02585d5089dce3aa2757ca2cb4e4edf'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
</pre></td>
<td class='lines'><pre><code>