Sha256: 1e88c3472ec721374cca99b5a1c321c980f4345d798712e05907b27566017167

Contents?: true

Size: 445 Bytes

Versions: 6

Compression:

Stored size: 445 Bytes

Contents

within_reg = /\A\s*(.*)?\s*(?:["|'](.*?)["|'])?\s*\Z/

Transform(/(within .*)$/) do |within_info|
  splitted = within_info.split('within').reject(&:blank?)


  splitted.reverse_each.inject(page) do |within, info|
    captures = Helpers::Regex::WITHIN.match(info).captures
    el_alias = captures[0]
    locator = captures[1]

    Waiter.wait do
      within = Pickles.detect_node(el_alias, locator, within: within)
    end

    within
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pickles-0.1.10 lib/cucumber/pickles/transform.rb
pickles-0.1.9 lib/cucumber/pickles/transform.rb
pickles-0.1.8 lib/cucumber/pickles/transform.rb
pickles-0.1.7 lib/cucumber/pickles/transform.rb
pickles-0.1.6 lib/cucumber/pickles/transform.rb
pickles-0.1.5 lib/cucumber/pickles/transform.rb