# Cloning repo
git clone https://github.com/igorshubovych/cypress-workshop
# Installing dependencies
cd cypress-workshop
This file contains hidden or 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
<html> | |
<head> | |
<title>Test page</title> | |
</head> | |
<body> | |
<h1>Test page</h1> | |
<script type="text/javascript"> | |
console.log('%cWe' + ' %care' + ' %chiring', |
This file contains hidden or 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
var items = $('p > span.r_button_small a'); | |
for (var i = 0, a=[]; i< items.length; i++) { | |
let item = items[i]; | |
if (item.href && item.href.includes && item.href.includes('load')) { | |
a.push(item.href); | |
} | |
} | |
console.log(a); |
This file contains hidden or 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
async function test () { | |
return 'Testing async functions' | |
} | |
test().then(val => console.log(val)) |
This file contains hidden or 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
// Factorial | |
// n | |
// 1 * 2 * 3 * ... * (n-1) * n | |
const n = 7; | |
let fact = 1; | |
for (let i = 1; i <= n; i++) { | |
fact = fact * i; |
This file contains hidden or 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
HappyPath { | |
testLogin() { | |
const loginPage = new LoginPage(); | |
loginPage.getEditBox().set('sdhj'); | |
loginPage.pressSubmitButton(); | |
} | |
} |
This file contains hidden or 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
#!/bin/bash | |
brew cask outdated | xargs brew cask reinstall --force |
This file contains hidden or 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
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
This file contains hidden or 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
#!/bin/bash | |
## See the script here | |
## https://www.josean.com/posts/7-amazing-cli-tools | |
## Requirements | |
## - bat (https://github.com/sharkdp/bat) | |
## - fzf (https://github.com/junegunn/fzf) | |
bat --list-themes | fzf --preview="bat --theme={} --color=always /path/to/file" |
OlderNewer