Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Capybara Test Helper - Snippet for Sublime Text
<snippet>
<content><![CDATA[
# frozen_string_literal: true
class $1TestHelper < CapybaraTestHelper
# Selectors: Semantic aliases for elements, a very useful abstraction.
SELECTORS = {$2}
# Getters: A convenient way to get related data or nested elements.
$3
# Actions: Encapsulate complex actions to provide a cleaner interface.
$4
# Assertions: Allow to check on element properties while keeping it DRY.
$5
# Background: Helpers to add/modify/delete data in the database or session.
$6
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>testhelper</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.ruby</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.