X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/218205efcb2ff827768ba5da521e41424d5755f8..0561bd0c3c07257fd58ded6c7cfa5feeae97af57:/apps/workbench/test/performance/browsing_test.rb diff --git a/apps/workbench/test/performance/browsing_test.rb b/apps/workbench/test/performance/browsing_test.rb index ec299e2955..ab1ace6f0d 100644 --- a/apps/workbench/test/performance/browsing_test.rb +++ b/apps/workbench/test/performance/browsing_test.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + # http://guides.rubyonrails.org/v3.2.13/performance_testing.html require 'test_helper' @@ -13,36 +17,34 @@ class BrowsingTest < WorkbenchPerformanceTest :formats => [:flat] } setup do - headless = Headless.new - headless.start - Capybara.current_driver = :selenium - Capybara.current_session.driver.browser.manage.window.resize_to(1024, 768) + need_javascript end test "home page" do visit_page_with_token - wait_for_ajax assert_text 'Dashboard' - assert_selector 'a', text: 'Run a pipeline' + assert_selector 'a', text: 'Run a process' end test "search for hash" do visit_page_with_token - wait_for_ajax assert_text 'Dashboard' - within('.navbar-fixed-top') do - page.find_field('search').set('hash') - wait_for_ajax - page.find('.glyphicon-search').click + assert_selector '.navbar-fixed-top' + assert_triggers_dom_event 'shown.bs.modal' do + within '.navbar-fixed-top' do + find_field('search').set 'hash' + find('.glyphicon-search').click + end end + sleep(50) + # In the search dialog now. Expect at least one item in the result display. within '.modal-content' do - wait_for_ajax assert_text 'All projects' assert_text 'Search' - assert(page.has_selector?(".selectable[data-object-uuid]")) + assert_selector '.selectable[data-object-uuid]' click_button 'Cancel' end end