Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Given When Then steps
Co-authored-by: Bashir Towdiee <towdiee.bashir@gmail.com> Co-authored-by: Brenton Annan <brentonannan@brentonannan.com> Co-authored-by: Caitlin Palmer-Bright <caitlin.palmer-bright@tworedkites.com> Co-authored-by: Cameo Langford <hello@cameocodes.com> Co-authored-by: Dana Scheider <dana.scheider@gmail.com> Co-authored-by: Eathan Langford <eathanlangford@gmail.com> Co-authored-by: Emily Coats <ec@emilycoats.net> Co-authored-by: Emma Park <emma.park@envato.com> Co-authored-by: Erin Belot <erinbelot@gmail.com> Co-authored-by: Geoffrey Donaldson <geoffreyd@gmail.com> Co-authored-by: Isikyus <isikyus@users.noreply.github.com> Co-authored-by: James Martelletti <james@martelletti.com.au> Co-authored-by: Jess Brown <noiselessdwindle@gmail.com> Co-authored-by: Jon Leighton <j@jonathanleighton.com> Co-authored-by: Keith Pitty <keith@keithpitty.com> Co-authored-by: Kirsten Comandich <kcomandich@gmail.com> Co-authored-by: Laurence Dibah <laurencedibah@gmail.com> Co-authored-by: Matt Patterson <matt.patterson94@gmail.com> Co-authored-by: Michael Morris <mtcmorris@gmail.com> Co-authored-by: Nadia Vu <winter.nga@gmail.com> Co-authored-by: Nick Wolf <git@nickwolf.com.au> Co-authored-by: Paul Douglas <pdouglas@ssi.org.au> Co-authored-by: Rob Jacoby <robert.jacoby@cultureamp.com> Co-authored-by: Selena Small <selenawiththetattoo@gmail.com> Co-authored-by: Sonya Corcoran <sonyacorcoran@gmail.com> Co-authored-by: Tim Lucas <t@toolmantim.com> Co-authored-by: Chris Aitchison <cmaitchison@gmail.com>
- Loading branch information
1 parent
74154c0
commit 479aa0d
Showing
7 changed files
with
97 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Co-authored-by: Bashir Towdiee <towdiee.bashir@gmail.com> | ||
Co-authored-by: Brenton Annan <brentonannan@brentonannan.com> | ||
Co-authored-by: Caitlin Palmer-Bright <caitlin.palmer-bright@tworedkites.com> | ||
Co-authored-by: Cameo Langford <hello@cameocodes.com> | ||
Co-authored-by: Dana Scheider <dana.scheider@gmail.com> | ||
Co-authored-by: Eathan Langford <eathanlangford@gmail.com> | ||
Co-authored-by: Emily Coats <ec@emilycoats.net> | ||
Co-authored-by: Emma Park <emma.park@envato.com> | ||
Co-authored-by: Erin Belot <erinbelot@gmail.com> | ||
Co-authored-by: Geoffrey Donaldson <geoffreyd@gmail.com> | ||
Co-authored-by: Isikyus <isikyus@users.noreply.github.com> | ||
Co-authored-by: James Martelletti <james@martelletti.com.au> | ||
Co-authored-by: Jess Brown <noiselessdwindle@gmail.com> | ||
Co-authored-by: Jon Leighton <j@jonathanleighton.com> | ||
Co-authored-by: Keith Pitty <keith@keithpitty.com> | ||
Co-authored-by: Kirsten Comandich <kcomandich@gmail.com> | ||
Co-authored-by: Laurence Dibah <laurencedibah@gmail.com> | ||
Co-authored-by: Matt Patterson <matt.patterson94@gmail.com> | ||
Co-authored-by: Michael Morris <mtcmorris@gmail.com> | ||
Co-authored-by: Nadia Vu <winter.nga@gmail.com> | ||
Co-authored-by: Nick Wolf <git@nickwolf.com.au> | ||
Co-authored-by: Paul Douglas <pdouglas@ssi.org.au> | ||
Co-authored-by: Rob Jacoby <robert.jacoby@cultureamp.com> | ||
Co-authored-by: Selena Small <selenawiththetattoo@gmail.com> | ||
Co-authored-by: Sonya Corcoran <sonyacorcoran@gmail.com> | ||
Co-authored-by: Tim Lucas <t@toolmantim.com> | ||
Co-authored-by: Chris Aitchison <cmaitchison@gmail.com> |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module PageFragments | ||
Page = Struct.new :rspec_example do | ||
alias_method :browser, :rspec_example # Capybara DSL + rspec example context | ||
end | ||
|
||
def classify(string) | ||
string.to_s.split('_').map(&:capitalize).join | ||
end | ||
|
||
def focus_on(*args) | ||
require File.join( | ||
__dir__, | ||
'page_fragments', | ||
args.map(&:to_s) | ||
) | ||
mod = args.inject(PageFragments) do |klass, sub_klass| | ||
klass.const_get(classify(sub_klass)) | ||
end | ||
page = Page.new(self).extend(mod) | ||
yield page if block_given? | ||
page | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module PageFragments | ||
module Welcome | ||
def start_game | ||
browser.find('[data-start-button]').click | ||
end | ||
end | ||
end |