diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-10-14 03:01:04 +0300 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-10-14 03:04:09 +0300 |
commit | 585a2ab577bc5714817f643ce4afd72ae8d832c3 (patch) | |
tree | 790089b62fbb6a15eec826f0eef112d944f1e99d /spec/features/projects/pipelines | |
parent | 4f5fda8b3419b67e6108528b8eb94f8f98334324 (diff) |
fix cmd+click emulation for selenium webdriver
Diffstat (limited to 'spec/features/projects/pipelines')
-rw-r--r-- | spec/features/projects/pipelines/pipelines_spec.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index be8ff727a43..46289ee8727 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -362,10 +362,15 @@ describe 'Pipelines', :js do context 'dropdown jobs list' do it 'should keep the dropdown open when the user ctr/cmd + clicks in the job name' do find('.js-builds-dropdown-button').click - - execute_script('var e = $.Event("keydown", { keyCode: 64 }); $("body").trigger(e);') - - find('.mini-pipeline-graph-dropdown-item').click + dropdown_item = find('.mini-pipeline-graph-dropdown-item').native + + %i(control command alt).each do |command| + page.driver.browser.action + .key_down(:command) + .click(dropdown_item) + .key_up(:command) + .perform + end expect(page).to have_selector('.js-ci-action-icon') end |