diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-03 16:09:59 -0500 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-09-03 16:09:59 -0500 |
commit | b623807682022a54344d8213d6f1c902be6ade37 (patch) | |
tree | 478ee3a25d67cb452aac09cfd42967fcfc7c22b9 /features/steps | |
parent | 28060caa0ade7566a38e3ed17f2db8bf9116dc1b (diff) | |
parent | 81002745184df28fc9d969afc524986279c653bb (diff) | |
download | gitlab-ce-b623807682022a54344d8213d6f1c902be6ade37.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/explore/projects.rb | 4 | ||||
-rw-r--r-- | features/steps/group/milestones.rb | 4 | ||||
-rw-r--r-- | features/steps/project/active_tab.rb | 16 | ||||
-rw-r--r-- | features/steps/project/fork.rb | 2 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 3 | ||||
-rw-r--r-- | features/steps/project/issues/milestones.rb | 4 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 2 | ||||
-rw-r--r-- | features/steps/project/pages.rb | 4 | ||||
-rw-r--r-- | features/steps/project/project_milestone.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/shared/active_tab.rb | 8 | ||||
-rw-r--r-- | features/steps/shared/note.rb | 7 | ||||
-rw-r--r-- | features/steps/shared/project_tab.rb | 4 |
14 files changed, 37 insertions, 27 deletions
diff --git a/features/steps/explore/projects.rb b/features/steps/explore/projects.rb index f1288c15084..8fb2ac34c32 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 '.navbar-gitlab .title' do + page.within '.breadcrumbs .title' do expect(page).to have_content 'Community' end end step 'I should see project "Internal" home page' do - page.within '.navbar-gitlab .title' do + page.within '.breadcrumbs .title' do expect(page).to have_content 'Internal' end end diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb index f6559b6be2f..20edcf75ff1 100644 --- a/features/steps/group/milestones.rb +++ b/features/steps/group/milestones.rb @@ -47,7 +47,9 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps end step 'I click new milestone button' do - click_link "New milestone" + page.within('.breadcrumbs') do + click_link "New milestone" + end end step 'I press create mileston button' do diff --git a/features/steps/project/active_tab.rb b/features/steps/project/active_tab.rb index 5cd9bd38c9d..1a18f1d7065 100644 --- a/features/steps/project/active_tab.rb +++ b/features/steps/project/active_tab.rb @@ -22,25 +22,25 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Edit Project"' do - page.within '.sub-nav' do + page.within '.nav-sidebar' do click_link('Edit Project') end end step 'I click the "Integrations" tab' do - page.within '.sub-nav' do + page.within '.nav-sidebar' do click_link('Integrations') end end step 'I click the "Repository" tab' do - page.within '.sub-nav' do + page.within '.sidebar-top-level-items > .active' do click_link('Repository') end end step 'I click the "Activity" tab' do - page.within '.sub-nav' do + page.within '.sidebar-top-level-items > .active' do click_link('Activity') end end @@ -72,7 +72,7 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Branches" tab' do - page.within '.sub-nav' do + page.within '.nav-sidebar' do click_link('Branches') end end @@ -82,7 +82,7 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps end step 'I click the "Charts" tab' do - page.within '.sub-nav' do + page.within('.sidebar-top-level-items > .active') do click_link('Charts') end end @@ -102,13 +102,13 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps # Sub Tabs: Issues step 'I click the "Milestones" sub tab' do - page.within('.sub-nav') do + page.within('.nav-sidebar') do click_link('Milestones') end end step 'I click the "Labels" sub tab' do - page.within('.sub-nav') do + page.within('.nav-sidebar') do click_link('Labels') end end diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb index dd4dff7f7a9..3b8d9af96c1 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 '.layout-nav' do + page.within '.nav-sidebar' do click_link "Merge Requests" end end diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb index 2deef9036d3..f7dd4fc21e9 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 '#content-body' do + page.within '.breadcrumbs' do page.has_link?('New Issue') ? click_link('New Issue') : click_link('New issue') end end @@ -168,6 +168,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps author: project.users.first, description: "# Description header" ) + wait_for_requests end step 'project "Shop" have "Tweet control" open issue' do diff --git a/features/steps/project/issues/milestones.rb b/features/steps/project/issues/milestones.rb index fe94eb03acd..307902a887e 100644 --- a/features/steps/project/issues/milestones.rb +++ b/features/steps/project/issues/milestones.rb @@ -16,7 +16,9 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps end step 'I click link "New Milestone"' do - click_link "New milestone" + page.within('.breadcrumbs') do + click_link "New milestone" + end end step 'I submit new milestone "v2.3"' do diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb index 7254fbc2e4e..3c3bffd7223 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 '#content-body' do + page.within '.breadcrumbs' 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/pages.rb b/features/steps/project/pages.rb index bb69c0d6e99..9705470738e 100644 --- a/features/steps/project/pages.rb +++ b/features/steps/project/pages.rb @@ -23,13 +23,13 @@ class Spinach::Features::ProjectPages < Spinach::FeatureSteps end step 'I should see the "Pages" tab' do - page.within '.sub-nav' do + page.within '.nav-sidebar' do expect(page).to have_link('Pages') end end step 'I should not see the "Pages" tab' do - page.within '.sub-nav' do + page.within '.nav-sidebar' do expect(page).not_to have_link('Pages') end end diff --git a/features/steps/project/project_milestone.rb b/features/steps/project/project_milestone.rb index a7d3352b8c4..b2d08515e77 100644 --- a/features/steps/project/project_milestone.rb +++ b/features/steps/project/project_milestone.rb @@ -55,7 +55,7 @@ class Spinach::Features::ProjectMilestone < Spinach::FeatureSteps end step 'I click link "Labels"' do - page.within('.layout-nav .nav-links') do + page.within('.nav-sidebar') do page.find(:xpath, "//a[@href='#tab-labels']").click end end diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb index 53a2463af53..100e674abed 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 '.navbar-gitlab .title' do + page.within '.breadcrumbs .title' do expect(page).to have_content 'Community' end end diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb index b0407d3f07d..96b7ba7549f 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 '#content-body' do + page.within '.breadcrumbs' do first(:link, "New snippet").click end end diff --git a/features/steps/shared/active_tab.rb b/features/steps/shared/active_tab.rb index af5db05e9e8..2bb21a798aa 100644 --- a/features/steps/shared/active_tab.rb +++ b/features/steps/shared/active_tab.rb @@ -7,11 +7,11 @@ module SharedActiveTab end def ensure_active_main_tab(content) - expect(find('.layout-nav li.active')).to have_content(content) + expect(find('.sidebar-top-level-items > li.active')).to have_content(content) end def ensure_active_sub_tab(content) - expect(find('.sub-nav li.active')).to have_content(content) + expect(find('.sidebar-sub-level-items > li.active')).to have_content(content) end def ensure_active_sub_nav(content) @@ -19,11 +19,11 @@ module SharedActiveTab end step 'no other main tabs should be active' do - expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 1) + expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1) end step 'no other sub tabs should be active' do - expect(page).to have_selector('.sub-nav li.active', count: 1) + expect(page).to have_selector('.sidebar-sub-level-items > li.active', count: 1) end step 'no other sub navs should be active' do diff --git a/features/steps/shared/note.rb b/features/steps/shared/note.rb index 492da38355c..0cd7b506a95 100644 --- a/features/steps/shared/note.rb +++ b/features/steps/shared/note.rb @@ -137,7 +137,7 @@ module SharedNote step 'The comment with the header should not have an ID' do page.within(".note-body > .note-text") do - expect(page).to have_content("Comment with a header") + expect(page).to have_content("Comment with a header") expect(page).not_to have_css("#comment-with-a-header") end end @@ -150,15 +150,20 @@ module SharedNote note.find('.js-note-edit').click end + page.find('.current-note-edit-form textarea') + page.within(".current-note-edit-form") do fill_in 'note[note]', with: '+1 Awesome!' click_button 'Save comment' end + wait_for_requests end step 'I should see +1 in the description' do page.within(".note") do expect(page).to have_content("+1 Awesome!") end + + wait_for_requests end end diff --git a/features/steps/shared/project_tab.rb b/features/steps/shared/project_tab.rb index 901f7f76ee9..5a516ee33bc 100644 --- a/features/steps/shared/project_tab.rb +++ b/features/steps/shared/project_tab.rb @@ -5,7 +5,7 @@ module SharedProjectTab include SharedActiveTab step 'the active main tab should be Project' do - ensure_active_main_tab('Project') + ensure_active_main_tab('Overview') end step 'the active main tab should be Repository' do @@ -53,7 +53,7 @@ module SharedProjectTab end step 'the active sub tab should be Home' do - ensure_active_sub_tab('Home') + ensure_active_sub_tab('Details') end step 'the active sub tab should be Activity' do |