-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* instagram & core botactions/helpers - viewStories - instagram navigation botactions - instagram save your login info UX botactions - elementExistsInDocument & textExistsInDocument helpers - elementExists, textExists botactions * bug fix - edge case for no element found in $ botaction #102 * clickText * clickElementWithText helper * fix #102 $$ multiple elements scraping - undefined edge case will not attempt to parse undefine but return undefined * botactions getCookies & deleteCookies & instagram logout - used in tandem in a pipe to delete cookies for urls associated with a browser page - this in replace of deleteAllCookiesForCurrentUrl BotAction * instagram logout * deleteIndexedDB by database name * e2e test $() for not finding html node - edge-case behavior modified -> originally threw error, now returns undefined * e2e test textExists & elementExists * e2e clickText - ignore serialized code injected into puppeteer, covered by e2e * e2e clickText edge-case * integration test getCookies * integration test deleteCookies * e2e cookies testing * rollDice()() BotAction #85 - run assembled botactions if a virtual dice with X sides rolls a 1 - number of sides X is set via HO param, default is 1 - number to roll can be set via 2nd HO param, default is 1 * helper diceRoll() unit-test - added edge-case for dice with zero or negative number of sides which on roll, returns 0 * probably() botaction - new established BotAction group: Random - randomDecimal helper using pseudo Math.random() - rollDice() has probability limitation of no probabilities greater than 50% therefore need another botaction - rollDice()() uses probably()() - randomDiceRoll() helper similar to randomDecimal() helper * added ability to override random decimal function - if prefer not pseudo random ie random derived via buffer/crypto then set your own function in the helper - probably()() HO 2nd param (optional) to override random number generator - instead of using pseudo random number generating, use a buffer/crypto/other * randomDecimal HO injector for overriding the default pseudo random generating function * not going to force pipe() on randomDecimal()() injector - similar to files()(), because indexedDB has botactions that rely on piping, and the context might be a chain, so with that you want to enforce pipe because it makes sense (however arugably oppose it can be said) * unit & integration tests - BotActions group Random: randomDecimal()(), rollDice()(), probably()() * random botactions test coverage * indexed-db e2e testing * house cleaning * code smells * Nullish Assignment * simplify goTo implementation * readmes updated * consolidated instagram URL helpers into simpler constants * fix instagram barrel + desktop widths * new published minor versions for core and instagram pckgs - instagram reference latest core pckg
- Loading branch information
Showing
41 changed files
with
917 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Testing: Cookies | ||
</title> | ||
<script type="text/javascript"> | ||
document.cookie = "username=John Doe"; | ||
document.cookie = "sessionId=1235711" | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Cookies Page</h1> | ||
<aside> | ||
<ul> | ||
<li> | ||
<a href="/index.html" class="home-link">Home Link</a> | ||
</li> | ||
<li> | ||
<a href="/example.html" class="example-link">Example Link</a> | ||
</li> | ||
<li> | ||
<a href="/example2.html" class="example-link">Example Link 2</a> | ||
</li> | ||
</ul> | ||
</aside> | ||
<section> | ||
<form action="/success.html"> | ||
<input type="text" name="answer" /> | ||
<button type="submit"> | ||
Click Me! | ||
</button> | ||
</form> | ||
</section> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Testing: IndexedDB</title> | ||
<script type="text/javascript"> | ||
const databaseName = 'MyTestDatabase'; | ||
const databaseName2 = 'MySecondDatabase'; | ||
const databaseVersion = undefined; | ||
const storeName = 'TestObjectStore'; | ||
const key = 'TestKey'; | ||
const value = 'TestValue234'; | ||
|
||
const openRequest = indexedDB.open(databaseName, databaseVersion); | ||
|
||
openRequest.onerror = function(ev) { | ||
ev.stopPropagation(); | ||
console.error(openRequest.error); | ||
} | ||
|
||
openRequest.onupgradeneeded = function(ev) { | ||
if (!openRequest.result.objectStoreNames.contains(storeName)) { | ||
openRequest.result.createObjectStore(storeName); | ||
} | ||
} | ||
|
||
openRequest.onsuccess = function(ev) { | ||
const db = openRequest.result; | ||
|
||
try { | ||
db.transaction(storeName, 'readwrite') | ||
.objectStore(storeName) | ||
.put(value, key) | ||
.onsuccess = function() { | ||
db.close(); | ||
} | ||
} catch (error) { | ||
db.close(); | ||
} | ||
} | ||
|
||
const openRequest2 = indexedDB.open(databaseName2); | ||
|
||
openRequest2.onerror = function(ev) { | ||
ev.stopPropagation(); | ||
console.error(openRequest2.error); | ||
} | ||
|
||
openRequest2.onupgradeneeded = function(ev) { | ||
if (!openRequest2.result.objectStoreNames.contains(storeName)) { | ||
openRequest2.result.createObjectStore(storeName); | ||
} | ||
} | ||
|
||
openRequest2.onsuccess = function(ev) { | ||
const db = openRequest2.result; | ||
|
||
try { | ||
db.transaction(storeName, 'readwrite') | ||
.objectStore(storeName) | ||
.put(value, key) | ||
.onsuccess = function() { | ||
db.close(); | ||
} | ||
} catch (error) { | ||
db.close(); | ||
} | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<h1>IndexedDB</h1> | ||
<ul> | ||
<li>DB name: MyTestDatabase</li> | ||
<li>Store name: TestObjectStore</li> | ||
<li>Key: TestKey</li> | ||
<li>Key Value: TestValue234</li> | ||
</ul> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ export const givenThat = | |
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.