class Smokes::TestsLoader

This class loads all the tests

Public Class Methods

new(url, selected_tests, config_variables) click to toggle source
# File lib/smokes/tests_loader.rb, line 6
def initialize(url, selected_tests, config_variables)
  @url = url
  @selected_tests = selected_tests
  @config_variables = config_variables
  start_browser
end

Public Instance Methods

run() click to toggle source
# File lib/smokes/tests_loader.rb, line 13
def run
  @browser.get @url
  itirate_tests
end

Private Instance Methods

itirate_tests() click to toggle source
# File lib/smokes/tests_loader.rb, line 25
def itirate_tests
  @selected_tests.each do |selected_test|
    filename = "smokes/#{selected_test}.smoke"
    Smokes::TestParser.new(filename, @browser, @wait).run
  end
end
start_browser() click to toggle source
# File lib/smokes/tests_loader.rb, line 20
def start_browser
  @browser = Selenium::WebDriver.for @config_variables[:browser].to_sym
  @wait = Selenium::WebDriver::Wait.new(timeout: @config_variables[:wait_time_out])
end