Module: GovukRSpecHelpers
- Defined in:
- lib/click_govuk_link.rb,
lib/summarise_matcher.rb,
lib/choose_govuk_radio.rb,
lib/click_govuk_button.rb,
lib/check_govuk_checkbox.rb,
lib/within_govuk_fieldset.rb,
lib/fill_in_govuk_text_field.rb,
lib/summarise_errors_matcher.rb
Defined Under Namespace
Modules: SummariseErrorsMatcher, SummariseMatcher
Classes: ChooseGovukRadio, ClickButton, ClickLink, FillInGovUKTextField, GovukCheckbox, WithinGovukFieldset
Instance Method Summary
collapse
Instance Method Details
#check_govuk_checkbox(label_text, hint: nil) ⇒ Object
155
156
157
|
# File 'lib/check_govuk_checkbox.rb', line 155
def check_govuk_checkbox(label_text, hint: nil)
GovukCheckbox.new(page: page, label_text: label_text, hint_text: hint).check
end
|
#choose_govuk_radio(label_text, hint: nil) ⇒ Object
96
97
98
|
# File 'lib/choose_govuk_radio.rb', line 96
def choose_govuk_radio(label_text, hint: nil)
ChooseGovukRadio.new(page: page, label_text: label_text, hint_text: hint).choose
end
|
102
103
104
|
# File 'lib/click_govuk_button.rb', line 102
def click_govuk_button(button_text, disabled: false)
ClickButton.new(page: page, button_text: button_text, disabled: disabled).click
end
|
#click_govuk_link(link_text) ⇒ Object
102
103
104
|
# File 'lib/click_govuk_link.rb', line 102
def click_govuk_link(link_text)
ClickLink.new(page: page, link_text: link_text).click
end
|
#fill_in_govuk_text_field(label, hint: nil, with:) ⇒ Object
143
144
145
|
# File 'lib/fill_in_govuk_text_field.rb', line 143
def fill_in_govuk_text_field(label, hint: nil, with:)
FillInGovUKTextField.new(page:, label:, hint:, with:).fill_in
end
|
#uncheck_govuk_checkbox(label_text, hint: nil) ⇒ Object
159
160
161
|
# File 'lib/check_govuk_checkbox.rb', line 159
def uncheck_govuk_checkbox(label_text, hint: nil)
GovukCheckbox.new(page: page, label_text: label_text, hint_text: hint).uncheck
end
|
#within_govuk_fieldset(legend_text, hint: nil, &block) ⇒ Object
66
67
68
|
# File 'lib/within_govuk_fieldset.rb', line 66
def within_govuk_fieldset(legend_text, hint: nil, &block)
WithinGovukFieldset.new(page: page, legend_text: legend_text, hint: hint, block: block).within
end
|