ministryofjustice/hwf-calculator

View on GitHub
test_common/capybara_selectors/previous_question.rb

Summary

Maintainability
A
0 mins
Test Coverage
Capybara.add_selector(:calculator_previous_question) do
  xpath do |locator, _options|
    XPath.generate do |x|
      x.descendant[x.attr(:'data-behavior').equals('calculator_previous_question') &
                   x.child[x.attr(:'data-behavior').equals('question') & x.string.n.is(locator)]]
    end
  end
end