Skip to content

Instantly share code, notes, and snippets.

@jfroom
jfroom / test.rb
Last active March 16, 2017 17:47
capybara selenium ':nth-of-type' selector
# Notice use of ':nth-of-type(idx)' in combination with has_css?(css, text: '...').
# Similar to a jquery equivalent of $('td:eq(3)').
# Notice it's a 1 based index for :nth-of-type (not 0).
# In the past I think we were comparing element.text == '...' when iterating/targeting a css index like a specific TD.
# The advantage here is a leveraging capybara's built in 'wait'.
# https://github.com/teamcapybara/capybara/issues/1109
# Gems
# - selenium-webdriver (3.0.7)
# - capybara (2.12.0)
# - nokogiri (>= 1.3.3)
@jfroom
jfroom / 1-Dockerfile
Last active March 15, 2017 20:48
DC-Selenium
# ./Dockerfile
FROM ruby:2.3-slim
RUN apt-get update && apt-get install -qq -y --no-install-recommends \
build-essential nodejs
# Ensure that our apt package list is updated and install a few
# packages to ensure that we can compile assets (nodejs).
RUN mkdir -p /app
@jfroom
jfroom / 1-Dockerfile
Created March 15, 2017 22:03
DC-Bundler
FROM ruby:2.3-slim
RUN apt-get update && apt-get install -qq -y --no-install-recommends build-essential
# Ensure that our apt package list is updated and has basic build packages.
RUN mkdir -p /app
WORKDIR /app
COPY . .
# Add app files into docker image
@jfroom
jfroom / list.md
Last active July 31, 2024 13:29
List of Front-end Job Interview Questions & Take Home Assignments / Tests / Homework