1 # http://guides.rubyonrails.org/v3.2.13/performance_testing.html
4 require 'rails/performance_test_help'
5 require 'performance_test_helper'
6 require 'selenium-webdriver'
9 class BrowsingTest < WorkbenchPerformanceTest
10 self.profile_options = { :runs => 5,
11 :metrics => [:wall_time],
12 :output => 'tmp/performance',
16 headless = Headless.new
18 Capybara.current_driver = :selenium
19 Capybara.current_session.driver.browser.manage.window.resize_to(1024, 768)
25 assert_text 'Dashboard'
26 assert_selector 'a', text: 'Run a pipeline'
29 test "search for hash" do
32 assert_text 'Dashboard'
34 within('.navbar-fixed-top') do
35 page.find_field('search').set('hash')
37 page.find('.glyphicon-search').click
40 # In the search dialog now. Expect at least one item in the result display.
41 within '.modal-content' do
43 assert_text 'All projects'
45 assert(page.has_selector?(".selectable[data-object-uuid]"))