Skip to content

Commit

Permalink
test: Adicionar testes unitáiros ao componente campo-pesquisa
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rllon committed Aug 12, 2024
1 parent c534fef commit 3850ed0
Show file tree
Hide file tree
Showing 66 changed files with 179 additions and 139 deletions.
20 changes: 10 additions & 10 deletions frontend/coverage/clover.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<coverage generated="1723502765993" clover="3.2.0">
<project timestamp="1723502765993" name="All files">
<metrics statements="199" coveredstatements="69" conditionals="42" coveredconditionals="14" methods="79" coveredmethods="25" elements="320" coveredelements="108" complexity="0" loc="199" ncloc="199" packages="26" files="34" classes="34"/>
<coverage generated="1723505221051" clover="3.2.0">
<project timestamp="1723505221051" name="All files">
<metrics statements="199" coveredstatements="71" conditionals="42" coveredconditionals="14" methods="79" coveredmethods="27" elements="320" coveredelements="112" complexity="0" loc="199" ncloc="199" packages="26" files="34" classes="34"/>
<package name="src">
<metrics statements="2" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
<file name="main.jsx" path="C:\Users\Pichau\projetos\js_projects\mds2\outra-copia\LicitaBSB-24.1\frontend\src\main.jsx">
Expand All @@ -11,11 +11,11 @@
</file>
</package>
<package name="src.components.campo-pesquisa">
<metrics statements="2" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="0"/>
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<file name="index.jsx" path="C:\Users\Pichau\projetos\js_projects\mds2\outra-copia\LicitaBSB-24.1\frontend\src\components\campo-pesquisa\index.jsx">
<metrics statements="2" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="0"/>
<line num="11" count="0" type="stmt"/>
<line num="21" count="0" type="stmt"/>
<metrics statements="2" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="2"/>
<line num="11" count="3" type="stmt"/>
<line num="21" count="41" type="stmt"/>
</file>
</package>
<package name="src.components.card-licitacoes">
Expand Down Expand Up @@ -48,15 +48,15 @@
<line num="17" count="0" type="stmt"/>
<line num="22" count="0" type="stmt"/>
<line num="25" count="19" type="stmt"/>
<line num="80" count="0" type="stmt"/>
<line num="85" count="9" type="stmt"/>
<line num="79" count="0" type="stmt"/>
<line num="84" count="9" type="stmt"/>
</file>
</package>
<package name="src.components.layout.custom-button">
<metrics statements="1" coveredstatements="1" conditionals="3" coveredconditionals="3" methods="1" coveredmethods="1"/>
<file name="index.jsx" path="C:\Users\Pichau\projetos\js_projects\mds2\outra-copia\LicitaBSB-24.1\frontend\src\components\layout\custom-button\index.jsx">
<metrics statements="1" coveredstatements="1" conditionals="3" coveredconditionals="3" methods="1" coveredmethods="1"/>
<line num="5" count="28" type="stmt"/>
<line num="5" count="31" type="stmt"/>
</file>
</package>
<package name="src.components.layout.custom-input-checkbox">
Expand Down
6 changes: 3 additions & 3 deletions frontend/coverage/coverage-final.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\main.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\main.jsx","statementMap":{"0":{"start":{"line":20,"column":2},"end":{"line":39,"column":4}},"1":{"start":{"line":42,"column":0},"end":{"line":46,"column":2}}},"fnMap":{"0":{"name":"AppRoutes","decl":{"start":{"line":19,"column":9},"end":{"line":19,"column":18}},"loc":{"start":{"line":19,"column":21},"end":{"line":40,"column":1}},"line":19}},"branchMap":{},"s":{"0":0,"1":0},"f":{"0":0},"b":{}}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\campo-pesquisa\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\campo-pesquisa\\index.jsx","statementMap":{"0":{"start":{"line":11,"column":2},"end":{"line":30,"column":4}},"1":{"start":{"line":21,"column":12},"end":{"line":24,"column":14}}},"fnMap":{"0":{"name":"CampoPesquisa","decl":{"start":{"line":6,"column":24},"end":{"line":6,"column":37}},"loc":{"start":{"line":10,"column":3},"end":{"line":31,"column":1}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":20,"column":20},"end":{"line":20,"column":21}},"loc":{"start":{"line":21,"column":12},"end":{"line":24,"column":14}},"line":21}},"branchMap":{},"s":{"0":0,"1":0},"f":{"0":0,"1":0},"b":{}}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\campo-pesquisa\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\campo-pesquisa\\index.jsx","statementMap":{"0":{"start":{"line":11,"column":2},"end":{"line":30,"column":4}},"1":{"start":{"line":21,"column":12},"end":{"line":24,"column":14}}},"fnMap":{"0":{"name":"CampoPesquisa","decl":{"start":{"line":6,"column":24},"end":{"line":6,"column":37}},"loc":{"start":{"line":10,"column":3},"end":{"line":31,"column":1}},"line":10},"1":{"name":"(anonymous_1)","decl":{"start":{"line":20,"column":20},"end":{"line":20,"column":21}},"loc":{"start":{"line":21,"column":12},"end":{"line":24,"column":14}},"line":21}},"branchMap":{},"s":{"0":3,"1":41},"f":{"0":3,"1":41},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"1211f59d4441d0c5d510531ad0987d1998b3f252"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\card-licitacoes\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\card-licitacoes\\index.jsx","statementMap":{"0":{"start":{"line":9,"column":19},"end":{"line":9,"column":32}},"1":{"start":{"line":10,"column":25},"end":{"line":13,"column":3}},"2":{"start":{"line":11,"column":4},"end":{"line":11,"column":39}},"3":{"start":{"line":12,"column":4},"end":{"line":12,"column":16}},"4":{"start":{"line":15,"column":2},"end":{"line":56,"column":4}}},"fnMap":{"0":{"name":"CardLicitacoes","decl":{"start":{"line":8,"column":24},"end":{"line":8,"column":38}},"loc":{"start":{"line":8,"column":49},"end":{"line":57,"column":1}},"line":8},"1":{"name":"(anonymous_1)","decl":{"start":{"line":10,"column":25},"end":{"line":10,"column":26}},"loc":{"start":{"line":10,"column":31},"end":{"line":13,"column":3}},"line":10}},"branchMap":{"0":{"loc":{"start":{"line":27,"column":25},"end":{"line":27,"column":75}},"type":"cond-expr","locations":[{"start":{"line":27,"column":49},"end":{"line":27,"column":70}},{"start":{"line":27,"column":73},"end":{"line":27,"column":75}}],"line":27},"1":{"loc":{"start":{"line":33,"column":11},"end":{"line":37,"column":11}},"type":"binary-expr","locations":[{"start":{"line":33,"column":11},"end":{"line":33,"column":23}},{"start":{"line":34,"column":12},"end":{"line":36,"column":16}}],"line":33}},"s":{"0":7,"1":7,"2":1,"3":1,"4":7},"f":{"0":7,"1":1},"b":{"0":[6,1],"1":[7,7]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"fea680605fb065b5d4d74ace1f0cd8d081269692"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\footer\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\footer\\index.jsx","statementMap":{"0":{"start":{"line":8,"column":15},"end":{"line":61,"column":1}},"1":{"start":{"line":9,"column":2},"end":{"line":60,"column":4}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":15},"end":{"line":8,"column":16}},"loc":{"start":{"line":8,"column":21},"end":{"line":61,"column":1}},"line":8}},"branchMap":{},"s":{"0":1,"1":7},"f":{"0":7},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"af94dcd7c474b341548b30ee623e549da96b7bd1"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\header\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\header\\index.jsx","statementMap":{"0":{"start":{"line":8,"column":15},"end":{"line":134,"column":1}},"1":{"start":{"line":9,"column":19},"end":{"line":9,"column":32}},"2":{"start":{"line":10,"column":28},"end":{"line":10,"column":40}},"3":{"start":{"line":13,"column":4},"end":{"line":13,"column":29}},"4":{"start":{"line":17,"column":23},"end":{"line":21,"column":26}},"5":{"start":{"line":22,"column":4},"end":{"line":22,"column":46}},"6":{"start":{"line":25,"column":2},"end":{"line":133,"column":4}},"7":{"start":{"line":80,"column":31},"end":{"line":80,"column":48}},"8":{"start":{"line":85,"column":33},"end":{"line":85,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":15},"end":{"line":8,"column":16}},"loc":{"start":{"line":8,"column":21},"end":{"line":134,"column":1}},"line":8},"1":{"name":"handdleChange","decl":{"start":{"line":12,"column":11},"end":{"line":12,"column":24}},"loc":{"start":{"line":12,"column":28},"end":{"line":14,"column":3}},"line":12},"2":{"name":"buscarLicitacao","decl":{"start":{"line":16,"column":11},"end":{"line":16,"column":26}},"loc":{"start":{"line":16,"column":29},"end":{"line":23,"column":3}},"line":16},"3":{"name":"(anonymous_3)","decl":{"start":{"line":80,"column":25},"end":{"line":80,"column":26}},"loc":{"start":{"line":80,"column":31},"end":{"line":80,"column":48}},"line":80},"4":{"name":"(anonymous_4)","decl":{"start":{"line":85,"column":26},"end":{"line":85,"column":27}},"loc":{"start":{"line":85,"column":33},"end":{"line":85,"column":49}},"line":85}},"branchMap":{},"s":{"0":1,"1":19,"2":19,"3":9,"4":0,"5":0,"6":19,"7":0,"8":9},"f":{"0":19,"1":9,"2":0,"3":0,"4":9},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"b1b3f875c53e8d1b4cd26d6d0290bf61963e9908"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-button\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-button\\index.jsx","statementMap":{"0":{"start":{"line":5,"column":2},"end":{"line":12,"column":4}}},"fnMap":{"0":{"name":"CustomButton","decl":{"start":{"line":4,"column":24},"end":{"line":4,"column":36}},"loc":{"start":{"line":4,"column":72},"end":{"line":13,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":55},"end":{"line":4,"column":68}},"type":"default-arg","locations":[{"start":{"line":4,"column":63},"end":{"line":4,"column":68}}],"line":4},"1":{"loc":{"start":{"line":7,"column":43},"end":{"line":7,"column":80}},"type":"cond-expr","locations":[{"start":{"line":7,"column":51},"end":{"line":7,"column":75}},{"start":{"line":7,"column":78},"end":{"line":7,"column":80}}],"line":7}},"s":{"0":28},"f":{"0":28},"b":{"0":[14],"1":[14,14]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a6fb9098df23021683f52c6657004f79f103d717"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\header\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\header\\index.jsx","statementMap":{"0":{"start":{"line":8,"column":15},"end":{"line":133,"column":1}},"1":{"start":{"line":9,"column":19},"end":{"line":9,"column":32}},"2":{"start":{"line":10,"column":28},"end":{"line":10,"column":40}},"3":{"start":{"line":13,"column":4},"end":{"line":13,"column":29}},"4":{"start":{"line":17,"column":23},"end":{"line":21,"column":26}},"5":{"start":{"line":22,"column":4},"end":{"line":22,"column":46}},"6":{"start":{"line":25,"column":2},"end":{"line":132,"column":4}},"7":{"start":{"line":79,"column":31},"end":{"line":79,"column":48}},"8":{"start":{"line":84,"column":33},"end":{"line":84,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":8,"column":15},"end":{"line":8,"column":16}},"loc":{"start":{"line":8,"column":21},"end":{"line":133,"column":1}},"line":8},"1":{"name":"handdleChange","decl":{"start":{"line":12,"column":11},"end":{"line":12,"column":24}},"loc":{"start":{"line":12,"column":28},"end":{"line":14,"column":3}},"line":12},"2":{"name":"buscarLicitacao","decl":{"start":{"line":16,"column":11},"end":{"line":16,"column":26}},"loc":{"start":{"line":16,"column":29},"end":{"line":23,"column":3}},"line":16},"3":{"name":"(anonymous_3)","decl":{"start":{"line":79,"column":25},"end":{"line":79,"column":26}},"loc":{"start":{"line":79,"column":31},"end":{"line":79,"column":48}},"line":79},"4":{"name":"(anonymous_4)","decl":{"start":{"line":84,"column":26},"end":{"line":84,"column":27}},"loc":{"start":{"line":84,"column":33},"end":{"line":84,"column":49}},"line":84}},"branchMap":{},"s":{"0":1,"1":19,"2":19,"3":9,"4":0,"5":0,"6":19,"7":0,"8":9},"f":{"0":19,"1":9,"2":0,"3":0,"4":9},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a8d8587b70a452b2d91b71c524ae5cc44d0a6a43"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-button\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-button\\index.jsx","statementMap":{"0":{"start":{"line":5,"column":2},"end":{"line":12,"column":4}}},"fnMap":{"0":{"name":"CustomButton","decl":{"start":{"line":4,"column":24},"end":{"line":4,"column":36}},"loc":{"start":{"line":4,"column":72},"end":{"line":13,"column":1}},"line":4}},"branchMap":{"0":{"loc":{"start":{"line":4,"column":55},"end":{"line":4,"column":68}},"type":"default-arg","locations":[{"start":{"line":4,"column":63},"end":{"line":4,"column":68}}],"line":4},"1":{"loc":{"start":{"line":7,"column":43},"end":{"line":7,"column":80}},"type":"cond-expr","locations":[{"start":{"line":7,"column":51},"end":{"line":7,"column":75}},{"start":{"line":7,"column":78},"end":{"line":7,"column":80}}],"line":7}},"s":{"0":31},"f":{"0":31},"b":{"0":[17],"1":[14,17]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a6fb9098df23021683f52c6657004f79f103d717"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-input-checkbox\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-input-checkbox\\index.jsx","statementMap":{"0":{"start":{"line":5,"column":2},"end":{"line":11,"column":4}}},"fnMap":{"0":{"name":"CustomInputCheckbox","decl":{"start":{"line":4,"column":24},"end":{"line":4,"column":43}},"loc":{"start":{"line":4,"column":74},"end":{"line":12,"column":1}},"line":4}},"branchMap":{},"s":{"0":0},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"1786e6612ac480c218c4156902895f6649bc144a"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-input-radio\\index.jsx": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\layout\\custom-input-radio\\index.jsx","statementMap":{"0":{"start":{"line":5,"column":2},"end":{"line":11,"column":4}}},"fnMap":{"0":{"name":"CustomInputRadio","decl":{"start":{"line":4,"column":24},"end":{"line":4,"column":40}},"loc":{"start":{"line":4,"column":80},"end":{"line":12,"column":1}},"line":4}},"branchMap":{},"s":{"0":28},"f":{"0":28},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"90441ea7fc4b07784c4bbc34ad688f8c1b8c0e1c"}
,"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\newsletter\\Test.js": {"path":"C:\\Users\\Pichau\\projetos\\js_projects\\mds2\\outra-copia\\LicitaBSB-24.1\\frontend\\src\\components\\newsletter\\Test.js","statementMap":{"0":{"start":{"line":3,"column":13},"end":{"line":10,"column":1}},"1":{"start":{"line":5,"column":4},"end":{"line":5,"column":51}},"2":{"start":{"line":7,"column":2},"end":{"line":9,"column":3}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":13},"end":{"line":3,"column":14}},"loc":{"start":{"line":3,"column":19},"end":{"line":10,"column":1}},"line":3}},"branchMap":{},"s":{"0":0,"1":0,"2":0},"f":{"0":0},"b":{}}
Expand Down
32 changes: 16 additions & 16 deletions frontend/coverage/lcov-report/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h1>All files</h1>
<div class='clearfix'>

<div class='fl pad1y space-right2'>
<span class="strong">34.32% </span>
<span class="strong">35.32% </span>
<span class="quiet">Statements</span>
<span class='fraction'>69/201</span>
<span class='fraction'>71/201</span>
</div>


Expand All @@ -37,16 +37,16 @@ <h1>All files</h1>


<div class='fl pad1y space-right2'>
<span class="strong">31.64% </span>
<span class="strong">34.17% </span>
<span class="quiet">Functions</span>
<span class='fraction'>25/79</span>
<span class='fraction'>27/79</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">34.67% </span>
<span class="strong">35.67% </span>
<span class="quiet">Lines</span>
<span class='fraction'>69/199</span>
<span class='fraction'>71/199</span>
</div>


Expand Down Expand Up @@ -94,18 +94,18 @@ <h1>All files</h1>
</tr>

<tr>
<td class="file low" data-value="src/components/campo-pesquisa"><a href="src/components/campo-pesquisa/index.html">src/components/campo-pesquisa</a></td>
<td data-value="0" class="pic low">
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
<td class="file high" data-value="src/components/campo-pesquisa"><a href="src/components/campo-pesquisa/index.html">src/components/campo-pesquisa</a></td>
<td data-value="100" class="pic high">
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="0" class="pct low">0%</td>
<td data-value="2" class="abs low">0/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
</tr>

<tr>
Expand Down Expand Up @@ -476,7 +476,7 @@ <h1>All files</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-12T22:46:05.922Z
at 2024-08-12T23:27:00.988Z
</div>
<script src="prettify.js"></script>
<script>
Expand Down
Loading

0 comments on commit 3850ed0

Please sign in to comment.