Skip to content

Commit

Permalink
#3 Use jest-puppeteer
Browse files Browse the repository at this point in the history
  • Loading branch information
gidztech committed Jan 14, 2019
1 parent b3f7bca commit 01fc503
Show file tree
Hide file tree
Showing 13 changed files with 541 additions and 77 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/da6ed30/src/Extensions.ts#L51">Extensions.ts:51</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L51">Extensions.ts:51</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/da6ed30/src/Extensions.ts#L51">Extensions.ts:51</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L51">Extensions.ts:51</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/da6ed30/src/Extensions.ts#L49">Extensions.ts:49</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L49">Extensions.ts:49</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/da6ed30/src/Extensions.ts#L50">Extensions.ts:50</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L50">Extensions.ts:50</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/da6ed30/src/Extensions.ts#L488">Extensions.ts:488</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L488">Extensions.ts:488</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/da6ed30/src/Extensions.ts#L475">Extensions.ts:475</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L475">Extensions.ts:475</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/da6ed30/src/Extensions.ts#L413">Extensions.ts:413</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L413">Extensions.ts:413</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/da6ed30/src/Extensions.ts#L401">Extensions.ts:401</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L401">Extensions.ts:401</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/da6ed30/src/Extensions.ts#L390">Extensions.ts:390</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L390">Extensions.ts:390</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/da6ed30/src/Extensions.ts#L436">Extensions.ts:436</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L436">Extensions.ts:436</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/da6ed30/src/Extensions.ts#L496">Extensions.ts:496</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L496">Extensions.ts:496</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/da6ed30/src/Extensions.ts#L447">Extensions.ts:447</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L447">Extensions.ts:447</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/da6ed30/src/Extensions.ts#L377">Extensions.ts:377</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L377">Extensions.ts:377</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/da6ed30/src/Extensions.ts#L346">Extensions.ts:346</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L346">Extensions.ts:346</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/da6ed30/src/Extensions.ts#L330">Extensions.ts:330</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L330">Extensions.ts:330</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/da6ed30/src/Extensions.ts#L165">Extensions.ts:165</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L165">Extensions.ts:165</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/da6ed30/src/Extensions.ts#L107">Extensions.ts:107</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L107">Extensions.ts:107</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/da6ed30/src/Extensions.ts#L245">Extensions.ts:245</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L245">Extensions.ts:245</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/da6ed30/src/Extensions.ts#L283">Extensions.ts:283</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L283">Extensions.ts:283</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/da6ed30/src/Extensions.ts#L68">Extensions.ts:68</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L68">Extensions.ts:68</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/da6ed30/src/Extensions.ts#L268">Extensions.ts:268</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L268">Extensions.ts:268</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/da6ed30/src/Extensions.ts#L311">Extensions.ts:311</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L311">Extensions.ts:311</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/da6ed30/src/Extensions.ts#L362">Extensions.ts:362</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L362">Extensions.ts:362</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/da6ed30/src/Extensions.ts#L180">Extensions.ts:180</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L180">Extensions.ts:180</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/da6ed30/src/Extensions.ts#L203">Extensions.ts:203</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L203">Extensions.ts:203</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/da6ed30/src/Extensions.ts#L192">Extensions.ts:192</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L192">Extensions.ts:192</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/da6ed30/src/Extensions.ts#L223">Extensions.ts:223</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/Extensions.ts#L223">Extensions.ts:223</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 HackyDate.ts:2</li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/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 HackyDate.ts:2</li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/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 HackyDate.ts:10</li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/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 @@ -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/da6ed30/src/index.ts#L3">index.ts:3</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/index.ts#L3">index.ts:3</a></li>
</ul>
</aside>
</section>
Expand All @@ -999,7 +999,7 @@ <h3><span class="tsd-flag ts-flagExport assignment">Export assignment</span> ini
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/da6ed30/src/index.ts#L10">index.ts:10</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/index.ts#L10">index.ts:10</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -1032,7 +1032,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/da6ed30/src/external/serialization-utils.ts#L90">external/serialization-utils.ts:90</a></li>
<li>Defined in external/Serialization.ts:90</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 @@ -983,7 +983,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/da6ed30/src/index.ts#L3">index.ts:3</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/index.ts#L3">index.ts:3</a></li>
</ul>
</aside>
</section>
Expand All @@ -1000,7 +1000,7 @@ <h3><span class="tsd-flag ts-flagExport assignment">Export assignment</span> ini
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/da6ed30/src/index.ts#L10">index.ts:10</a></li>
<li>Defined in <a href="https://github.com/HuddleEng/puppeteer-extensions/blob/b3f7bca/src/index.ts#L10">index.ts:10</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/da6ed30/src/external/serialization-utils.ts#L90">external/serialization-utils.ts:90</a></li>
<li>Defined in external/Serialization.ts:90</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
6 changes: 6 additions & 0 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
server: {
command: 'node tests/server.js',
port: 3000
}
};
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
preset: 'jest-puppeteer'
};
Loading

0 comments on commit 01fc503

Please sign in to comment.