fix cmd+click emulation for selenium webdriver
This commit is contained in:
parent
4f5fda8b34
commit
585a2ab577
1 changed files with 8 additions and 3 deletions
|
@ -362,10 +362,15 @@ describe 'Pipelines', :js do
|
||||||
context 'dropdown jobs list' do
|
context 'dropdown jobs list' do
|
||||||
it 'should keep the dropdown open when the user ctr/cmd + clicks in the job name' do
|
it 'should keep the dropdown open when the user ctr/cmd + clicks in the job name' do
|
||||||
find('.js-builds-dropdown-button').click
|
find('.js-builds-dropdown-button').click
|
||||||
|
dropdown_item = find('.mini-pipeline-graph-dropdown-item').native
|
||||||
|
|
||||||
execute_script('var e = $.Event("keydown", { keyCode: 64 }); $("body").trigger(e);')
|
%i(control command alt).each do |command|
|
||||||
|
page.driver.browser.action
|
||||||
find('.mini-pipeline-graph-dropdown-item').click
|
.key_down(:command)
|
||||||
|
.click(dropdown_item)
|
||||||
|
.key_up(:command)
|
||||||
|
.perform
|
||||||
|
end
|
||||||
|
|
||||||
expect(page).to have_selector('.js-ci-action-icon')
|
expect(page).to have_selector('.js-ci-action-icon')
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue