Replace "evaluate_script" for toggling a Bootstrap switch in spec
This commit is contained in:
parent
637dad208a
commit
d14036b630
1 changed files with 2 additions and 2 deletions
|
|
@ -170,8 +170,8 @@ Then /^the "([^"]*)" bootstrap-switch should be (on|off)$/ do |label, state|
|
|||
end
|
||||
end
|
||||
|
||||
Then /^I toggle the "([^"]*)" bootstrap-switch$/ do |label|
|
||||
page.execute_script("return $('#{label}').bootstrapSwitch('toggleState')")
|
||||
Then /^I toggle the "#([^"]*)" bootstrap-switch$/ do |id|
|
||||
find(".bootstrap-switch-id-#{id}").click
|
||||
end
|
||||
|
||||
Then /^(?:|I )should be on (.+)$/ do |page_name|
|
||||
|
|
|
|||
Loading…
Reference in a new issue