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.
pull/1991/head
Hagen Schink 10 years ago
parent eb53c0f9b6
commit be9aa5ea05
  1. 12
      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" }

Loading…
Cancel
Save