diff options
author | Stan Hu <stanhu@gmail.com> | 2016-10-14 16:47:55 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-10-16 20:02:16 -0700 |
commit | d78c667d581dca6b75895f70f0ae6ebdd0f5d815 (patch) | |
tree | d7028cab3a10d334dbc53e964811e00c8ddd54d4 /features | |
parent | a453dacec211678a4f7b94e8aa858e8eb4da9214 (diff) | |
download | gitlab-ce-d78c667d581dca6b75895f70f0ae6ebdd0f5d815.tar.gz |
Fix broken Spinach tests caused by changes in !6550
Partial fix to #23378
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/project/commits/commits.rb | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index b8264f97687..fd7b1debd68 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -42,15 +42,16 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I fill compare fields with branches' do - fill_in 'from', with: 'feature' - fill_in 'to', with: 'master' + select_using_dropdown('from', 'feature') + select_using_dropdown('to', 'master') click_button 'Compare' end step 'I fill compare fields with refs' do - fill_in "from", with: sample_commit.parent_id - fill_in "to", with: sample_commit.id + select_using_dropdown('from', sample_commit.parent_id) + select_using_dropdown('to', sample_commit.id) + click_button "Compare" end @@ -97,8 +98,8 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I fill compare fields with branches' do - fill_in 'from', with: 'master' - fill_in 'to', with: 'feature' + select_using_dropdown('from', 'master') + select_using_dropdown('to', 'feature') click_button 'Compare' end @@ -182,4 +183,11 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps expect(page).to have_content "More submodules" expect(page).not_to have_content "Change some files" end + + def select_using_dropdown(dropdown_type, selection) + dropdown = find(".js-compare-#{dropdown_type}-dropdown") + dropdown.find(".compare-dropdown-toggle").click + dropdown.fill_in("Filter by branch/tag", with: selection) + find_link(selection, visible: true).click + end end |