End of day commit
This commit is contained in:
@@ -65,6 +65,16 @@ module SpecEmberHelpers
|
||||
def js_click(selector)
|
||||
find selector
|
||||
page.execute_script "$('#{selector}').click()"
|
||||
|
||||
# Wait for jQuery activity to finish
|
||||
wait_cycles = 0
|
||||
active_count = page.evaluate_script '$.active'
|
||||
while active_count > 0 and wait_cycles < 30
|
||||
sleep 0.1
|
||||
active_count = page.evaluate_script '$.active'
|
||||
wait_cycles += 1
|
||||
end
|
||||
raise "There are still active jQuery tasks" if active_count > 0
|
||||
end
|
||||
|
||||
def js_text(selector)
|
||||
|
||||
Reference in New Issue
Block a user