Commit 903e1a30 authored by Phil Hughes's avatar Phil Hughes

spinach test updates

parent 176b3498
......@@ -47,8 +47,10 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
end
step 'I click new milestone button' do
page.within('.breadcrumbs') do
click_link "New milestone"
end
end
step 'I press create mileston button' do
click_button "Create milestone"
......
......@@ -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 '.nav-sidebar' do
click_link('Repository')
end
end
step 'I click the "Activity" tab' do
page.within '.sub-nav' do
page.within '.nav-sidebar' 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 '.nav-sidebar' 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
......
......@@ -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
......
......@@ -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
......
......@@ -16,8 +16,10 @@ class Spinach::Features::ProjectIssuesMilestones < Spinach::FeatureSteps
end
step 'I click link "New Milestone"' do
page.within('.breadcrumbs') do
click_link "New milestone"
end
end
step 'I submit new milestone "v2.3"' do
fill_in "milestone_title", with: "v2.3"
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -88,7 +88,7 @@ feature 'Diffs URL', js: true do
visit diffs_project_merge_request_path(project, merge_request)
# Throws `Capybara::Poltergeist::InvalidSelector` if we try to use `#hash` syntax
find("[id=\"#{changelog_id}\"] .js-edit-blob").click
find("[id=\"#{changelog_id}\"] .js-edit-blob").trigger('click')
expect(page).to have_selector('.js-fork-suggestion-button', count: 1)
expect(page).to have_selector('.js-cancel-fork-suggestion-button', count: 1)
......
......@@ -17,6 +17,8 @@ feature 'Merge requests > User posts diff notes', :js do
context 'when hovering over a parallel view diff file' do
before do
allow_any_instance_of(ApplicationHelper).to receive(:collapsed_sidebar?).and_return(true)
visit diffs_project_merge_request_path(project, merge_request, view: 'parallel')
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment