From 8bd520d70e035cd67d19b7962911ae9c31d1ff3d Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Wed, 6 Jul 2016 17:52:00 -0300 Subject: Allow slack service to send messages on different channels --- features/steps/admin/settings.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'features') diff --git a/features/steps/admin/settings.rb b/features/steps/admin/settings.rb index 037f7494a77..03f87df7a60 100644 --- a/features/steps/admin/settings.rb +++ b/features/steps/admin/settings.rb @@ -27,19 +27,19 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps step 'I check all events and submit form' do page.check('Active') - page.check('Push events') - page.check('Tag push events') - page.check('Comments') - page.check('Issues events') - page.check('Merge Request events') - page.check('Build events') + page.check('Push') + page.check('Tag push') + page.check('Note') + page.check('Issue') + page.check('Merge request') + page.check('Build') click_on 'Save' end step 'I fill out Slack settings' do fill_in 'Webhook', with: 'http://localhost' fill_in 'Username', with: 'test_user' - fill_in 'Channel', with: '#test_channel' + fill_in 'service_push_channel', with: '#test_channel' page.check('Notify only broken builds') end @@ -56,6 +56,6 @@ class Spinach::Features::AdminSettings < Spinach::FeatureSteps step 'I should see Slack settings saved' do expect(find_field('Webhook').value).to eq 'http://localhost' expect(find_field('Username').value).to eq 'test_user' - expect(find_field('Channel').value).to eq '#test_channel' + expect(find('#service_push_channel').value).to eq '#test_channel' end end -- cgit v1.2.3 From caec732c7629ddd87792b76a67b41ff26611eec1 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 30 Jun 2016 16:49:17 +0200 Subject: Add simplecov to spinach tests --- features/support/env.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'features') diff --git a/features/support/env.rb b/features/support/env.rb index f0a3dd8d2d0..c1cfabd0d6a 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,5 +1,13 @@ if ENV['SIMPLECOV'] require 'simplecov' + + SimpleCov.start :rails do + if ENV['CI_BUILD_NAME'] + coverage_dir "coverage/#{ENV['CI_BUILD_NAME']}" + command_name ENV['CI_BUILD_NAME'] + merge_timeout 7200 + end + end end ENV['RAILS_ENV'] = 'test' -- cgit v1.2.3 From 8cc7a2dd6f201019d6848aade74d938db356cc39 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 30 Jun 2016 18:54:03 +0200 Subject: Store all simplecov configuration in one file --- features/support/env.rb | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'features') diff --git a/features/support/env.rb b/features/support/env.rb index c1cfabd0d6a..1c39367ad42 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,14 +1,4 @@ -if ENV['SIMPLECOV'] - require 'simplecov' - - SimpleCov.start :rails do - if ENV['CI_BUILD_NAME'] - coverage_dir "coverage/#{ENV['CI_BUILD_NAME']}" - command_name ENV['CI_BUILD_NAME'] - merge_timeout 7200 - end - end -end +require_relative Rails.root.join('spec', 'simplecov_env') ENV['RAILS_ENV'] = 'test' require './config/environment' -- cgit v1.2.3 From 070a96f54faac289d9254f0e8735f3926418335c Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 30 Jun 2016 19:04:00 +0200 Subject: Update configuration of SimpleCov --- features/support/env.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'features') diff --git a/features/support/env.rb b/features/support/env.rb index 1c39367ad42..16ce1b6ca77 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,4 +1,5 @@ require_relative Rails.root.join('spec', 'simplecov_env') +SimpleCov.start if ENV['SIMPLECOV'] ENV['RAILS_ENV'] = 'test' require './config/environment' -- cgit v1.2.3 From 63ceb31f8b15b4ba7fd1b4c971367a5e20aca311 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 1 Jul 2016 00:33:12 +0200 Subject: Fix spinach tests --- features/support/env.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/support/env.rb b/features/support/env.rb index 16ce1b6ca77..2a3e21d28bc 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,4 +1,4 @@ -require_relative Rails.root.join('spec', 'simplecov_env') +require_relative '../../spec/simplecov_env' SimpleCov.start if ENV['SIMPLECOV'] ENV['RAILS_ENV'] = 'test' -- cgit v1.2.3 From 7a0f4d3c905cc92880697deac365a6c596fd55a8 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 21 Jul 2016 10:44:18 +0200 Subject: Introduce SimpleCovEnv singleton helper and use it --- features/support/env.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features') diff --git a/features/support/env.rb b/features/support/env.rb index 2a3e21d28bc..569fd444e86 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -1,5 +1,5 @@ -require_relative '../../spec/simplecov_env' -SimpleCov.start if ENV['SIMPLECOV'] +require './spec/simplecov_env' +SimpleCovEnv.start! ENV['RAILS_ENV'] = 'test' require './config/environment' -- cgit v1.2.3 From c3cbee10bd438a2d8ded30f1a11865693a3d3c6a Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Fri, 22 Jul 2016 08:25:59 +0530 Subject: Add a spec for #20079. The issue was fixed in 2ba5e62. The spec is going in separately just so the fix could go in as soon as possible. --- features/project/wiki.feature | 6 ++++++ features/steps/project/wiki.rb | 10 ++++++++++ 2 files changed, 16 insertions(+) (limited to 'features') diff --git a/features/project/wiki.feature b/features/project/wiki.feature index d4811b1ff54..63ce3ccb536 100644 --- a/features/project/wiki.feature +++ b/features/project/wiki.feature @@ -8,6 +8,12 @@ Feature: Project Wiki Given I create the Wiki Home page Then I should see the newly created wiki page + Scenario: Add new page with errors + Given I create the Wiki Home page with no content + Then I should see a "Content can't be blank" error message + When I create the Wiki Home page + Then I should see the newly created wiki page + Scenario: Pressing Cancel while editing a brand new Wiki Given I click on the Cancel button Then I should be redirected back to the Edit Home Wiki page diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 3cbf832c728..5ad82a9b3c1 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -19,6 +19,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps click_on "Create page" end + step 'I create the Wiki Home page with no content' do + fill_in "wiki_content", with: '' + click_on "Create page" + end + step 'I should see the newly created wiki page' do expect(page).to have_content "Home" expect(page).to have_content "link test" @@ -173,6 +178,11 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps find('a[href*="?version_id"]') end + step 'I should see a "Content can\'t be blank" error message' do + expect(page).to have_content('The form contains the following error:') + expect(page).to have_content('Content can\'t be blank') + end + def wiki @project_wiki = ProjectWiki.new(project, current_user) end -- cgit v1.2.3 From 030a5d880e14649d6e8d0f36fb77eaee9a6daf25 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 24 Jul 2016 05:57:26 -0700 Subject: Add spec for dashes in paths --- features/steps/project/wiki.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'features') diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 5ad82a9b3c1..732dc5d0b93 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -130,15 +130,15 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps step 'I create a New page with paths' do click_on 'New Page' - fill_in 'Page slug', with: 'one/two/three' + fill_in 'Page slug', with: 'one/two/three-test' click_on 'Create Page' fill_in "wiki_content", with: 'wiki content' click_on "Create page" - expect(current_path).to include 'one/two/three' + expect(current_path).to include 'one/two/three-test' end step 'I should see non-escaped link in the pages list' do - expect(page).to have_xpath("//a[@href='/#{project.path_with_namespace}/wikis/one/two/three']") + expect(page).to have_xpath("//a[@href='/#{project.path_with_namespace}/wikis/one/two/three-test']") end step 'I edit the Wiki page with a path' do @@ -147,7 +147,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I should see a non-escaped path' do - expect(current_path).to include 'one/two/three' + expect(current_path).to include 'one/two/three-test' end step 'I should see the Editing page' do -- cgit v1.2.3 From c647540c1010fd1e51bced1db90947aa00c83fa8 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Fri, 8 Jul 2016 14:46:13 +0530 Subject: Fix all specs related to changes in !5081. 1. Remove `Project#developers_can_push_to_protected_branch?` since it isn't used anymore. 2. Remove `Project#developers_can_merge_to_protected_branch?` since it isn't used anymore. --- features/steps/project/commits/branches.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index 0a42931147d..4bfb7e92e99 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -25,7 +25,7 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps step 'project "Shop" has protected branches' do project = Project.find_by(name: "Shop") - project.protected_branches.create(name: "stable") + create(:protected_branch, project: project, name: "stable") end step 'I click new branch link' do -- cgit v1.2.3 From 0fa50494b8f1c765f7c046e0648afec81c27dcd7 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 31 Jul 2016 22:14:48 -0700 Subject: Improve spinach test to be more specific about link to click If you add another branch to gitlab-test that includes the word 'test', browse_files.feature will fail with an ambiguous match. --- features/steps/project/source/browse_files.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 0fe046dcbf6..9a8896acb15 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -293,7 +293,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps first('.js-project-refs-dropdown').click page.within '.project-refs-form' do - click_link 'test' + click_link "'test'" end end -- cgit v1.2.3 From 6515ec09bbfa25027d1b8a1240e09bc1c6edbcfb Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 2 Aug 2016 15:38:03 +0300 Subject: Chnage the way how merge request diff is initialized and saved Signed-off-by: Dmitriy Zaporozhets --- features/project/merge_requests.feature | 2 +- features/steps/project/merge_requests.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'features') diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 21768c15c17..7673b4284ef 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -24,7 +24,7 @@ Feature: Project Merge Requests Scenario: I should see target branch when it is different from default Given project "Shop" have "Bug NS-06" open merge request When I visit project "Shop" merge requests page - Then I should see "other_branch" branch + Then I should see "feature_conflict" branch Scenario: I should not see the numbers of diverged commits if the branch is rebased on the target Given project "Shop" have "Bug NS-07" open merge request with rebased branch diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index da848afd48e..74e162aadee 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -56,8 +56,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps expect(find('.merge-request-info')).not_to have_content "master" end - step 'I should see "other_branch" branch' do - expect(page).to have_content "other_branch" + step 'I should see "feature_conflict" branch' do + expect(page).to have_content "feature_conflict" end step 'I should see "Bug NS-04" in merge requests' do @@ -122,7 +122,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps source_project: project, target_project: project, source_branch: 'fix', - target_branch: 'other_branch', + target_branch: 'feature_conflict', author: project.users.first, description: "# Description header" ) -- cgit v1.2.3 From b6d545df51d7c3b4e572b40cdafb7efeb78edaf4 Mon Sep 17 00:00:00 2001 From: Tim Masliuchenko Date: Thu, 21 Jul 2016 21:44:12 +0300 Subject: Add unfold links for Side-by-Side view --- features/project/merge_requests.feature | 9 +++++++++ features/steps/project/merge_requests.rb | 3 +++ 2 files changed, 12 insertions(+) (limited to 'features') diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 21768c15c17..6bac6011467 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -236,6 +236,15 @@ Feature: Project Merge Requests And I unfold diff Then I should see additional file lines + @javascript + Scenario: I unfold diff in Side-by-Side view + Given project "Shop" have "Bug NS-05" open merge request with diffs inside + And I visit merge request page "Bug NS-05" + And I click on the Changes tab + And I click Side-by-side Diff tab + And I unfold diff + Then I should see additional file lines + @javascript Scenario: I show comments on a merge request side-by-side diff with comments in multiple files Given project "Shop" have "Bug NS-05" open merge request with diffs inside diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index da848afd48e..a02a54923a5 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -477,6 +477,9 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I click Side-by-side Diff tab' do find('a', text: 'Side-by-side').trigger('click') + + # Waits for load + expect(page).to have_css('.parallel') end step 'I should see comments on the side-by-side diff page' do -- cgit v1.2.3 From f564535579af71af599696a039801195a5c30f78 Mon Sep 17 00:00:00 2001 From: Adam Niedzielski Date: Fri, 5 Aug 2016 08:36:09 +0200 Subject: Allow to edit access expiration date. --- features/steps/group/members.rb | 2 +- features/steps/project/team_management.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'features') diff --git a/features/steps/group/members.rb b/features/steps/group/members.rb index dfa2fa75def..956a0026e1a 100644 --- a/features/steps/group/members.rb +++ b/features/steps/group/members.rb @@ -116,7 +116,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps member = mary_jane_member page.within "#group_member_#{member.id}" do - click_button "Edit access level" + click_button 'Edit' select 'Developer', from: 'group_member_access_level' click_on 'Save' end diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb index f32576d2cb1..334ce7dd3db 100644 --- a/features/steps/project/team_management.rb +++ b/features/steps/project/team_management.rb @@ -65,7 +65,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps user = User.find_by(name: 'Dmitriy') project_member = project.project_members.find_by(user_id: user.id) page.within "#project_member_#{project_member.id}" do - click_button "Edit access level" + click_button 'Edit' select "Reporter", from: "project_member_access_level" click_button "Save" end -- cgit v1.2.3 From 1b5e2303debf00784603d6bd9d87d613de3c8091 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 28 Jul 2016 15:39:41 +0200 Subject: Use new badge template to render build status badge --- features/steps/project/badges/build.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/badges/build.rb b/features/steps/project/badges/build.rb index 66a48a176e5..96c59322f9b 100644 --- a/features/steps/project/badges/build.rb +++ b/features/steps/project/badges/build.rb @@ -26,7 +26,7 @@ class Spinach::Features::ProjectBadgesBuild < Spinach::FeatureSteps def expect_badge(status) svg = Nokogiri::XML.parse(page.body) - expect(page.response_headers).to include('Content-Type' => 'image/svg+xml') + expect(page.response_headers['Content-Type']).to include('image/svg+xml') expect(svg.at(%Q{text:contains("#{status}")})).to be_truthy end end -- cgit v1.2.3 From 39203f1adfc6fee3eca50f0cab99ffc597865200 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 11 Aug 2016 15:22:35 +0200 Subject: Pre-create all builds for Pipeline when a trigger is received This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved. --- features/steps/shared/builds.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'features') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb index 4d6b258f577..c7f61da05fa 100644 --- a/features/steps/shared/builds.rb +++ b/features/steps/shared/builds.rb @@ -10,20 +10,22 @@ module SharedBuilds end step 'project has a recent build' do - @pipeline = create(:ci_pipeline, project: @project, sha: @project.commit.sha, ref: 'master') + @pipeline = create(:ci_empty_pipeline, project: @project, sha: @project.commit.sha, ref: 'master') @build = create(:ci_build_with_coverage, pipeline: @pipeline) + @pipeline.reload_status! end step 'recent build is successful' do - @build.update(status: 'success') + @build.success end step 'recent build failed' do - @build.update(status: 'failed') + @build.drop end step 'project has another build that is running' do create(:ci_build, pipeline: @pipeline, name: 'second build', status: 'running') + @pipeline.reload_status! end step 'I visit recent build details page' do -- cgit v1.2.3 From 30f9596c612abc19dd060fa3a8e8ae3d92001d45 Mon Sep 17 00:00:00 2001 From: James Lopez Date: Thu, 11 Aug 2016 16:59:37 +0200 Subject: Fix permissions check in controller, added relevant spec and updated docs --- features/dashboard/new_project.feature | 2 +- features/steps/dashboard/new_project.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'features') diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature index 8ddafb6a7ac..046e2815d4e 100644 --- a/features/dashboard/new_project.feature +++ b/features/dashboard/new_project.feature @@ -9,7 +9,7 @@ Background: @javascript Scenario: I should see New Projects page Then I see "New Project" page - Then I see all possible import optios + Then I see all possible import options @javascript Scenario: I should see instructions on how to import from Git URL diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb index 727a6a71373..f2b44734601 100644 --- a/features/steps/dashboard/new_project.rb +++ b/features/steps/dashboard/new_project.rb @@ -14,14 +14,13 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps expect(page).to have_content('Project name') end - step 'I see all possible import optios' do + step 'I see all possible import options' do expect(page).to have_link('GitHub') expect(page).to have_link('Bitbucket') expect(page).to have_link('GitLab.com') expect(page).to have_link('Gitorious.org') expect(page).to have_link('Google Code') expect(page).to have_link('Repo by URL') - expect(page).to have_link('GitLab export') end step 'I click on "Import project from GitHub"' do -- cgit v1.2.3 From 32b579e8426094af4b7731d3e91597a377a7ba7e Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Thu, 11 Aug 2016 10:00:31 -0500 Subject: Show member roles to all users on members page --- features/explore/groups.feature | 25 ------------------------- features/steps/explore/groups.rb | 4 ---- 2 files changed, 29 deletions(-) (limited to 'features') diff --git a/features/explore/groups.feature b/features/explore/groups.feature index 5fc9b135601..9eacbe0b25e 100644 --- a/features/explore/groups.feature +++ b/features/explore/groups.feature @@ -24,14 +24,6 @@ Feature: Explore Groups Then I should see project "Internal" items And I should not see project "Enterprise" items - Scenario: I should see group's members as user - Given group "TestGroup" has internal project "Internal" - And "John Doe" is owner of group "TestGroup" - When I sign in as a user - And I visit group "TestGroup" members page - Then I should see group member "John Doe" - And I should not see member roles - Scenario: I should see group with private, internal and public projects as visitor Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has public project "Community" @@ -56,14 +48,6 @@ Feature: Explore Groups And I should not see project "Internal" items And I should not see project "Enterprise" items - Scenario: I should see group's members as visitor - Given group "TestGroup" has internal project "Internal" - Given group "TestGroup" has public project "Community" - And "John Doe" is owner of group "TestGroup" - When I visit group "TestGroup" members page - Then I should see group member "John Doe" - And I should not see member roles - Scenario: I should see group with private, internal and public projects as user Given group "TestGroup" has internal project "Internal" Given group "TestGroup" has public project "Community" @@ -91,15 +75,6 @@ Feature: Explore Groups And I should see project "Internal" items And I should not see project "Enterprise" items - Scenario: I should see group's members as user - Given group "TestGroup" has internal project "Internal" - Given group "TestGroup" has public project "Community" - And "John Doe" is owner of group "TestGroup" - When I sign in as a user - And I visit group "TestGroup" members page - Then I should see group member "John Doe" - And I should not see member roles - Scenario: I should see group with public project in public groups area Given group "TestGroup" has public project "Community" When I visit the public groups area diff --git a/features/steps/explore/groups.rb b/features/steps/explore/groups.rb index 87f32e70d59..409bf0cb416 100644 --- a/features/steps/explore/groups.rb +++ b/features/steps/explore/groups.rb @@ -62,10 +62,6 @@ class Spinach::Features::ExploreGroups < Spinach::FeatureSteps expect(page).to have_content "John Doe" end - step 'I should not see member roles' do - expect(body).not_to match(%r{owner|developer|reporter|guest}i) - end - protected def group_has_project(groupname, projectname, visibility_level) -- cgit v1.2.3 From 6a6a69f4afbe0107a75df018b662f02b5ec0166a Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 11 Aug 2016 20:54:02 +0200 Subject: Use state machine for pipeline event processing --- features/steps/shared/builds.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'features') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb index c7f61da05fa..5ed5cdb759f 100644 --- a/features/steps/shared/builds.rb +++ b/features/steps/shared/builds.rb @@ -12,7 +12,6 @@ module SharedBuilds step 'project has a recent build' do @pipeline = create(:ci_empty_pipeline, project: @project, sha: @project.commit.sha, ref: 'master') @build = create(:ci_build_with_coverage, pipeline: @pipeline) - @pipeline.reload_status! end step 'recent build is successful' do @@ -25,7 +24,6 @@ module SharedBuilds step 'project has another build that is running' do create(:ci_build, pipeline: @pipeline, name: 'second build', status: 'running') - @pipeline.reload_status! end step 'I visit recent build details page' do -- cgit v1.2.3 From 4ccf39cde7356bf98bef5aae694257fb2c001e75 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 11 Aug 2016 22:54:25 +0200 Subject: Fix test failures, that did occur because of missing previously used `reload_status!` call --- features/steps/shared/builds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/shared/builds.rb b/features/steps/shared/builds.rb index 5ed5cdb759f..70e6d4836b2 100644 --- a/features/steps/shared/builds.rb +++ b/features/steps/shared/builds.rb @@ -23,7 +23,7 @@ module SharedBuilds end step 'project has another build that is running' do - create(:ci_build, pipeline: @pipeline, name: 'second build', status: 'running') + create(:ci_build, pipeline: @pipeline, name: 'second build', status_event: 'run') end step 'I visit recent build details page' do -- cgit v1.2.3 From f668da11cb225a9b2c2f1d3ba9d1e9fb2797d4f9 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 11 Aug 2016 17:48:32 +0100 Subject: Updated tests --- features/steps/dashboard/event_filters.rb | 6 ++++++ features/steps/dashboard/issues.rb | 5 +++++ features/steps/dashboard/merge_requests.rb | 5 +++++ features/steps/dashboard/new_project.rb | 2 ++ features/steps/project/builds/artifacts.rb | 1 + features/steps/project/forked_merge_requests.rb | 3 +++ features/steps/project/issues/issues.rb | 1 + features/steps/project/merge_requests.rb | 2 ++ features/steps/project/source/browse_files.rb | 1 + features/steps/project/wiki.rb | 2 ++ features/steps/shared/issuable.rb | 4 +--- 11 files changed, 29 insertions(+), 3 deletions(-) (limited to 'features') diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index 726b37cfde5..97b17abb470 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -4,26 +4,32 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps include SharedProject step 'I should see push event' do + sleep 1 expect(page).to have_selector('span.pushed') end step 'I should not see push event' do + sleep 1 expect(page).not_to have_selector('span.pushed') end step 'I should see new member event' do + sleep 1 expect(page).to have_selector('span.joined') end step 'I should not see new member event' do + sleep 1 expect(page).not_to have_selector('span.joined') end step 'I should see merge request event' do + sleep 1 expect(page).to have_selector('span.accepted') end step 'I should not see merge request event' do + sleep 1 expect(page).not_to have_selector('span.accepted') end diff --git a/features/steps/dashboard/issues.rb b/features/steps/dashboard/issues.rb index 8706f0e8e78..39c65bb6cde 100644 --- a/features/steps/dashboard/issues.rb +++ b/features/steps/dashboard/issues.rb @@ -43,9 +43,14 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps step 'I click "All" link' do find(".js-author-search").click + expect(page).to have_selector(".dropdown-menu-author li a") find(".dropdown-menu-author li a", match: :first).click + expect(page).not_to have_selector(".dropdown-menu-author li a") + find(".js-assignee-search").click + expect(page).to have_selector(".dropdown-menu-assignee li a") find(".dropdown-menu-assignee li a", match: :first).click + expect(page).not_to have_selector(".dropdown-menu-assignee li a") end def should_see(issue) diff --git a/features/steps/dashboard/merge_requests.rb b/features/steps/dashboard/merge_requests.rb index 06db36c7014..6777101fb15 100644 --- a/features/steps/dashboard/merge_requests.rb +++ b/features/steps/dashboard/merge_requests.rb @@ -47,9 +47,14 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps step 'I click "All" link' do find(".js-author-search").click + expect(page).to have_selector(".dropdown-menu-author li a") find(".dropdown-menu-author li a", match: :first).click + expect(page).not_to have_selector(".dropdown-menu-author li a") + find(".js-assignee-search").click + expect(page).to have_selector(".dropdown-menu-assignee li a") find(".dropdown-menu-assignee li a", match: :first).click + expect(page).not_to have_selector(".dropdown-menu-assignee li a") end def should_see(merge_request) diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb index 727a6a71373..dcfa88f69fc 100644 --- a/features/steps/dashboard/new_project.rb +++ b/features/steps/dashboard/new_project.rb @@ -29,6 +29,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps end step 'I am redirected to the GitHub import page' do + expect(page).to have_content('Import Projects from GitHub') expect(current_path).to eq new_import_github_path end @@ -47,6 +48,7 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps end step 'I redirected to Google Code import page' do + expect(page).to have_content('Import projects from Google Code') expect(current_path).to eq new_import_google_code_path end end diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb index b4a32ed2e38..055fca036d3 100644 --- a/features/steps/project/builds/artifacts.rb +++ b/features/steps/project/builds/artifacts.rb @@ -10,6 +10,7 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps step 'I click artifacts browse button' do click_link 'Browse' + expect(page).not_to have_selector('.build-sidebar') end step 'I should see content of artifacts archive' do diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb index 6b56a77b832..dacab6c7977 100644 --- a/features/steps/project/forked_merge_requests.rb +++ b/features/steps/project/forked_merge_requests.rb @@ -34,6 +34,9 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps end step 'I fill out a "Merge Request On Forked Project" merge request' do + expect(page).to have_content('Source branch') + expect(page).to have_content('Target branch') + first('.js-source-project').click first('.dropdown-source-project a', text: @forked_project.path_with_namespace) diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 35f166c7c08..c1592e1d142 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -355,5 +355,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps def filter_issue(text) fill_in 'issue_search', with: text + find('#issue_search').native.send_keys(:return) end end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index a02a54923a5..53d1aedf27f 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -489,10 +489,12 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I fill in merge request search with "Fe"' do + sleep 1 fill_in 'issue_search', with: "Fe" end step 'I click the "Target branch" dropdown' do + expect(page).to have_content('Target branch') first('.target_branch').click end diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 9a8896acb15..2b74e964ca1 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -69,6 +69,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I edit code' do + expect(page).to have_selector('.file-editor') set_new_content end diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 732dc5d0b93..07a955b1a14 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -142,7 +142,9 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I edit the Wiki page with a path' do + expect(page).to have_content('three') click_on 'three' + expect(find('.nav-text')).to have_content('Three') click_on 'Edit' end diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index b5fd24d246f..aa666a954bc 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -133,9 +133,7 @@ module SharedIssuable end step 'The list should be sorted by "Oldest updated"' do - page.within('.content div.dropdown.inline.prepend-left-10') do - expect(page.find('button.dropdown-toggle.btn')).to have_content('Oldest updated') - end + expect(find('.issues-filters')).to have_content('Oldest updated') end step 'I click link "Next" in the sidebar' do -- cgit v1.2.3 From 61bdc80dbad253f6532a83ae2554de82deb40e5f Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 12 Aug 2016 10:10:59 +0100 Subject: Updated failing tests --- features/steps/dashboard/dashboard.rb | 1 + features/steps/dashboard/event_filters.rb | 10 ++++++++++ features/steps/project/source/browse_files.rb | 1 + features/support/wait_for_ajax.rb | 11 +++++++++++ 4 files changed, 23 insertions(+) create mode 100644 features/support/wait_for_ajax.rb (limited to 'features') diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb index 80ed4c6d64c..a7d61bc28e0 100644 --- a/features/steps/dashboard/dashboard.rb +++ b/features/steps/dashboard/dashboard.rb @@ -26,6 +26,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps end step 'I see prefilled new Merge Request page' do + expect(page).to have_selector('.merge-request-form') expect(current_path).to eq new_namespace_project_merge_request_path(@project.namespace, @project) expect(find("#merge_request_target_project_id").value).to eq @project.id.to_s expect(find("input#merge_request_source_branch").value).to eq "fix" diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index 97b17abb470..1806bb138eb 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -1,34 +1,44 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps + include WaitForAjax include SharedAuthentication include SharedPaths include SharedProject step 'I should see push event' do + wait_for_ajax sleep 1 expect(page).to have_selector('span.pushed') end step 'I should not see push event' do + wait_for_ajax + save_and_open_screenshot sleep 1 + save_and_open_screenshot expect(page).not_to have_selector('span.pushed') + save_and_open_screenshot end step 'I should see new member event' do + wait_for_ajax sleep 1 expect(page).to have_selector('span.joined') end step 'I should not see new member event' do + wait_for_ajax sleep 1 expect(page).not_to have_selector('span.joined') end step 'I should see merge request event' do + wait_for_ajax sleep 1 expect(page).to have_selector('span.accepted') end step 'I should not see merge request event' do + wait_for_ajax sleep 1 expect(page).not_to have_selector('span.accepted') end diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 2b74e964ca1..841d191d55b 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -132,6 +132,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps step 'I click on "New file" link in repo' do find('.add-to-tree').click click_link 'New file' + expect(page).to have_selector('.file-editor') end step 'I click on "Upload file" link in repo' do diff --git a/features/support/wait_for_ajax.rb b/features/support/wait_for_ajax.rb new file mode 100644 index 00000000000..b90fc112671 --- /dev/null +++ b/features/support/wait_for_ajax.rb @@ -0,0 +1,11 @@ +module WaitForAjax + def wait_for_ajax + Timeout.timeout(Capybara.default_max_wait_time) do + loop until finished_all_ajax_requests? + end + end + + def finished_all_ajax_requests? + page.evaluate_script('jQuery.active').zero? + end +end -- cgit v1.2.3 From a0cd87d175a2e2c7a19595f7fa4d250309850a35 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 12 Aug 2016 10:41:17 +0100 Subject: Removed screenshot command :poop: --- features/steps/dashboard/event_filters.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'features') diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index 1806bb138eb..c9896cbc24a 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -12,11 +12,8 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps step 'I should not see push event' do wait_for_ajax - save_and_open_screenshot sleep 1 - save_and_open_screenshot expect(page).not_to have_selector('span.pushed') - save_and_open_screenshot end step 'I should see new member event' do -- cgit v1.2.3 From c617cbfcd66a5ded22041e06b5e68454c7145029 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 12 Aug 2016 12:47:17 +0100 Subject: Fixed filtering tests --- features/steps/dashboard/event_filters.rb | 15 +++------------ features/steps/project/issues/issues.rb | 3 ++- 2 files changed, 5 insertions(+), 13 deletions(-) (limited to 'features') diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index c9896cbc24a..2708e191f75 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -5,38 +5,26 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps include SharedProject step 'I should see push event' do - wait_for_ajax - sleep 1 expect(page).to have_selector('span.pushed') end step 'I should not see push event' do - wait_for_ajax - sleep 1 expect(page).not_to have_selector('span.pushed') end step 'I should see new member event' do - wait_for_ajax - sleep 1 expect(page).to have_selector('span.joined') end step 'I should not see new member event' do - wait_for_ajax - sleep 1 expect(page).not_to have_selector('span.joined') end step 'I should see merge request event' do - wait_for_ajax - sleep 1 expect(page).to have_selector('span.accepted') end step 'I should not see merge request event' do - wait_for_ajax - sleep 1 expect(page).not_to have_selector('span.accepted') end @@ -86,13 +74,16 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps When 'I click "push" event filter' do click_link("push_event_filter") + sleep 1 end When 'I click "team" event filter' do click_link("team_event_filter") + sleep 1 end When 'I click "merge" event filter' do click_link("merged_event_filter") + sleep 1 end end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index c1592e1d142..daee90b3767 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -354,7 +354,8 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end def filter_issue(text) + sleep 1 fill_in 'issue_search', with: text - find('#issue_search').native.send_keys(:return) + sleep 1 end end -- cgit v1.2.3 From 5d8ad797503c76ab9818584cf3b2e945ff8cfd68 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 12 Aug 2016 13:39:29 +0100 Subject: Filters test fix --- features/steps/dashboard/event_filters.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'features') diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index 2708e191f75..3ff260c0027 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -73,17 +73,20 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps end When 'I click "push" event filter' do - click_link("push_event_filter") sleep 1 + click_link("Push events") + sleep 2 end When 'I click "team" event filter' do - click_link("team_event_filter") sleep 1 + click_link("Team") + sleep 2 end When 'I click "merge" event filter' do - click_link("merged_event_filter") sleep 1 + click_link("Merge events") + sleep 2 end end -- cgit v1.2.3 From 1392cad8956c490b5ba6106678ab16d790662148 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Fri, 12 Aug 2016 11:44:43 -0600 Subject: Remove sleeping and replace escaped text. --- features/steps/dashboard/event_filters.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'features') diff --git a/features/steps/dashboard/event_filters.rb b/features/steps/dashboard/event_filters.rb index 3ff260c0027..ca3cd0ecc4e 100644 --- a/features/steps/dashboard/event_filters.rb +++ b/features/steps/dashboard/event_filters.rb @@ -73,20 +73,20 @@ class Spinach::Features::EventFilters < Spinach::FeatureSteps end When 'I click "push" event filter' do - sleep 1 + wait_for_ajax click_link("Push events") - sleep 2 + wait_for_ajax end When 'I click "team" event filter' do - sleep 1 + wait_for_ajax click_link("Team") - sleep 2 + wait_for_ajax end When 'I click "merge" event filter' do - sleep 1 + wait_for_ajax click_link("Merge events") - sleep 2 + wait_for_ajax end end -- cgit v1.2.3 From c0a722a223e50efeab5ed3f10523d83806a09215 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Mon, 15 Aug 2016 16:10:22 +0100 Subject: Removed sleep calls introduced in !5740 --- features/steps/project/issues/issues.rb | 2 -- features/steps/project/merge_requests.rb | 1 - 2 files changed, 3 deletions(-) (limited to 'features') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index daee90b3767..35f166c7c08 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -354,8 +354,6 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end def filter_issue(text) - sleep 1 fill_in 'issue_search', with: text - sleep 1 end end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 53d1aedf27f..f3d78780da3 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -489,7 +489,6 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I fill in merge request search with "Fe"' do - sleep 1 fill_in 'issue_search', with: "Fe" end -- cgit v1.2.3 From 8691561016338a58e314cdaa69911523b35c6df4 Mon Sep 17 00:00:00 2001 From: Luke Bennett Date: Wed, 17 Aug 2016 13:33:44 +0100 Subject: Now waits for All issuables to load when clicked --- features/steps/project/issues/issues.rb | 2 ++ features/steps/project/merge_requests.rb | 2 ++ 2 files changed, 4 insertions(+) (limited to 'features') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 35f166c7c08..056462a7152 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -45,6 +45,8 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'I click link "All"' do click_link "All" + # Waits for load + expect(find('.issues-state-filters > .active')).to have_content 'All' end step 'I click link "Release 0.4"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index f3d78780da3..9778ff4a6c7 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -22,6 +22,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I click link "All"' do click_link "All" + # Waits for load + expect(find('.issues-state-filters > .active')).to have_content 'All' end step 'I click link "Merged"' do -- cgit v1.2.3 From 6c1ed00afc98562e2c605aa3df313d26b3486da3 Mon Sep 17 00:00:00 2001 From: Jack Davison Date: Mon, 11 Jul 2016 19:53:07 +0100 Subject: Award tooltips refer to current user as "You" --- features/steps/project/issues/award_emoji.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb index 1498f899cf5..cbe5738e7e4 100644 --- a/features/steps/project/issues/award_emoji.rb +++ b/features/steps/project/issues/award_emoji.rb @@ -48,7 +48,7 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps page.within '.awards' do expect(page).to have_selector '.js-emoji-btn' expect(page.find('.js-emoji-btn.active .js-counter')).to have_content '1' - expect(page).to have_css(".js-emoji-btn.active[data-original-title='me']") + expect(page).to have_css(".js-emoji-btn.active[data-original-title='You']") end end -- cgit v1.2.3 From de8d9328064da4295436f32043e47b2b3e051334 Mon Sep 17 00:00:00 2001 From: Ruben Davila Date: Wed, 17 Aug 2016 19:05:41 -0500 Subject: Fix broken feature spec. This older spec was failing: features/project/issues/issues.feature Looks like before we were doing an exact match for queries, that's why it was passing with this existing issue: https://gitlab.com/gitlab-org/gitlab-ce/blob/59fa031e6f7d5a1b658c370f581c4caaf4493150/features/project/issues/issues.feature#L128 Failed build: https://gitlab.com/gitlab-org/gitlab-ce/builds/3178231 --- features/steps/project/issues/issues.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 056462a7152..e21f76d00d9 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -299,7 +299,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'I fill in issue search with \'Rock and roll\'' do - filter_issue 'Description for issue' + filter_issue 'Rock and roll' end step 'I should see \'Bugfix1\' in issues' do -- cgit v1.2.3 From 396f85e438ddc9bcd89f5a557980ce82b71e098b Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Thu, 18 Aug 2016 17:01:50 +0100 Subject: Add expiration date to group memberships --- features/steps/group/members.rb | 2 +- features/steps/project/team_management.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'features') diff --git a/features/steps/group/members.rb b/features/steps/group/members.rb index 956a0026e1a..e9b45823c67 100644 --- a/features/steps/group/members.rb +++ b/features/steps/group/members.rb @@ -117,7 +117,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps page.within "#group_member_#{member.id}" do click_button 'Edit' - select 'Developer', from: 'group_member_access_level' + select 'Developer', from: "member_access_level_#{member.id}" click_on 'Save' end end diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb index 334ce7dd3db..e920f5a706b 100644 --- a/features/steps/project/team_management.rb +++ b/features/steps/project/team_management.rb @@ -66,7 +66,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps project_member = project.project_members.find_by(user_id: user.id) page.within "#project_member_#{project_member.id}" do click_button 'Edit' - select "Reporter", from: "project_member_access_level" + select "Reporter", from: "member_access_level_#{project_member.id}" click_button "Save" end end -- cgit v1.2.3 From 8db088ccc726996bdcda74373d9ce855dedf5bd5 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Thu, 18 Aug 2016 10:10:27 -0600 Subject: Don't use global variables. --- features/steps/project/source/browse_files.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'features') diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 841d191d55b..bb79424ee08 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -44,7 +44,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I should see its content with new lines preserved at end of file' do - expect(evaluate_script('blob.editor.getValue()')).to eq "Sample\n\n\n" + expect(evaluate_script('ace.edit("editor").getValue()')).to eq "Sample\n\n\n" end step 'I click link "Raw"' do @@ -65,7 +65,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps step 'I can edit code' do set_new_content - expect(evaluate_script('blob.editor.getValue()')).to eq new_gitignore_content + expect(evaluate_script('ace.edit("editor").getValue()')).to eq new_gitignore_content end step 'I edit code' do @@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I edit code with new lines at end of file' do - execute_script('blob.editor.setValue("Sample\n\n\n")') + execute_script('ace.edit("editor").setValue("Sample\n\n\n")') end step 'I fill the new file name' do @@ -378,7 +378,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps private def set_new_content - execute_script("blob.editor.setValue('#{new_gitignore_content}')") + execute_script("ace.edit('editor').setValue('#{new_gitignore_content}')") end # Content of the gitignore file on the seed repository. -- cgit v1.2.3 From 8f9a7ca854ffda26c5ce9aed2aec10bf155d0463 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Mon, 1 Aug 2016 18:34:17 +0300 Subject: Revert the revert of Optimistic Locking --- features/project/merge_requests.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature index 6bac6011467..967f2edb243 100644 --- a/features/project/merge_requests.feature +++ b/features/project/merge_requests.feature @@ -89,7 +89,7 @@ Feature: Project Merge Requests Then The list should be sorted by "Oldest updated" @javascript - Scenario: Visiting Merge Requests from a differente Project after sorting + Scenario: Visiting Merge Requests from a different Project after sorting Given I visit project "Shop" merge requests page And I sort the list by "Oldest updated" And I visit dashboard merge requests page -- cgit v1.2.3 From 4a2351185cf0430f55b69f88750d4897d9cea9d4 Mon Sep 17 00:00:00 2001 From: Sean McGivern Date: Tue, 23 Aug 2016 18:04:43 +0100 Subject: Fix Spinach branches spec --- features/project/commits/branches.feature | 1 + features/steps/project/commits/branches.rb | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'features') diff --git a/features/project/commits/branches.feature b/features/project/commits/branches.feature index 2c17d32154a..88fef674c0c 100644 --- a/features/project/commits/branches.feature +++ b/features/project/commits/branches.feature @@ -22,6 +22,7 @@ Feature: Project Commits Branches @javascript Scenario: I delete a branch Given I visit project branches page + And I filter for branch improve/awesome And I click branch 'improve/awesome' delete link Then I should not see branch 'improve/awesome' diff --git a/features/steps/project/commits/branches.rb b/features/steps/project/commits/branches.rb index 4bfb7e92e99..5f9b9e0445e 100644 --- a/features/steps/project/commits/branches.rb +++ b/features/steps/project/commits/branches.rb @@ -73,6 +73,11 @@ class Spinach::Features::ProjectCommitsBranches < Spinach::FeatureSteps expect(page).to have_content 'Branch already exists' end + step 'I filter for branch improve/awesome' do + fill_in 'branch-search', with: 'improve/awesome' + find('#branch-search').native.send_keys(:enter) + end + step "I click branch 'improve/awesome' delete link" do page.within '.js-branch-improve\/awesome' do find('.btn-remove').click -- cgit v1.2.3 From 4c8e9a8d27c34fe97216e12d17782f982818fb5c Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Thu, 18 Aug 2016 15:00:20 +0200 Subject: Remove gitorious --- features/steps/dashboard/new_project.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'features') diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb index f0d8d498e46..2f0941e4113 100644 --- a/features/steps/dashboard/new_project.rb +++ b/features/steps/dashboard/new_project.rb @@ -18,7 +18,6 @@ class Spinach::Features::NewProject < Spinach::FeatureSteps expect(page).to have_link('GitHub') expect(page).to have_link('Bitbucket') expect(page).to have_link('GitLab.com') - expect(page).to have_link('Gitorious.org') expect(page).to have_link('Google Code') expect(page).to have_link('Repo by URL') end -- cgit v1.2.3 From 77abf8cccfff01fa09a4014aea0f5afc309a7ca2 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Thu, 25 Aug 2016 10:47:40 -0500 Subject: Capitalize mentioned issue timeline notes --- features/steps/shared/issuable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/steps/shared/issuable.rb b/features/steps/shared/issuable.rb index aa666a954bc..df9845ba569 100644 --- a/features/steps/shared/issuable.rb +++ b/features/steps/shared/issuable.rb @@ -179,7 +179,7 @@ module SharedIssuable project = Project.find_by(name: from_project_name) expect(page).to have_content(user_name) - expect(page).to have_content("mentioned in #{issuable.class.to_s.titleize.downcase} #{issuable.to_reference(project)}") + expect(page).to have_content("Mentioned in #{issuable.class.to_s.titleize.downcase} #{issuable.to_reference(project)}") end def expect_sidebar_content(content) -- cgit v1.2.3