Skip to content

Commit

Permalink
test: Adicionar testes para o componente Filter - Renderização dos ti…
Browse files Browse the repository at this point in the history
…pos de licitação, input do nome do órgão e quantidade de resultados obtidos#111�
  • Loading branch information
m4rllon committed Aug 12, 2024
1 parent 03467a7 commit 165fab9
Show file tree
Hide file tree
Showing 68 changed files with 2,372 additions and 1,678 deletions.
302 changes: 136 additions & 166 deletions frontend/coverage/clover.xml

Large diffs are not rendered by default.

45 changes: 22 additions & 23 deletions frontend/coverage/coverage-final.json

Large diffs are not rendered by default.

231 changes: 108 additions & 123 deletions frontend/coverage/lcov-report/index.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> src/components/campo-pesquisa</h
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ <h1><a href="../../../index.html">All files</a> src/components/card-licitacoes</
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/5</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/2</span>
<span class='fraction'>0/6</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/5</span>
</div>


Expand Down Expand Up @@ -84,13 +84,13 @@ <h1><a href="../../../index.html">All files</a> src/components/card-licitacoes</
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="1" class="abs low">0/1</td>
<td data-value="5" class="abs low">0/5</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="6" class="abs low">0/6</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="1" class="abs low">0/1</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="1" class="abs low">0/1</td>
<td data-value="5" class="abs low">0/5</td>
</tr>

</tbody>
Expand All @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> src/components/card-licitacoes</
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/5</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/2</span>
<span class='fraction'>0/6</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/2</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/1</span>
<span class='fraction'>0/5</span>
</div>


Expand Down Expand Up @@ -107,11 +107,25 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<a name='L42'></a><a href='#L42'>42</a>
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a>
<a name='L52'></a><a href='#L52'>52</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
Expand Down Expand Up @@ -155,9 +169,16 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
import { setStatusBidding } from '../../utils/status-bidding';
import styles from './style.module.css';
import formatCurrency from '../../utils/format-currency';
import { Link } from 'react-router-dom';
import { useNavigate } from 'react-router-dom';
import { capitalize } from '@mui/material';
&nbsp;
export default function <span class="fstat-no" title="function not covered" >CardLicitacoes(</span>{ data }) {
const navigate = <span class="cstat-no" title="statement not covered" >useNavigate();</span>
const handleNavigate = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> =&gt; {</span>
<span class="cstat-no" title="statement not covered" > navigate(`/licitacoes/${data.id}`);</span>
<span class="cstat-no" title="statement not covered" > navigate(0);</span>
}
&nbsp;
<span class="cstat-no" title="statement not covered" > return (</span>
&lt;div className={styles.cardWrapper}&gt;
&lt;h5 className={styles.cardTitle}&gt;{data.nome_orgao}&lt;/h5&gt;
Expand All @@ -166,17 +187,17 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
&lt;div className={styles.cardStatus}&gt;
&lt;div className={styles.statusContainer}&gt;
&lt;p className={styles.cardStatusText}&gt;
Status: {setStatusBidding(data)}
Status: {capitalize(setStatusBidding(data) ? setStatusBidding(data): '')}
&lt;/p&gt;
&lt;/div&gt;
&lt;p className={styles.cardStatusText}&gt;Modalidade: {data.tipo}&lt;/p&gt;
&lt;p className={styles.cardStatusText}&gt;Modalidade: {capitalize(data.tipo) ? capitalize(data.tipo) : ''}&lt;/p&gt;
&lt;/div&gt;
&nbsp;
&lt;div className={styles.licitacoesInfo}&gt;
&lt;p&gt;Data de publicação: {data.data}&lt;/p&gt;
{data.valores &amp;&amp; (
&lt;p className={styles.statusContainer}&gt;
Valor da licitação: R$ {formatCurrency(data.valores[0])}
Valor da licitação: {formatCurrency(data.valores[0])}
&lt;/p&gt;
)}
&lt;/div&gt;
Expand All @@ -188,9 +209,9 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;Link to={`/licitacoes/${data.id}-${data.tipo}`}&gt;
&lt;p className={styles.cardButton}&gt;Ver Mais&lt;/p&gt;
&lt;/Link&gt;
&lt;a onClick={handleNavigate} className={styles.cardButton}&gt;
&lt;p&gt;Ver Mais&lt;/p&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;
);
Expand All @@ -202,7 +223,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> src/components/footer</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
55 changes: 35 additions & 20 deletions frontend/coverage/lcov-report/src/components/footer/index.jsx.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,25 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<a name='L56'></a><a href='#L56'>56</a>
<a name='L57'></a><a href='#L57'>57</a>
<a name='L58'></a><a href='#L58'>58</a>
<a name='L59'></a><a href='#L59'>59</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<a name='L59'></a><a href='#L59'>59</a>
<a name='L60'></a><a href='#L60'>60</a>
<a name='L61'></a><a href='#L61'>61</a>
<a name='L62'></a><a href='#L62'>62</a>
<a name='L63'></a><a href='#L63'>63</a>
<a name='L64'></a><a href='#L64'>64</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">6x</span>
<span class="cline-any cline-yes">7x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -201,11 +211,6 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
&lt;p&gt;Licitações&lt;/p&gt;
&lt;/Link&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;Link to={'/sobrelicitacao'}&gt;
&lt;p&gt;Sobre as Licitações&lt;/p&gt;
&lt;/Link&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;Link to={'/sobrenos'}&gt;
&lt;p&gt;Sobre a Equipe&lt;/p&gt;
Expand All @@ -216,18 +221,28 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
&lt;p&gt;Dashboard&lt;/p&gt;
&lt;/Link&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div className="horizontal-container"&gt;
&lt;a href='https://x.com/licitabsb'&gt;
&lt;p&gt;Nos siga nas outras redes &lt;/p&gt;
&lt;p&gt; &lt;img src={logoTwitter} width={25}/&gt; &lt;/p&gt;
&lt;/a&gt;
&lt;a href='mailto:unb.licitabsb@gmail.com'&gt;
&lt;p&gt;Fale Conosco&lt;/p&gt;
&lt;img src={logoTeste} width={25}/&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;
Fale Conosco:{' '}
&lt;a
data-testid="link-fale-conosco"
className={styles.mailLink}
href="mailto:unb.licitabsb@gmail.com"
&gt;
unb.licitabsb@gmail.com
&lt;/a&gt;
&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a
data-testid="link-redes-sociais"
target="blank"
href="https://x.com/licitabsb"
&gt;
&lt;p&gt;Nos siga nas outras redes&lt;/p&gt;
&lt;img src={logoTwitter} width={25} /&gt;
&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;img src={logoUnb} /&gt;
Expand All @@ -244,7 +259,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">src/compo
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> src/components/header</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2024-08-10T14:37:28.043Z
at 2024-08-12T12:53:52.075Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit 165fab9

Please sign in to comment.