class Capybara::Poltergeist::Driver
Public Instance Methods
kanye_invited?()
click to toggle source
allows Capybara
to have different behaviors depending on whether the current driver includes Kanye’s algorithm
# File lib/dmc_kanye/imma_let_you_finish.rb, line 6 def kanye_invited? true end
Private Instance Methods
disable_transitions_if_new_page()
click to toggle source
if we are on a new page, run some JavaScript that attempts to disable any JS/CSS transitions that would cause the browser process to get out of sync with the Capbyara test process
# File lib/dmc_kanye/imma_let_you_finish.rb, line 28 def disable_transitions_if_new_page @__current_url = current_url if @__current_url != @__previous_url wait_for_page_to_finish_loading remove_transitions end @__previous_url = @__current_url end
imma_let_you_finish()
click to toggle source
# File lib/dmc_kanye/imma_let_you_finish.rb, line 12 def imma_let_you_finish wait_for_in_progress_ajax_to_finish disable_transitions_if_new_page end
remove_transitions()
click to toggle source
# File lib/dmc_kanye/imma_let_you_finish.rb, line 17 def remove_transitions if DmcKanye::Config.script_to_disable_transitions.present? evaluate_script DmcKanye::Config.script_to_disable_transitions end rescue Capybara::NotSupportedByDriverError false end