Skip to content

Instantly share code, notes, and snippets.

View DavidVII's full-sized avatar
👨‍💻
Having fun with SwiftUI

David Becerra DavidVII

👨‍💻
Having fun with SwiftUI
View GitHub Profile
@DavidVII
DavidVII / .bash_profile
Created August 2, 2017 16:27 — forked from JeffreyWay/.bash_profile
Prettier git logs
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
t = 236 # seconds
Time.at(t).utc.strftime("%H:%M:%S")
=> "00:03:56"
# Reference
# http://stackoverflow.com/questions/3963930/ruby-rails-how-to-convert-seconds-to-time
# Navigating
visit('/projects')
visit(post_comments_path(post))
# Clicking links and buttons
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

Capybara

save_and_open_page

Matchers

have_button(locator)