Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'features/step_definitions/web_steps.rb')
-rw-r--r--features/step_definitions/web_steps.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/features/step_definitions/web_steps.rb b/features/step_definitions/web_steps.rb
index 4067ad5f4..2c2ca4400 100644
--- a/features/step_definitions/web_steps.rb
+++ b/features/step_definitions/web_steps.rb
@@ -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|
@@ -195,3 +195,8 @@ Then /^I wait until ajax requests finished$/ do
loop until page.evaluate_script("jQuery.active") == 0
end
end
+
+When /^I scroll to "([^"]*)"$/ do |element_id|
+ element = find_by_id(element_id) # rubocop:disable Rails/DynamicFindBy
+ page.scroll_to(element, align: :bottom)
+end