From f18ec70743375024aa7ec7bb86c437ca9198e729 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 4 May 2016 17:05:16 -0400 Subject: Backport changes from gitlab-org/gitlab-ee!372 Mostly replaces several Spinach tests with RSpec Feature tests. --- features/steps/project/create.rb | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/create.rb b/features/steps/project/create.rb index 422b151eaa2..5f5f806df36 100644 --- a/features/steps/project/create.rb +++ b/features/steps/project/create.rb @@ -13,33 +13,9 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps expect(current_path).to eq namespace_project_path(Project.last.namespace, Project.last) end - step 'I should see empty project instuctions' do + step 'I should see empty project instructions' do expect(page).to have_content "git init" expect(page).to have_content "git remote" expect(page).to have_content Project.last.url_to_repo end - - step 'I see empty project instuctions' do - expect(page).to have_content "git init" - expect(page).to have_content "git remote" - expect(page).to have_content Project.last.url_to_repo - end - - step 'I click on HTTP' do - find('#clone-dropdown').click - find('.http-selector').click - end - - step 'Remote url should update to http link' do - expect(page).to have_content "git remote add origin #{Project.last.http_url_to_repo}" - end - - step 'If I click on SSH' do - find('#clone-dropdown').click - find('.ssh-selector').click - end - - step 'Remote url should update to ssh link' do - expect(page).to have_content "git remote add origin #{Project.last.url_to_repo}" - end end -- cgit v1.2.1 From a19508d6b79aa3a399f479b09b52b35b5289a92a Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Mon, 9 May 2016 13:58:43 +0200 Subject: Fix test failures --- features/steps/project/hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb index b1ffe7f7b4c..13c0713669a 100644 --- a/features/steps/project/hooks.rb +++ b/features/steps/project/hooks.rb @@ -59,7 +59,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps step 'hook should be triggered' do expect(current_path).to eq namespace_project_hooks_path(current_project.namespace, current_project) expect(page).to have_selector '.flash-notice', - text: 'Hook successfully executed.' + text: 'Hook executed successfully: HTTP 200' end step 'I should see hook error message' do -- cgit v1.2.1 From 1026f2ad0982493cb5465404ef4ebe71a0082bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 20 Apr 2016 14:34:28 +0200 Subject: Add integration specs for tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- features/steps/project/commits/tags.rb | 90 ---------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 features/steps/project/commits/tags.rb (limited to 'features/steps/project') diff --git a/features/steps/project/commits/tags.rb b/features/steps/project/commits/tags.rb deleted file mode 100644 index 912ba580efd..00000000000 --- a/features/steps/project/commits/tags.rb +++ /dev/null @@ -1,90 +0,0 @@ -class Spinach::Features::ProjectCommitsTags < Spinach::FeatureSteps - include SharedAuthentication - include SharedProject - include SharedPaths - - step 'I should see "Shop" all tags list' do - expect(page).to have_content "Tags" - expect(page).to have_content "v1.0.0" - end - - step 'I click new tag link' do - click_link 'New tag' - end - - step 'I submit new tag form' do - fill_in 'tag_name', with: 'v7.0' - fill_in 'ref', with: 'master' - click_button 'Create tag' - end - - step 'I submit new tag form with release notes' do - fill_in 'tag_name', with: 'v7.0' - fill_in 'ref', with: 'master' - fill_in 'release_description', with: 'Awesome release notes' - click_button 'Create tag' - end - - step 'I fill release notes and submit form' do - fill_in 'release_description', with: 'Awesome release notes' - click_button 'Save changes' - end - - step 'I submit new tag form with invalid name' do - fill_in 'tag_name', with: 'v 1.0' - fill_in 'ref', with: 'master' - click_button 'Create tag' - end - - step 'I submit new tag form with invalid reference' do - fill_in 'tag_name', with: 'foo' - fill_in 'ref', with: 'foo' - click_button 'Create tag' - end - - step 'I submit new tag form with tag that already exists' do - fill_in 'tag_name', with: 'v1.0.0' - fill_in 'ref', with: 'master' - click_button 'Create tag' - end - - step 'I should see new tag created' do - expect(page).to have_content 'v7.0' - end - - step 'I should see new an error that tag is invalid' do - expect(page).to have_content 'Tag name invalid' - end - - step 'I should see new an error that tag ref is invalid' do - expect(page).to have_content 'Target foo is invalid' - end - - step 'I should see new an error that tag already exists' do - expect(page).to have_content 'Tag v1.0.0 already exists' - end - - step "I visit tag 'v1.1.0' page" do - click_link 'v1.1.0' - end - - step "I delete tag 'v1.1.0'" do - page.within('.content') do - first('.btn-remove').click - end - end - - step "I should not see tag 'v1.1.0'" do - page.within '.tags' do - expect(page).not_to have_link 'v1.1.0' - end - end - - step 'I click edit tag link' do - click_link 'Edit release notes' - end - - step 'I should see tag release notes' do - expect(page).to have_content 'Awesome release notes' - end -end -- cgit v1.2.1 From dccf8a9fc8d4dde91942944f6b47387bfb13c380 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Mon, 25 Apr 2016 20:10:20 +0200 Subject: Add tests on Awardables and Award Emoji --- features/steps/project/issues/issues.rb | 10 +++++----- features/steps/project/merge_requests.rb | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index fc12843ea5c..78ddaee8771 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -191,15 +191,15 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps end step 'issue "Release 0.4" have 2 upvotes and 1 downvote' do - issue = Issue.find_by(title: 'Release 0.4') - create_list(:upvote_note, 2, project: project, noteable: issue) - create(:downvote_note, project: project, noteable: issue) + awardable = Issue.find_by(title: 'Release 0.4') + create_list(:upvote, 2, project: project, awardable: awardable) + create(:downvote, project: project, awardable: awardable) end step 'issue "Tweet control" have 1 upvote and 2 downvotes' do issue = Issue.find_by(title: 'Tweet control') - create(:upvote_note, project: project, noteable: issue) - create_list(:downvote_note, 2, project: project, noteable: issue) + create(:upvote, project: project, noteable: issue) + create_list(:downvote, 2, project: project, noteable: issue) end step 'The list should be sorted by "Least popular"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 4f883fe7c27..1d619a11d23 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -179,14 +179,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'merge request "Bug NS-04" have 2 upvotes and 1 downvote' do merge_request = MergeRequest.find_by(title: 'Bug NS-04') - create_list(:upvote_note, 2, project: project, noteable: merge_request) - create(:downvote_note, project: project, noteable: merge_request) + create_list(:upvote, 2, project: project, awardable: merge_request) + create(:downvote, project: project, awardable: merge_request) end step 'merge request "Bug NS-06" have 1 upvote and 2 downvotes' do - merge_request = MergeRequest.find_by(title: 'Bug NS-06') - create(:upvote_note, project: project, noteable: merge_request) - create_list(:downvote_note, 2, project: project, noteable: merge_request) + awardable = MergeRequest.find_by(title: 'Bug NS-06') + create(:upvote, project: project, awardable: awardable) + create_list(:downvote, 2, project: project, awardable: awardable) end step 'The list should be sorted by "Least popular"' do -- cgit v1.2.1 From f5a0ac0fc197bae2eb5fe1045ed237cdbbaf6ea4 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Tue, 10 May 2016 23:58:06 -0300 Subject: Codestyle: make sure we have space around operators --- features/steps/project/team_management.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/team_management.rb b/features/steps/project/team_management.rb index 3fbcf770b62..c6ced747370 100644 --- a/features/steps/project/team_management.rb +++ b/features/steps/project/team_management.rb @@ -126,7 +126,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps step 'I share project with group "OpenSource"' do project = Project.find_by(name: 'Shop') - os_group = create(:group, name: 'OpenSource') + os_group = create(:group, name: 'OpenSource') create(:project, group: os_group) @os_user1 = create(:user) @os_user2 = create(:user) -- cgit v1.2.1 From 7d907acc3805a692fd9f6f29e529c5b5fe15ec11 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Sat, 14 May 2016 14:51:57 -0500 Subject: Fix spinach tests --- features/steps/project/merge_requests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 3b1a00f628a..b79d19f1c58 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -525,7 +525,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'I should see merge request "Bug NS-05" with CI status' do page.within ".mr-list" do - expect(page).to have_link "Build pending" + expect(page).to have_link "Pipeline: pending" end end -- cgit v1.2.1 From 79b9ff60768644287daace5a8f640d1790816353 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 16 May 2016 12:36:27 -0500 Subject: Modify tests to match new navigation behaviour for project pages Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 28 ++++++++++++++++------------ features/steps/project/fork.rb | 2 +- features/steps/project/project.rb | 12 +++--------- features/steps/project/project_milestone.rb | 2 +- 4 files changed, 21 insertions(+), 23 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 19d81453d8c..4a5a71e7e61 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -16,12 +16,14 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Snippets" tab' do - click_link('Snippets') + page.within('.layout-nav') do + click_link('Snippets') + end end - step 'I click the "Edit" tab' do - page.within '.sidebar-subnav' do - click_link('Project Settings') + step 'I click the "Edit Project"' do + page.within '.layout-nav .controls' do + click_link('Edit Project') end end @@ -33,14 +35,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Deploy Keys') end - step 'the active sub nav should be Team' do + step 'the active sub nav should be Members' do ensure_active_sub_nav('Members') end - step 'the active sub nav should be Edit' do - ensure_active_sub_nav('Project') - end - step 'the active sub nav should be Hooks' do ensure_active_sub_nav('Webhooks') end @@ -56,7 +54,9 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Branches" tab' do - click_link('Branches') + page.within '.content' do + click_link('Branches') + end end step 'I click the "Tags" tab' do @@ -82,11 +82,15 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps # Sub Tabs: Issues step 'I click the "Milestones" tab' do - click_link('Milestones') + page.within('.layout-nav') do + click_link('Milestones') + end end step 'I click the "Labels" tab' do - click_link('Labels') + page.within('.layout-nav') do + click_link('Labels') + end end step 'the active sub tab should be Issues' do diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index 527f7853da9..8abeb5ee242 100644 --- a/features/steps/project/fork.rb +++ b/features/steps/project/fork.rb @@ -36,7 +36,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps end step 'I goto the Merge Requests page' do - page.within '.page-sidebar-expanded' do + page.within '.layout-nav' do click_link "Merge Requests" end end diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index ef185861e00..a1785311c2b 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -114,7 +114,9 @@ class Spinach::Features::Project < Spinach::FeatureSteps end step 'I should not see "Snippets" button' do - expect(page).not_to have_link 'Snippets' + page.within '.content' do + expect(page).not_to have_link 'Snippets' + end end step 'project "Shop" belongs to group' do @@ -123,14 +125,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps @project.save! end - step 'I should see back to dashboard button' do - expect(page).to have_content 'Go to dashboard' - end - - step 'I should see back to group button' do - expect(page).to have_content 'Go to group' - end - step 'I click notifications drop down button' do click_link 'notifications-button' end diff --git a/features/steps/project/project_milestone.rb b/features/steps/project/project_milestone.rb index 2508c09e36d..1864b3a2b52 100644 --- a/features/steps/project/project_milestone.rb +++ b/features/steps/project/project_milestone.rb @@ -52,7 +52,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps end step 'I click link "Labels"' do - page.within('.nav-links') do + page.within('.layout-nav .nav-links') do page.find(:xpath, "//a[@href='#tab-labels']").click end end -- cgit v1.2.1 From ff5109e19cc6a34c8919da1be4aa6f7b53afdef9 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 16 May 2016 17:36:06 -0500 Subject: Fix shortcuts tests Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/project_shortcuts.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'features/steps/project') diff --git a/features/steps/project/project_shortcuts.rb b/features/steps/project/project_shortcuts.rb index 49e9c5520bb..8143b01ca40 100644 --- a/features/steps/project/project_shortcuts.rb +++ b/features/steps/project/project_shortcuts.rb @@ -3,6 +3,7 @@ class Spinach::Features::ProjectShortcuts < Spinach::FeatureSteps include SharedPaths include SharedProject include SharedProjectTab + include SharedShortcuts step 'I press "g" and "f"' do find('body').native.send_key('g') -- cgit v1.2.1 From 442083e0fcc2d7ee9a3b202a1ebfdeaa659bb6ad Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 16 May 2016 17:56:39 -0500 Subject: Fix file browsing test Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/source/browse_files.rb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index c26d7a15212..2c0498de3b9 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -337,13 +337,15 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I should see buttons for allowed commands' do - expect(page).to have_content 'Raw' - expect(page).to have_content 'History' - expect(page).to have_content 'Permalink' - expect(page).not_to have_content 'Edit' - expect(page).not_to have_content 'Blame' - expect(page).to have_content 'Delete' - expect(page).to have_content 'Replace' + page.within '.content' do + expect(page).to have_content 'Raw' + expect(page).to have_content 'History' + expect(page).to have_content 'Permalink' + expect(page).not_to have_content 'Edit' + expect(page).not_to have_content 'Blame' + expect(page).to have_content 'Delete' + expect(page).to have_content 'Replace' + end end step 'I should see a notice about a new fork having been created' do -- cgit v1.2.1 From bfc6799c9367a0bb249e1d4eeece5485e16ec6a5 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 16 May 2016 18:13:44 -0500 Subject: Fix spinach tests --- features/steps/project/commits/commits.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index 93c37bf507f..f33f37be951 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -173,7 +173,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I see commit ci info' do - expect(page).to have_content "build: pending" + expect(page).to have_content "Builds for 1 pipeline pending" end step 'I click status link' do @@ -181,7 +181,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I see builds list' do - expect(page).to have_content "build: pending" + expect(page).to have_content "Builds for 1 pipeline pending" expect(page).to have_content "1 build" end -- cgit v1.2.1 From d53bfcb0bb320d0f182ba7967dba7be3be4e3280 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 19 May 2016 10:01:27 +0100 Subject: Updated snippets tests --- features/steps/project/snippets.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index 786a0cad975..beb8ecfc799 100644 --- a/features/steps/project/snippets.rb +++ b/features/steps/project/snippets.rb @@ -43,12 +43,12 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps step 'I click link "Edit"' do page.within ".detail-page-header" do - click_link "Edit" + first(:link, "Edit").click end end step 'I click link "Delete"' do - click_link "Delete" + first(:link, "Delete").click end step 'I submit new snippet "Snippet three"' do -- cgit v1.2.1 From 1a85f80b789ec966742fd58f21e8c347d2ac0a06 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Sun, 22 May 2016 10:41:30 -0600 Subject: Fix grammar and wording in text on various pages. --- features/steps/project/issues/labels.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index 0ca2d6257c3..8d87f6a7a58 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -24,8 +24,8 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I should see labels help message' do page.within '.labels' do - expect(page).to have_content 'Create first label or generate default set of '\ - 'labels' + expect(page).to have_content 'Create a label or generate a default set '\ + 'of labels' end end -- cgit v1.2.1 From 75739e54be0fca389c05d3d9d3de69737c0ff3ab Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Mon, 23 May 2016 19:37:59 -0400 Subject: Enable RSpec/NotToNot cop and auto-correct offenses Also removes the note from the development/testing.md guide --- features/steps/project/commits/commits.rb | 2 +- features/steps/project/issues/award_emoji.rb | 4 ++-- features/steps/project/issues/issues.rb | 4 ++-- features/steps/project/merge_requests.rb | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index f33f37be951..e1b29f1e57a 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -105,7 +105,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'I should not see button to create a new merge request' do - expect(page).to_not have_link 'Create Merge Request' + expect(page).not_to have_link 'Create Merge Request' end step 'I should see button to the merge request' do diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb index c5d45709b44..1b14659b4df 100644 --- a/features/steps/project/issues/award_emoji.rb +++ b/features/steps/project/issues/award_emoji.rb @@ -39,8 +39,8 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps step 'I can see the activity and food categories' do page.within '.emoji-menu' do - expect(page).to_not have_selector 'Activity' - expect(page).to_not have_selector 'Food' + expect(page).not_to have_selector 'Activity' + expect(page).not_to have_selector 'Food' end end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index fc12843ea5c..f2c68f007ef 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -216,7 +216,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps page.within 'li.issue:nth-child(3)' do expect(page).to have_content 'Bugfix' - expect(page).to_not have_content '0 0' + expect(page).not_to have_content '0 0' end end end @@ -235,7 +235,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps page.within 'li.issue:nth-child(3)' do expect(page).to have_content 'Bugfix' - expect(page).to_not have_content '0 0' + expect(page).not_to have_content '0 0' end end end diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index b79d19f1c58..cfa586f859f 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -203,7 +203,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps page.within 'li.merge-request:nth-child(3)' do expect(page).to have_content 'Bug NS-05' - expect(page).to_not have_content '0 0' + expect(page).not_to have_content '0 0' end end end @@ -222,7 +222,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps page.within 'li.merge-request:nth-child(3)' do expect(page).to have_content 'Bug NS-05' - expect(page).to_not have_content '0 0' + expect(page).not_to have_content '0 0' end end end -- cgit v1.2.1 From 6523002267e63e301693c141f6de2c6bbf6e2e73 Mon Sep 17 00:00:00 2001 From: ZJ van de Weg Date: Wed, 25 May 2016 15:43:07 +0200 Subject: Remove old tests, and use right factories --- features/steps/project/issues/issues.rb | 10 +++++----- features/steps/project/merge_requests.rb | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 78ddaee8771..530ba604300 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -192,14 +192,14 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'issue "Release 0.4" have 2 upvotes and 1 downvote' do awardable = Issue.find_by(title: 'Release 0.4') - create_list(:upvote, 2, project: project, awardable: awardable) - create(:downvote, project: project, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable) + create(:award_emoji, :downvote, awardable: awardable) end step 'issue "Tweet control" have 1 upvote and 2 downvotes' do - issue = Issue.find_by(title: 'Tweet control') - create(:upvote, project: project, noteable: issue) - create_list(:downvote, 2, project: project, noteable: issue) + awardable = Issue.find_by(title: 'Tweet control') + create(:award_emoji, :upvote, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable, name: 'thumbsdown') end step 'The list should be sorted by "Least popular"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index bdb126c6ede..692a01c7f74 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -179,14 +179,14 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'merge request "Bug NS-04" have 2 upvotes and 1 downvote' do merge_request = MergeRequest.find_by(title: 'Bug NS-04') - create_list(:upvote, 2, project: project, awardable: merge_request) - create(:downvote, project: project, awardable: merge_request) + create_list(:award_emoji, 2, awardable: merge_request) + create(:award_emoji, :downvote, awardable: merge_request) end step 'merge request "Bug NS-06" have 1 upvote and 2 downvotes' do awardable = MergeRequest.find_by(title: 'Bug NS-06') - create(:upvote, project: project, awardable: awardable) - create_list(:downvote, 2, project: project, awardable: awardable) + create(:award_emoji, awardable: awardable) + create_list(:award_emoji, 2, awardable: awardable, name: "thumbsdown") end step 'The list should be sorted by "Least popular"' do -- cgit v1.2.1 From e558edd1ce47c3c056dd95c0eba8fd811ee749c7 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 26 Apr 2016 13:52:18 +0200 Subject: Update specs to carry out changes in note factory --- features/steps/project/issues/issues.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index f2c68f007ef..5cd431e05d5 100644 --- a/features/steps/project/issues/issues.rb +++ b/features/steps/project/issues/issues.rb @@ -348,7 +348,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps step 'another user adds a comment with text "Yay!" to issue "Release 0.4"' do issue = Issue.find_by!(title: 'Release 0.4') - create(:note_on_issue, noteable: issue, note: 'Yay!') + create(:note_on_issue, noteable: issue, project: project, note: 'Yay!') end step 'I should see a new comment with text "Yay!"' do -- cgit v1.2.1 From dbba60029c84fa091350d3a7d8b2e73cfec25f7e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 18 May 2016 19:38:52 +0200 Subject: Improve note factory --- features/steps/project/merge_requests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index cfa586f859f..b2fa8750234 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -273,7 +273,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'user "John Doe" leaves a comment like "Line is wrong" on diff' do mr = MergeRequest.find_by(title: "Bug NS-05") create(:note_on_merge_request_diff, project: project, - noteable_id: mr.id, + noteable: mr, author: user_exists("John Doe"), line_code: sample_commit.line_code, note: 'Line is wrong') -- cgit v1.2.1 From 2bb0eecb206c4c3345dcf4771c5ce8d60d91bc7f Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 30 May 2016 14:41:34 +0200 Subject: Enable Style/SpaceAfterMethodName rubocop cop See #17478 --- features/steps/project/merge_requests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index b2fa8750234..b30346790eb 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -567,7 +567,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps click_diff_line(sample_compare.changes[1][:line_code]) end - def have_visible_content (text) + def have_visible_content(text) have_css("*", text: text, visible: true) end -- cgit v1.2.1 From 91a7b9333b660abc866e52e1a614151cb529413d Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Wed, 1 Jun 2016 11:23:09 +0200 Subject: Incorportate feedback --- features/steps/project/merge_requests.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index f6fafe81194..11978aa65a1 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -186,7 +186,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step 'merge request "Bug NS-06" have 1 upvote and 2 downvotes' do awardable = MergeRequest.find_by(title: 'Bug NS-06') create(:award_emoji, awardable: awardable) - create_list(:award_emoji, 2, awardable: awardable, name: "thumbsdown") + create_list(:award_emoji, 2, :downvote, awardable: awardable) end step 'The list should be sorted by "Least popular"' do -- cgit v1.2.1 From 021d3810c300d1e0514f21ccb6f1439f59e20565 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 2 Jun 2016 16:19:18 +0200 Subject: Rename Ci::Commit to Ci::Pipeline and rename some of the ci_commit to pipeline --- features/steps/project/commits/commits.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index e1b29f1e57a..bf01a78cb33 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -169,7 +169,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps end step 'repository contains ".gitlab-ci.yml" file' do - allow_any_instance_of(Ci::Commit).to receive(:ci_yaml_file).and_return(String.new) + allow_any_instance_of(Ci::Pipeline).to receive(:ci_yaml_file).and_return(String.new) end step 'I see commit ci info' do -- cgit v1.2.1 From 2605a0a844f187daeeff1f16920db445f53e2793 Mon Sep 17 00:00:00 2001 From: Josh Frye Date: Wed, 1 Jun 2016 10:50:32 -0400 Subject: Refactor. Add tests. --- features/steps/project/builds/summary.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'features/steps/project') diff --git a/features/steps/project/builds/summary.rb b/features/steps/project/builds/summary.rb index e9e2359146e..374eb0b0e07 100644 --- a/features/steps/project/builds/summary.rb +++ b/features/steps/project/builds/summary.rb @@ -36,4 +36,8 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps expect(page).to have_content 'Build has been erased' end end + + step 'the build count cache is updated' do + expect(@build.project.running_or_pending_build_count).to eq @build.project.builds.running_or_pending.count(:all) + end end -- cgit v1.2.1 From 7cfb445c15bdec0268f0a3800481e9cced973648 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 19:35:46 +0300 Subject: Update tests to match new Code tab logic Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'features/steps/project') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 4a5a71e7e61..7db0d337192 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -63,6 +63,10 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Tags') end + step 'the active sub tab should be Files' do + ensure_active_sub_tab('Files') + end + step 'the active sub tab should be Commits' do ensure_active_sub_tab('Commits') end -- cgit v1.2.1 From db2109b086340a5bf5e049aa16f22a76c0a5aec7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 2 Jun 2016 22:32:22 +0300 Subject: Fix more tests with new Code tab Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 8 -------- features/steps/project/project_find_file.rb | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 7db0d337192..745fd3471c4 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -63,14 +63,6 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps click_link('Tags') end - step 'the active sub tab should be Files' do - ensure_active_sub_tab('Files') - end - - step 'the active sub tab should be Commits' do - ensure_active_sub_tab('Commits') - end - step 'the active sub tab should be Compare' do ensure_active_sub_tab('Compare') end diff --git a/features/steps/project/project_find_file.rb b/features/steps/project/project_find_file.rb index 8c1d09d6cc6..47de4b91df1 100644 --- a/features/steps/project/project_find_file.rb +++ b/features/steps/project/project_find_file.rb @@ -13,12 +13,12 @@ class Spinach::Features::ProjectFindFile < Spinach::FeatureSteps end step 'I should see "find file" page' do - ensure_active_main_tab('Files') + ensure_active_main_tab('Code') expect(page).to have_selector('.file-finder-holder', count: 1) end step 'I fill in Find by path with "git"' do - ensure_active_main_tab('Files') + ensure_active_main_tab('Code') expect(page).to have_selector('.file-finder-holder', count: 1) end -- cgit v1.2.1 From 717fdd6d42f119dd1e0f457c40563cc35985fbae Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 3 Jun 2016 12:29:00 +0200 Subject: Rename Ci::Build commit to pipeline --- features/steps/project/commits/commits.rb | 2 +- features/steps/project/merge_requests.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index bf01a78cb33..33d3eeab0d2 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -165,7 +165,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps step 'commit has ci status' do @project.enable_ci ci_commit = create :ci_commit, project: @project, sha: sample_commit.id - create :ci_build, commit: ci_commit + create :ci_build, pipeline: ci_commit end step 'repository contains ".gitlab-ci.yml" file' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index b30346790eb..0ac7d3a250a 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -520,7 +520,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps project = merge_request.source_project project.enable_ci ci_commit = create :ci_commit, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch - create :ci_build, commit: ci_commit + create :ci_build, pipeline: ci_commit end step 'I should see merge request "Bug NS-05" with CI status' do -- cgit v1.2.1 From 20c7144ed20bad499b878425d5fbab408ad066b5 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 3 Jun 2016 16:22:26 +0200 Subject: Rename all `[ci_]commit` to `[ci_]pipeline` in specs and features --- features/steps/project/commits/commits.rb | 4 ++-- features/steps/project/merge_requests.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb index 33d3eeab0d2..239036e431d 100644 --- a/features/steps/project/commits/commits.rb +++ b/features/steps/project/commits/commits.rb @@ -164,8 +164,8 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps step 'commit has ci status' do @project.enable_ci - ci_commit = create :ci_commit, project: @project, sha: sample_commit.id - create :ci_build, pipeline: ci_commit + pipeline = create :ci_pipeline, project: @project, sha: sample_commit.id + create :ci_build, pipeline: pipeline end step 'repository contains ".gitlab-ci.yml" file' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 0ac7d3a250a..37aa169881a 100644 --- a/features/steps/project/merge_requests.rb +++ b/features/steps/project/merge_requests.rb @@ -519,8 +519,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps step '"Bug NS-05" has CI status' do project = merge_request.source_project project.enable_ci - ci_commit = create :ci_commit, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch - create :ci_build, pipeline: ci_commit + pipeline = create :ci_pipeline, project: project, sha: merge_request.last_commit.id, ref: merge_request.source_branch + create :ci_build, pipeline: pipeline end step 'I should see merge request "Bug NS-05" with CI status' do -- cgit v1.2.1 From 5a474ff8dafcd238f8bc3d93a34ff2093d0332a6 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Wed, 27 Apr 2016 11:24:11 -0500 Subject: Ensure we are clicking a visible dropdown --- features/steps/project/issues/filter_labels.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/filter_labels.rb b/features/steps/project/issues/filter_labels.rb index d82c6856918..d34fa694789 100644 --- a/features/steps/project/issues/filter_labels.rb +++ b/features/steps/project/issues/filter_labels.rb @@ -29,7 +29,7 @@ class Spinach::Features::ProjectIssuesFilterLabels < Spinach::FeatureSteps end step 'I click link "bug"' do - page.find('.js-label-select').click + page.find('.js-label-select', visible: true).click sleep 0.5 execute_script("$('.dropdown-menu-labels li:contains(\"bug\") a').click()") end -- cgit v1.2.1 From d6cecf7addc00e4cae61d4ecbb5b82e3187d0f44 Mon Sep 17 00:00:00 2001 From: Alfredo Sumaran Date: Fri, 20 May 2016 16:11:29 -0500 Subject: Fix failing tests --- features/steps/project/issues/labels.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index 8d87f6a7a58..e02b57bbf84 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -60,25 +60,25 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps end step 'I should see label \'feature\'' do - page.within '.manage-labels-list' do + page.within '.other-labels .manage-labels-list' do expect(page).to have_content 'feature' end end step 'I should see label \'bug\'' do - page.within '.manage-labels-list' do + page.within '.other-labels .manage-labels-list' do expect(page).to have_content 'bug' end end step 'I should not see label \'bug\'' do - page.within '.manage-labels-list' do + page.within '.other-labels .manage-labels-list' do expect(page).not_to have_content 'bug' end end step 'I should see label \'support\'' do - page.within '.manage-labels-list' do + page.within '.other-labels .manage-labels-list' do expect(page).to have_content 'support' end end @@ -90,7 +90,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps end step 'I should see label \'fix\'' do - page.within '.manage-labels-list' do + page.within '.other-labels .manage-labels-list' do expect(page).to have_content 'fix' end end -- cgit v1.2.1 From 51a62fce040a307955d6e66d0a22f1bbfa068b38 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 31 May 2016 11:38:54 +0100 Subject: Fixed failing tests --- features/steps/project/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index a1785311c2b..2a1a8e776f0 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -126,7 +126,7 @@ class Spinach::Features::Project < Spinach::FeatureSteps end step 'I click notifications drop down button' do - click_link 'notifications-button' + find('#notifications-button').click end step 'I choose Mention setting' do -- cgit v1.2.1 From e6b1d1669b362ad4cea27ac44e89e73f4d6e92fd Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Wed, 8 Jun 2016 10:32:50 +0530 Subject: Hook up the updated `WikiLinkFilter` to the wiki controllers. - Need to pass in a `page_slug` to the filter, so it can rewrite based on the current page (all links are rewritten to the level of the app root). - The earlier `markdown_preview` endpoint was at the level of the wiki. We need to know the current page (for rewriting, as above), so this commit moves the endpoint to the level of a wiki page. - Fix all tests --- features/steps/project/wiki.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb index 9f6aed1c5b9..3cbf832c728 100644 --- a/features/steps/project/wiki.rb +++ b/features/steps/project/wiki.rb @@ -97,7 +97,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps file = Gollum::File.new(wiki.wiki) Gollum::Wiki.any_instance.stub(:file).with("image.jpg", "master", true).and_return(file) Gollum::File.any_instance.stub(:mime_type).and_return("image/jpeg") - expect(page).to have_link('image', href: "image.jpg") + expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") click_on "image" end @@ -113,7 +113,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps end step 'I click on image link' do - expect(page).to have_link('image', href: "image.jpg") + expect(page).to have_link('image', href: "#{wiki.wiki_base_path}/image.jpg") click_on "image" end -- cgit v1.2.1 From 051dc1d263b6be305c30e928238f4f7389200433 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 24 May 2016 14:16:22 +0100 Subject: Fixed failing tests --- features/steps/project/issues/labels.rb | 2 +- features/steps/project/labels.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb index e02b57bbf84..2937d5d7ca8 100644 --- a/features/steps/project/issues/labels.rb +++ b/features/steps/project/issues/labels.rb @@ -9,7 +9,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps step 'I remove label \'bug\'' do page.within "#label_#{bug_label.id}" do - click_link 'Delete' + first(:link, 'Delete').click end end diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb index 5bb02189021..eff05783bcf 100644 --- a/features/steps/project/labels.rb +++ b/features/steps/project/labels.rb @@ -29,6 +29,6 @@ class Spinach::Features::Labels < Spinach::FeatureSteps private def subscribe_button - first('.label-subscribe-button span') + first('.label-subscribe-button span', visible: true) end end -- cgit v1.2.1 From 8e8ec82d35a1e905d95b96dfb476e00eff2f9bc0 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 25 May 2016 15:08:00 +0100 Subject: Tests update --- features/steps/project/labels.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb index eff05783bcf..59a780073c3 100644 --- a/features/steps/project/labels.rb +++ b/features/steps/project/labels.rb @@ -29,6 +29,6 @@ class Spinach::Features::Labels < Spinach::FeatureSteps private def subscribe_button - first('.label-subscribe-button span', visible: true) + first('.js-subscribe-button span', visible: true) end end -- cgit v1.2.1 From b0a80f69e3f96b4f259a8b4ee9cedc7e6b64745a Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Thu, 26 May 2016 09:37:54 +0100 Subject: Fixed failing label subscribe test --- features/steps/project/labels.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features/steps/project') diff --git a/features/steps/project/labels.rb b/features/steps/project/labels.rb index 59a780073c3..118ffef4774 100644 --- a/features/steps/project/labels.rb +++ b/features/steps/project/labels.rb @@ -29,6 +29,6 @@ class Spinach::Features::Labels < Spinach::FeatureSteps private def subscribe_button - first('.js-subscribe-button span', visible: true) + first('.js-subscribe-button', visible: true) end end -- cgit v1.2.1 From dc6ec2adf82c2b2fe1ab6ef076432fd741d3afbb Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Wed, 20 Apr 2016 10:11:22 +0100 Subject: CI build page UI update Added sidebar Removed elements not present in design --- features/steps/project/builds/artifacts.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/builds/artifacts.rb b/features/steps/project/builds/artifacts.rb index 1bdb57af9d1..2876e8812e9 100644 --- a/features/steps/project/builds/artifacts.rb +++ b/features/steps/project/builds/artifacts.rb @@ -5,11 +5,11 @@ class Spinach::Features::ProjectBuildsArtifacts < Spinach::FeatureSteps include RepoHelpers step 'I click artifacts download button' do - page.within('.artifacts') { click_link 'Download' } + click_link 'Download' end step 'I click artifacts browse button' do - page.within('.artifacts') { click_link 'Browse' } + click_link 'Browse' end step 'I should see content of artifacts archive' do -- cgit v1.2.1 From d4b2f5d0f3baf4e3644c0e0f71ffb2995fb72a57 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 10 Jun 2016 18:33:44 +0300 Subject: Render only issues/mr in subnav depends on context Signed-off-by: Dmitriy Zaporozhets --- features/steps/project/active_tab.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'features/steps/project') diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 745fd3471c4..80043463188 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -77,14 +77,14 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps # Sub Tabs: Issues - step 'I click the "Milestones" tab' do - page.within('.layout-nav') do + step 'I click the "Milestones" sub tab' do + page.within('.sub-nav') do click_link('Milestones') end end - step 'I click the "Labels" tab' do - page.within('.layout-nav') do + step 'I click the "Labels" sub tab' do + page.within('.sub-nav') do click_link('Labels') end end @@ -93,11 +93,11 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps ensure_active_sub_tab('Issues') end - step 'the active main tab should be Milestones' do - ensure_active_main_tab('Milestones') + step 'the active sub tab should be Milestones' do + ensure_active_sub_tab('Milestones') end - step 'the active main tab should be Labels' do - ensure_active_main_tab('Labels') + step 'the active sub tab should be Labels' do + ensure_active_sub_tab('Labels') end end -- cgit v1.2.1