diff options
author | Phil Hughes <me@iamphill.com> | 2017-05-03 17:04:47 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-03 17:04:47 +0100 |
commit | f29e5d4d93123ea73e5f58be46020781af2ef7cb (patch) | |
tree | d08a8f8e5a9cf30dd4f238c187673ffe30ac39b3 /features | |
parent | 4134d700623404948f163349882caf4a6d940cf3 (diff) | |
parent | 8f29bf96b9306fd95b9b98019e80173b47b3a6b8 (diff) | |
download | gitlab-ce-f29e5d4d93123ea73e5f58be46020781af2ef7cb.tar.gz |
Merge branch 'master' into deploy-keys-load-async
Diffstat (limited to 'features')
-rw-r--r-- | features/group/milestones.feature | 1 | ||||
-rw-r--r-- | features/project/milestone.feature | 8 | ||||
-rw-r--r-- | features/project/snippets.feature | 1 | ||||
-rw-r--r-- | features/snippets/snippets.feature | 1 | ||||
-rw-r--r-- | features/steps/group/milestones.rb | 3 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 2 | ||||
-rw-r--r-- | features/steps/project/project_milestone.rb | 3 | ||||
-rw-r--r-- | features/steps/project/snippets.rb | 5 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 2 | ||||
-rw-r--r-- | features/steps/snippets/snippets.rb | 4 | ||||
-rw-r--r-- | features/support/env.rb | 9 |
11 files changed, 26 insertions, 13 deletions
diff --git a/features/group/milestones.feature b/features/group/milestones.feature index d6c05df9840..1c1539b3e12 100644 --- a/features/group/milestones.feature +++ b/features/group/milestones.feature @@ -38,6 +38,7 @@ Feature: Group Milestones And I should see the "feature" label And I should see the project name in the Issue row + @javascript Scenario: I should see the Labels tab Given Group has projects with milestones When I visit group "Owned" page diff --git a/features/project/milestone.feature b/features/project/milestone.feature index 713f0f3b979..5e7b211fa27 100644 --- a/features/project/milestone.feature +++ b/features/project/milestone.feature @@ -7,14 +7,6 @@ Feature: Project Milestone And milestone has issue "Bugfix1" with labels: "bug", "feature" And milestone has issue "Bugfix2" with labels: "bug", "enhancement" - - @javascript - Scenario: Listing issues from issues tab - Given I visit project "Shop" milestones page - And I click link "v2.2" - Then I should see the labels "bug", "enhancement" and "feature" - And I should see the "bug" label listed only once - @javascript Scenario: Listing labels from labels tab Given I visit project "Shop" milestones page diff --git a/features/project/snippets.feature b/features/project/snippets.feature index 3c51ea56585..50bc4c93df3 100644 --- a/features/project/snippets.feature +++ b/features/project/snippets.feature @@ -11,6 +11,7 @@ Feature: Project Snippets Then I should see "Snippet one" in snippets And I should not see "Snippet two" in snippets + @javascript Scenario: I create new project snippet Given I click link "New snippet" And I submit new snippet "Snippet three" diff --git a/features/snippets/snippets.feature b/features/snippets/snippets.feature index e15d7c79342..1ad02780229 100644 --- a/features/snippets/snippets.feature +++ b/features/snippets/snippets.feature @@ -5,6 +5,7 @@ Feature: Snippets And I have public "Personal snippet one" snippet And I have private "Personal snippet private" snippet + @javascript Scenario: I create new snippet Given I visit new snippet page And I submit new snippet "Personal snippet three" diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index f8f5e3f2382..49fcd6f1201 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -1,4 +1,5 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps + include WaitForAjax include SharedAuthentication include SharedPaths include SharedGroup @@ -90,6 +91,8 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps end step 'I should see the list of labels' do + wait_for_ajax + page.within('#tab-labels') do expect(page).to have_content 'bug' expect(page).to have_content 'feature' diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index de737cdc823..f19fa1c7600 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -21,7 +21,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps expect(response_headers['Content-Type']).to have_content("application/atom+xml") expect(body).to have_selector("title", text: "#{@project.name}:master commits") expect(body).to have_selector("author email", text: commit.author_email) - expect(body).to have_selector("entry summary", text: commit.description[0..10].delete("\r")) + expect(body).to have_selector("entry summary", text: commit.description[0..10].delete("\r\n")) end step 'I click on tag link' do diff --git a/features/steps/project/project_milestone.rb b/features/steps/project/project_milestone.rb index 1864b3a2b52..dc1190b7eea 100644 --- a/features/steps/project/project_milestone.rb +++ b/features/steps/project/project_milestone.rb @@ -2,6 +2,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps include SharedAuthentication include SharedProject include SharedPaths + include WaitForAjax step 'milestone has issue "Bugfix1" with labels: "bug", "feature"' do project = Project.find_by(name: "Shop") @@ -34,6 +35,8 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps end step 'I should see the labels "bug", "enhancement" and "feature"' do + wait_for_ajax + page.within('#tab-issues') do expect(page).to have_content 'bug' expect(page).to have_content 'enhancement' diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index a3bebfa4b71..60febd20104 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -3,6 +3,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps include SharedProject include SharedNote include SharedPaths + include WaitForAjax step 'project "Shop" have "Snippet one" snippet' do create(:project_snippet, @@ -55,9 +56,10 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps fill_in "project_snippet_title", with: "Snippet three" fill_in "project_snippet_file_name", with: "my_snippet.rb" page.within('.file-editor') do - find(:xpath, "//input[@id='project_snippet_content']").set 'Content of snippet three' + find('.ace_editor').native.send_keys 'Content of snippet three' end click_button "Create snippet" + wait_for_ajax end step 'I should see snippet "Snippet three"' do @@ -79,6 +81,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps fill_in "note_note", with: "Good snippet!" click_button "Comment" end + wait_for_ajax end step 'I should see comment "Good snippet!"' do diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 36fe21a047c..ef09bddddd8 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -367,7 +367,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps step 'I should see buttons for allowed commands' do page.within '.content' do - expect(page).to have_link 'Open raw' + expect(page).to have_link 'Download' expect(page).to have_content 'History' expect(page).to have_content 'Permalink' expect(page).not_to have_content 'Edit' diff --git a/features/steps/snippets/snippets.rb b/features/steps/snippets/snippets.rb index 19366b11071..0b3e942a4fd 100644 --- a/features/steps/snippets/snippets.rb +++ b/features/steps/snippets/snippets.rb @@ -3,6 +3,7 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps include SharedPaths include SharedProject include SharedSnippet + include WaitForAjax step 'I click link "Personal snippet one"' do click_link "Personal snippet one" @@ -26,9 +27,10 @@ class Spinach::Features::Snippets < Spinach::FeatureSteps fill_in "personal_snippet_title", with: "Personal snippet three" fill_in "personal_snippet_file_name", with: "my_snippet.rb" page.within('.file-editor') do - find(:xpath, "//input[@id='personal_snippet_content']").set 'Content of snippet three' + find('.ace_editor').native.send_keys 'Content of snippet three' end click_button "Create snippet" + wait_for_ajax end step 'I submit new internal snippet' do diff --git a/features/support/env.rb b/features/support/env.rb index 06c804b1db7..92d13bea4b6 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -10,7 +10,7 @@ if ENV['CI'] Knapsack::Adapters::SpinachAdapter.bind end -%w(select2_helper test_env repo_helpers wait_for_ajax sidekiq).each do |f| +%w(select2_helper test_env repo_helpers wait_for_ajax wait_for_requests sidekiq).each do |f| require Rails.root.join('spec', 'support', f) end @@ -30,6 +30,13 @@ Spinach.hooks.before_run do include FactoryGirl::Syntax::Methods end +Spinach.hooks.after_feature do |feature_data| + if feature_data.scenarios.flat_map(&:tags).include?('javascript') + include WaitForRequests + wait_for_requests_complete + end +end + module StdoutReporterWithScenarioLocation # Override the standard reporter to show filename and line number next to each # scenario for easy, focused re-runs |