diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/steps/explore/projects.rb | 4 | ||||
-rw-r--r-- | features/steps/group/milestones.rb | 2 | ||||
-rw-r--r-- | features/steps/project/fork.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 2 | ||||
-rw-r--r-- | features/steps/project/redirects.rb | 2 | ||||
-rw-r--r-- | features/steps/project/snippets.rb | 2 | ||||
-rw-r--r-- | features/steps/project/source/markdown_render.rb | 2 | ||||
-rw-r--r-- | features/steps/shared/active_tab.rb | 4 | ||||
-rw-r--r-- | features/steps/user.rb | 13 |
11 files changed, 16 insertions, 21 deletions
diff --git a/features/steps/explore/projects.rb b/features/steps/explore/projects.rb index 8fb2ac34c32..962e39dde9a 100644 --- a/features/steps/explore/projects.rb +++ b/features/steps/explore/projects.rb @@ -36,13 +36,13 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps end step 'I should see project "Community" home page' do - page.within '.breadcrumbs .title' do + page.within '.breadcrumbs .breadcrumb-item-text' do expect(page).to have_content 'Community' end end step 'I should see project "Internal" home page' do - page.within '.breadcrumbs .title' do + page.within '.breadcrumbs .breadcrumb-item-text' do expect(page).to have_content 'Internal' end end diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index 20edcf75ff1..818bbb50d0e 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -47,7 +47,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps end step 'I click new milestone button' do - page.within('.breadcrumbs') do + page.within('.nav-controls') do click_link "New milestone" end end diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 3b8d9af96c1..513ccce2f8f 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -37,7 +37,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps step 'I goto the Merge Requests page' do page.within '.nav-sidebar' do - click_link "Merge Requests" + first(:link, "Merge Requests").click end end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index f7dd4fc21e9..b9460f5b534 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -62,7 +62,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'I click link "New issue"' do - page.within '.breadcrumbs' do + page.within '#content-body' do page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') end end diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index 307902a887e..16a2d4a6f93 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -16,7 +16,7 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps end step 'I click link "New Milestone"' do - page.within('.breadcrumbs') do + page.within('.nav-controls') do click_link "New milestone" end end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 3c3bffd7223..0d49a4ab90d 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -14,7 +14,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps end step 'I click link "New Merge Request"' do - page.within '.breadcrumbs' do + page.within '.nav-controls' do page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') end end diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 100e674abed..9ce86ca45d0 100644 --- a/features/steps/project/redirects.rb +++ b/features/steps/project/redirects.rb @@ -18,7 +18,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps step 'I should see project "Community" home page' do Gitlab.config.gitlab.should_receive(:host).and_return("www.example.com") - page.within '.breadcrumbs .title' do + page.within '.breadcrumbs .breadcrumb-item-text' do expect(page).to have_content 'Community' end end diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index 96b7ba7549f..2a1e6b2bce8 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -23,7 +23,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps end step 'I click link "New snippet"' do - page.within '.breadcrumbs' do + page.within '.nav-controls' do first(:link, "New snippet").click end end diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb index 243a0f54f7f..f6445b57ec0 100644 --- a/features/steps/project/source/markdown_render.rb +++ b/features/steps/project/source/markdown_render.rb @@ -218,7 +218,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps # Wiki step 'I go to wiki page' do - click_link "Wiki" + first(:link, "Wiki").click expect(current_path).to eq project_wiki_path(@project, "home") end diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index 2bb21a798aa..104d024fee2 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -11,7 +11,7 @@ module SharedActiveTab end def ensure_active_sub_tab(content) - expect(find('.sidebar-sub-level-items > li.active')).to have_content(content) + expect(find('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)')).to have_content(content) end def ensure_active_sub_nav(content) @@ -23,7 +23,7 @@ module SharedActiveTab end step 'no other sub tabs should be active' do - expect(page).to have_selector('.sidebar-sub-level-items > li.active', count: 1) + expect(page).to have_selector('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)', count: 1) end step 'no other sub navs should be active' do diff --git a/features/steps/user.rb b/features/steps/user.rb index 59385a6ab59..321c1e942d5 100644 --- a/features/steps/user.rb +++ b/features/steps/user.rb @@ -17,14 +17,9 @@ class Spinach::Features::User < Spinach::FeatureSteps Issues::CreateService.new(project, user, issue_params).execute # Push code contribution - push_params = { - project: project, - action: Event::PUSHED, - author_id: user.id, - data: { commit_count: 3 } - } - - Event.create(push_params) + event = create(:push_event, project: project, author: user) + + create(:push_event_payload, event: event, commit_count: 3) end step 'I should see contributed projects' do @@ -38,6 +33,6 @@ class Spinach::Features::User < Spinach::FeatureSteps end def contributed_project - @contributed_project ||= create(:project, :public) + @contributed_project ||= create(:project, :public, :empty_repo) end end |