Last active
October 29, 2018 12:43
-
-
Save ElMassimo/d04b19be507c2d5ab40473c86a201103 to your computer and use it in GitHub Desktop.
Capybara Test Helper - Snippet for Sublime Text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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