Skip to content

Commit

Permalink
#3 Add tests for Utils
Browse files Browse the repository at this point in the history
  • Loading branch information
gidztech committed Jan 16, 2019
1 parent be6b973 commit 12f80ed
Show file tree
Hide file tree
Showing 8 changed files with 173 additions and 82 deletions.
54 changes: 27 additions & 27 deletions docs/classes/extensions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L51">Extensions.ts:51</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L9">Extensions.ts:9</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1105,7 +1105,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> default<wbr>Timeout</h3
<div class="tsd-signature tsd-kind-icon">default<wbr>Timeout<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L51">Extensions.ts:51</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L9">Extensions.ts:9</a></li>
</ul>
</aside>
</section>
Expand All @@ -1115,7 +1115,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> puppeteer<wbr>Page</h3>
<div class="tsd-signature tsd-kind-icon">puppeteer<wbr>Page<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Page</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L49">Extensions.ts:49</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L7">Extensions.ts:7</a></li>
</ul>
</aside>
</section>
Expand All @@ -1125,7 +1125,7 @@ <h3><span class="tsd-flag ts-flagPrivate">Private</span> resource<wbr>Requests</
<div class="tsd-signature tsd-kind-icon">resource<wbr>Requests<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Request</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> =&nbsp;[]</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L50">Extensions.ts:50</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L8">Extensions.ts:8</a></li>
</ul>
</aside>
</section>
Expand All @@ -1142,7 +1142,7 @@ <h3>evaluate</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L488">Extensions.ts:488</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L446">Extensions.ts:446</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1191,7 +1191,7 @@ <h3>fast<wbr>Forward<wbr>Time</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L475">Extensions.ts:475</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L433">Extensions.ts:433</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1222,7 +1222,7 @@ <h3>get<wbr>Property<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L413">Extensions.ts:413</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L371">Extensions.ts:371</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1262,7 +1262,7 @@ <h3>get<wbr>Text</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L401">Extensions.ts:401</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L359">Extensions.ts:359</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1296,7 +1296,7 @@ <h3>get<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L390">Extensions.ts:390</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L348">Extensions.ts:348</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1330,7 +1330,7 @@ <h3>is<wbr>Element<wbr>Focused</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L436">Extensions.ts:436</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L394">Extensions.ts:394</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1364,7 +1364,7 @@ <h3>reset<wbr>Resource<wbr>Requests</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L496">Extensions.ts:496</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L454">Extensions.ts:454</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1386,7 +1386,7 @@ <h3>turn<wbr>Off<wbr>Animations</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L447">Extensions.ts:447</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L405">Extensions.ts:405</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand All @@ -1408,7 +1408,7 @@ <h3>wait<wbr>For</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L377">Extensions.ts:377</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L335">Extensions.ts:335</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1439,7 +1439,7 @@ <h3>wait<wbr>For<wbr>Document<wbr>Title</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L346">Extensions.ts:346</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L304">Extensions.ts:304</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1470,7 +1470,7 @@ <h3>wait<wbr>For<wbr>Element<wbr>Count</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L330">Extensions.ts:330</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L288">Extensions.ts:288</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1507,7 +1507,7 @@ <h3>wait<wbr>For<wbr>Function</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L165">Extensions.ts:165</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L123">Extensions.ts:123</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1567,7 +1567,7 @@ <h3>wait<wbr>For<wbr>Loaded<wbr>Web<wbr>Font<wbr>Count<wbr>ToBe</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L107">Extensions.ts:107</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L65">Extensions.ts:65</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1604,7 +1604,7 @@ <h3>wait<wbr>For<wbr>Nth<wbr>Selector<wbr>Attribute</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L245">Extensions.ts:245</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L203">Extensions.ts:203</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1647,7 +1647,7 @@ <h3>wait<wbr>For<wbr>Nth<wbr>Selector<wbr>Attribute<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L283">Extensions.ts:283</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L241">Extensions.ts:241</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1696,7 +1696,7 @@ <h3>wait<wbr>For<wbr>Resource</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L68">Extensions.ts:68</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L26">Extensions.ts:26</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1733,7 +1733,7 @@ <h3>wait<wbr>For<wbr>Selector<wbr>Attribute</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L268">Extensions.ts:268</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L226">Extensions.ts:226</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1770,7 +1770,7 @@ <h3>wait<wbr>For<wbr>Selector<wbr>Attribute<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L311">Extensions.ts:311</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L269">Extensions.ts:269</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1813,7 +1813,7 @@ <h3>wait<wbr>For<wbr>Url</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L362">Extensions.ts:362</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L320">Extensions.ts:320</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1844,7 +1844,7 @@ <h3>wait<wbr>Until<wbr>Exists<wbr>And<wbr>Visible</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L180">Extensions.ts:180</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L138">Extensions.ts:138</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1880,7 +1880,7 @@ <h3>wait<wbr>Until<wbr>Selector<wbr>Has<wbr>Visible<wbr>Content</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L203">Extensions.ts:203</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L161">Extensions.ts:161</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1911,7 +1911,7 @@ <h3>wait<wbr>While<wbr>Exists<wbr>And<wbr>Visible</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L192">Extensions.ts:192</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L150">Extensions.ts:150</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1947,7 +1947,7 @@ <h3>wait<wbr>While<wbr>Selector<wbr>Has<wbr>Visible<wbr>Content</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/Extensions.ts#L223">Extensions.ts:223</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/Extensions.ts#L181">Extensions.ts:181</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
6 changes: 3 additions & 3 deletions docs/classes/hackydate.html
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ <h3>constructor</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/HackyDate.ts#L2">HackyDate.ts:2</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/HackyDate.ts#L2">HackyDate.ts:2</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1006,7 +1006,7 @@ <h3>date</h3>
<div class="tsd-signature tsd-kind-icon">date<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Date</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/HackyDate.ts#L2">HackyDate.ts:2</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/HackyDate.ts#L2">HackyDate.ts:2</a></li>
</ul>
</aside>
</section>
Expand All @@ -1023,7 +1023,7 @@ <h3>now</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/HackyDate.ts#L10">HackyDate.ts:10</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/HackyDate.ts#L10">HackyDate.ts:10</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
Expand Down
6 changes: 3 additions & 3 deletions docs/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> DEFAULT_<wbr>TIMEOUT_<wbr>M
<div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>TIMEOUT_<wbr>MS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;5000</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/index.ts#L4">index.ts:4</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/index.ts#L4">index.ts:4</a></li>
</ul>
</aside>
</section>
Expand All @@ -998,7 +998,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> <span class="tsd-flag ts-fl
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/index.ts#L11">index.ts:11</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/index.ts#L11">index.ts:11</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1033,7 +1033,7 @@ <h3>serialize<wbr>Function<wbr>With<wbr>Args</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/external/Serialization.ts#L90">external/Serialization.ts:90</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/external/Serialization.ts#L90">external/Serialization.ts:90</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> DEFAULT_<wbr>TIMEOUT_<wbr>M
<div class="tsd-signature tsd-kind-icon">DEFAULT_<wbr>TIMEOUT_<wbr>MS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> =&nbsp;5000</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/index.ts#L4">index.ts:4</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/index.ts#L4">index.ts:4</a></li>
</ul>
</aside>
</section>
Expand All @@ -999,7 +999,7 @@ <h3><span class="tsd-flag ts-flagConst">Const</span> <span class="tsd-flag ts-fl
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/index.ts#L11">index.ts:11</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/index.ts#L11">index.ts:11</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1034,7 +1034,7 @@ <h3>serialize<wbr>Function<wbr>With<wbr>Args</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/f363b6a/src/external/Serialization.ts#L90">external/Serialization.ts:90</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/be6b973/src/external/Serialization.ts#L90">external/Serialization.ts:90</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
3 changes: 0 additions & 3 deletions src/Extensions.spec.ts

This file was deleted.

Loading

0 comments on commit 12f80ed

Please sign in to comment.