From 5e5af5cceeebca284a19f3c3fd2831da1909a183 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Fri, 21 Feb 2014 18:15:14 -0800 Subject: [PATCH] Remove selenium acceptance tests --- SELENIUM.md | 28 ------------------- .../selenium/dashboard_reports_tab_spec.rb | 26 ----------------- acceptance/selenium/spec_helper.rb | 26 ----------------- 3 files changed, 80 deletions(-) delete mode 100644 SELENIUM.md delete mode 100644 acceptance/selenium/dashboard_reports_tab_spec.rb delete mode 100644 acceptance/selenium/spec_helper.rb diff --git a/SELENIUM.md b/SELENIUM.md deleted file mode 100644 index 99c8c91bd..000000000 --- a/SELENIUM.md +++ /dev/null @@ -1,28 +0,0 @@ -How to run the Selenium acceptance tests -======================================== - -INTRODUCTION - -This document describes the process of running the Selenium acceptance tests -locally. Running the tests remotely (e.g. on a virtual machine) is also -possible, but beyond the scope of this document. - -See http://seleniumhq.org/docs/ for more details. - -PREREQUISITES - -- You must have an instance of Dashboard running -- You must have the selenium-webdriver gem installed - -STEPS - -To run the Selenium acceptance tests, do the following: - -1. Edit DASHBOARD_ROOT/acceptance/selenium/spec_helper.rb - - - Change $DASHBOARD_BASE_URL to the URL where your instance of Dashboard is - running - - - Change $DRIVER to the browser you want to use for your tests - -2. Run `spec acceptance/selenium/` diff --git a/acceptance/selenium/dashboard_reports_tab_spec.rb b/acceptance/selenium/dashboard_reports_tab_spec.rb deleted file mode 100644 index 69368003b..000000000 --- a/acceptance/selenium/dashboard_reports_tab_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require "./acceptance/selenium/spec_helper.rb" - -describe "the Dashboard Reports tab" do - let(:browser) { get_web_driver } - let(:menu) { browser.find_element(:css => "div#header ul.navigation") } - - after :all do - browser.quit - end - - describe 'reports menu item' do - it 'should exist' do - reports_link = browser.find_element(:link => "Reports") - reports_link.should be_displayed - end - end - - describe 'reports table' do - it 'should allow status icons to be displayed with a graphical tooltip' do - reports_link = browser.find_element(:link => "Reports") - browser.action.click(reports_link).perform - browser.find_element(:css => "table.inspector.main").should be_true - end - end - -end diff --git a/acceptance/selenium/spec_helper.rb b/acceptance/selenium/spec_helper.rb deleted file mode 100644 index 41e7e89cb..000000000 --- a/acceptance/selenium/spec_helper.rb +++ /dev/null @@ -1,26 +0,0 @@ -require "rubygems" -require "selenium-webdriver" - -$DASHBOARD_BASE_URL = "http://localhost:3000/" -$HEADLESS_DISPLAY = nil #"localhost:15.0" - -# Choose from :ie, :internet_explorer, :remote, :chrome, :firefox, :ff, :android, :iphone, :opera -$DRIVER = :firefox - -$DRIVER_IMPLICIT_WAIT = 10 - -# Used only when $DRIVER == :remote. -$DRIVER_HUB_URL = "http://192.168.100.228:4444/wd/hub" -$DRIVER_CAPABILITIES = Selenium::WebDriver::Remote::Capabilities.firefox - -def get_web_driver() - if $DRIVER == :remote - driver = Selenium::WebDriver.for(:remote, :url => $DRIVER_HUB_URL, :desired_capabilities => $DRIVER_CAPABILITIES) - else - ENV["DISPLAY"] = $HEADLESS_DISPLAY if $HEADLESS_DISPLAY - driver = Selenium::WebDriver.for($DRIVER) - end - driver.manage.timeouts.implicit_wait = $DRIVER_IMPLICIT_WAIT - driver.navigate.to $DASHBOARD_BASE_URL - driver -end