From be9aa5ea05f7831305881ad1eaeffc9730fe899f Mon Sep 17 00:00:00 2001 From: Hagen Schink Date: Tue, 7 Oct 2014 14:16:43 +0200 Subject: [PATCH] Fix spec The spec should actually test closing of the context menu via ESC key. Because of an error in the angular context menu implementation, the expected behavior wasn't implemented initially. --- .../work_packages/work_package_query_spec.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/spec/features/accessibility/work_packages/work_package_query_spec.rb b/spec/features/accessibility/work_packages/work_package_query_spec.rb index 9e630277bc..e7259794f3 100644 --- a/spec/features/accessibility/work_packages/work_package_query_spec.rb +++ b/spec/features/accessibility/work_packages/work_package_query_spec.rb @@ -259,27 +259,17 @@ describe 'Work package index accessibility', :type => :feature do before do expect(page).to have_selector(target_link) element = find(target_link) - element.native.send_keys(:enter) + element.native.send_keys(:escape) expect(page).not_to have_selector(target_link) end it { expect(page).to have_selector(source_link + ':focus') } - - after do - cleanup if defined?(cleanup) - end end end end describe 'work package context menu', js: true do - let(:cleanup) do - # ensure work package queried by context menu is fully loaded. - expect(page).to have_selector('.work-packages--details h2', text: work_package.subject, - visible: false) - end - it_behaves_like 'context menu' do let(:target_link) { '#work-package-context-menu li.open a' } let(:source_link) { ".workpackages-table tr.issue td.id a" }