Skip to content

Instantly share code, notes, and snippets.

@ndavis
ndavis / oktaLogin.js
Created November 7, 2019 03:38
Cypress Custom Command for Okta Login
Cypress.Commands.add('loginOkta', () => {
const optionsSessionToken = {
method: 'POST',
url: Cypress.env('session_token_url'),
body: {
username: Cypress.env('username'),
password: Cypress.env('password'),
options: {
warnBeforePasswordExpired: 'true'
}
@Dema
Dema / commands.js
Created October 21, 2019 20:08
Cypress recaptcha command
Cypress.Commands.add("clickRecaptcha", () => {
cy.window().then(win => {
win.document
.querySelector("iframe[src*='recaptcha']")
.contentDocument.getElementById("recaptcha-token")
.click();
});
});
@nickytonline
nickytonline / paste.js
Last active January 25, 2024 06:01
Simulate a paste event in Cypress
/**
* Simulates a paste event.
*
* @param pasteOptions Set of options for a simulated paste event.
* @param pasteOptions.destinationSelector Selector representing the DOM element that the paste event should be dispatched to.
* @param pasteOptions.pastePayload Simulated data that is on the clipboard.
* @param pasteOptions.pasteFormat The format of the simulated paste payload. Default value is 'text'.
*/
function paste({ destinationSelector, pastePayload, pasteType = 'text' }) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event
@AndreiCalazans
AndreiCalazans / airlines.json
Last active August 1, 2023 11:38
List of Airlines 2 letter code
{
"U2": "easyjet",
"1T": "Bulgarian Air Charter",
"Q5": "40-Mile Air",
"4O": "Interjet",
"7A": "Express Air Cargo",
"JY": "Air Turks and Caicos",
"JU": "Air Serbia",
"QH": "Kyrgyzstan",
"A8": "Benin Golf Air",
@potench
potench / gist:b746f1af14413f997964
Created October 13, 2014 21:09
QA Engineer Interview Script

Openers

  • Tell me about your current or last job and role?
  • Are there any specific things you're looking for in your next position?
  • Are you a specialist in any particular area of QA Engineering?
  • Are there any areas of QA Engineering that are of particular interest to you learn?
  • When is a good time for you to be involved in a project? (strategy? early technical analysis? after beta?)
  • What are some common deliverables early on?
  • What factors do you measure to gauge the level of "success" of a project?
  • Your most recent relevant project:
@alexpchin
alexpchin / Setting_upa_new_repo.md
Last active April 25, 2024 15:27
Create a new repository on the command line

Setting up a new Git Repo

##Create a new repository on the command line

touch README.md
git init
git add README.md
git commit -m "first commit"

git remote add origin git@github.com:alexpchin/.git

@prwhite
prwhite / Makefile
Last active May 2, 2024 18:02
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1