Skip to content

Instantly share code, notes, and snippets.

@njenan
njenan / bad_example.feature
Last active June 17, 2017 20:24
BDD Specification with Embedded CSS Selectors and XPAth
Scenario: Log in successfully
Given an existing user
When they type MyUsername into the field with xpath //*[@id="username"]/input
And they type MyPassword into the field with css #password > input
And they click the button with css #login > div.edit.container > div.form-actions > button.btn.btn-default
Then they will see the welcome message
Scenario: Log in - Account does not exist
Given an non-existent user
When they type MyNonExistentUsername into the field with xpath //*[@id="username"]/input
@njenan
njenan / good_example.feature
Created June 17, 2017 20:37
Better BDD Specification with Business Behaviors Defined
Scenario: Log in successfully
Given an existing user
When they authenticate with the system
Then they will see the welcome message
Scenario: Log in - Account does not exist
Given an non-existent user
When they authenticate with the system
Then they will see the user does not exist message
@njenan
njenan / good_catalog_example.feature
Created June 17, 2017 21:51
Example of High Level Catalog Specification
Feature: Manage bookstore catalog
As the owner of the bookstore
I want to add books to the catalog
In order to make all the money
Scenario: Add book to catalog
Given there are 2 books for sale
When I add a new book to the catalog
Then I should see 3 books for sale
@njenan
njenan / bad_catalog_example.feature
Created June 17, 2017 21:54
Example of low level catalog specification
Feature: Manage bookstore catalog
As the owner of the bookstore
I want to add books to the catalog
In order to make all the money
Scenario: Add book to catalog
Given there are 2 books for sale
When I navigate to the add book admin page
And I enter the book information
And I click the submit button
0 info it worked if it ends with ok
1 verbose cli [ '/Users/kiddynamo/.nvm/versions/node/v6.11.0/bin/node',
1 verbose cli '/Users/kiddynamo/.nvm/versions/node/v6.11.0/bin/npm',
1 verbose cli 'install',
1 verbose cli '--save',
1 verbose cli 'expo' ]
2 info using npm@3.10.10
3 info using node@v6.11.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
# Virtual box version
Version 5.1.10 r112026 (Qt5.6.2)
# Packer version
Nathaniels-MBP:virtualbox kiddynamo$ packer --version
1.1.3
# run packer script
Nathaniels-MBP:virtualbox kiddynamo$ packer build -only=virtualbox-iso template.json
virtualbox-iso output will be in this color.
Nathaniels-MBP:virtualbox kiddynamo$ packer build -only=virtualbox-iso template.json
virtualbox-iso output will be in this color.
==> virtualbox-iso: Downloading or copying Guest additions
virtualbox-iso: Downloading or copying: file:///Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso
==> virtualbox-iso: Downloading or copying ISO
virtualbox-iso: Found already downloaded, initial checksum matched, no download needed: http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/11.1/FreeBSD-11.1-RELEASE-amd64-disc1.iso
==> virtualbox-iso: Starting HTTP server on port 8340
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
@njenan
njenan / .vimrc
Last active April 24, 2020 00:33
vimrc
set rtp+=/usr/local/opt/fzf
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/goyo.vim'
Plug 'Valloric/YouCompleteMe'
Plug 'SirVer/ultisnips'
set smoothscroll
map ; :
PROMPT="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} ⚓️ %F{002}$(kubectl config current-context 2>/dev/null)/$(kubens -c 2>/dev/null)%{$reset_color%} $(git_prompt_info)'