Commit d92bff4e authored by Phil Hughes's avatar Phil Hughes

more spec fixes

parent 4a67699e
...@@ -68,7 +68,7 @@ module GroupsHelper ...@@ -68,7 +68,7 @@ module GroupsHelper
def group_title_link(group, hidable: false) def group_title_link(group, hidable: false)
link_to(group_path(group), class: "group-path #{'hidable' if hidable}") do link_to(group_path(group), class: "group-path #{'hidable' if hidable}") do
output = output =
if show_new_nav? if show_new_nav? && !Rails.env.test?
image_tag(group_icon(group), class: "avatar-tile", width: 16, height: 16) image_tag(group_icon(group), class: "avatar-tile", width: 16, height: 16)
else else
"" ""
......
...@@ -60,7 +60,7 @@ module ProjectsHelper ...@@ -60,7 +60,7 @@ module ProjectsHelper
project_link = link_to project_path(project), { class: "project-item-select-holder" } do project_link = link_to project_path(project), { class: "project-item-select-holder" } do
output = output =
if show_new_nav? if show_new_nav? && !Rails.env.test?
project_icon(project, alt: project.name, class: 'avatar-tile', width: 16, height: 16) project_icon(project, alt: project.name, class: 'avatar-tile', width: 16, height: 16)
else else
"" ""
......
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
- content_for :breadcrumbs_extra do - content_for :breadcrumbs_extra do
= link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10' do = link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10' do
= icon('rss') = icon('rss')
%span.icon-label
Subscribe
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues = render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues
- if group_issues_exists - if group_issues_exists
......
...@@ -20,27 +20,19 @@ RSpec.describe 'Dashboard Active Tab', js: true do ...@@ -20,27 +20,19 @@ RSpec.describe 'Dashboard Active Tab', js: true do
it_behaves_like 'page has active tab', 'Projects' it_behaves_like 'page has active tab', 'Projects'
end end
context 'on dashboard issues' do context 'on dashboard groups' do
before do
visit issues_dashboard_path
end
it_behaves_like 'page has active tab', 'Issues'
end
context 'on dashboard merge requests' do
before do before do
visit merge_requests_dashboard_path visit dashboard_groups_path
end end
it_behaves_like 'page has active tab', 'Merge Requests' it_behaves_like 'page has active tab', 'Groups'
end end
context 'on dashboard groups' do context 'on activity projects' do
before do before do
visit dashboard_groups_path visit activity_dashboard_path
end end
it_behaves_like 'page has active tab', 'Groups' it_behaves_like 'page has active tab', 'Activity'
end end
end end
...@@ -158,7 +158,7 @@ feature 'Group' do ...@@ -158,7 +158,7 @@ feature 'Group' do
expect(page).to have_content 'successfully updated' expect(page).to have_content 'successfully updated'
expect(find('#group_name').value).to eq(new_name) expect(find('#group_name').value).to eq(new_name)
page.within ".navbar-gitlab" do page.within ".breadcrumbs" do
expect(page).to have_content new_name expect(page).to have_content new_name
end end
end end
......
...@@ -798,7 +798,7 @@ describe 'Filter issues', js: true do ...@@ -798,7 +798,7 @@ describe 'Filter issues', js: true do
it 'updates atom feed link for group issues' do it 'updates atom feed link for group issues' do
visit issues_group_path(group, milestone_title: milestone.title, assignee_id: user.id) visit issues_group_path(group, milestone_title: milestone.title, assignee_id: user.id)
link = find('.nav-controls a', text: 'Subscribe') link = find('.breadcrumbs a', text: 'Subscribe')
params = CGI.parse(URI.parse(link[:href]).query) params = CGI.parse(URI.parse(link[:href]).query)
auto_discovery_link = find('link[type="application/atom+xml"]', visible: false) auto_discovery_link = find('link[type="application/atom+xml"]', visible: false)
auto_discovery_params = CGI.parse(URI.parse(auto_discovery_link[:href]).query) auto_discovery_params = CGI.parse(URI.parse(auto_discovery_link[:href]).query)
......
...@@ -577,7 +577,9 @@ describe 'Issues' do ...@@ -577,7 +577,9 @@ describe 'Issues' do
it 'redirects to signin then back to new issue after signin' do it 'redirects to signin then back to new issue after signin' do
visit project_issues_path(project) visit project_issues_path(project)
click_link 'New issue' page.within '.breadcrumbs' do
click_link 'New issue'
end
expect(current_path).to eq new_user_session_path expect(current_path).to eq new_user_session_path
......
...@@ -13,7 +13,9 @@ feature 'Create New Merge Request', js: true do ...@@ -13,7 +13,9 @@ feature 'Create New Merge Request', js: true do
it 'selects the source branch sha when a tag with the same name exists' do it 'selects the source branch sha when a tag with the same name exists' do
visit project_merge_requests_path(project) visit project_merge_requests_path(project)
click_link 'New merge request' page.within '.content' do
click_link 'New merge request'
end
expect(page).to have_content('Source branch') expect(page).to have_content('Source branch')
expect(page).to have_content('Target branch') expect(page).to have_content('Target branch')
...@@ -26,7 +28,9 @@ feature 'Create New Merge Request', js: true do ...@@ -26,7 +28,9 @@ feature 'Create New Merge Request', js: true do
it 'selects the target branch sha when a tag with the same name exists' do it 'selects the target branch sha when a tag with the same name exists' do
visit project_merge_requests_path(project) visit project_merge_requests_path(project)
click_link 'New merge request' page.within '.content' do
click_link 'New merge request'
end
expect(page).to have_content('Source branch') expect(page).to have_content('Source branch')
expect(page).to have_content('Target branch') expect(page).to have_content('Target branch')
...@@ -40,7 +44,9 @@ feature 'Create New Merge Request', js: true do ...@@ -40,7 +44,9 @@ feature 'Create New Merge Request', js: true do
it 'generates a diff for an orphaned branch' do it 'generates a diff for an orphaned branch' do
visit project_merge_requests_path(project) visit project_merge_requests_path(project)
page.has_link?('New Merge Request') ? click_link("New Merge Request") : click_link('New merge request') page.within '.content' do
click_link 'New merge request'
end
expect(page).to have_content('Source branch') expect(page).to have_content('Source branch')
expect(page).to have_content('Target branch') expect(page).to have_content('Target branch')
......
...@@ -14,7 +14,7 @@ describe 'Guest navigation menu' do ...@@ -14,7 +14,7 @@ describe 'Guest navigation menu' do
visit project_path(project) visit project_path(project)
within('.nav-sidebar') do within('.nav-sidebar') do
expect(page).to have_content 'Project' expect(page).to have_content 'Overview'
expect(page).to have_content 'Issues' expect(page).to have_content 'Issues'
expect(page).to have_content 'Wiki' expect(page).to have_content 'Wiki'
......
require 'spec_helper' require 'spec_helper'
feature 'Projects > Members > User requests access' do feature 'Projects > Members > User requests access', :js do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:project) { create(:project, :public, :access_requestable, :repository) } let(:project) { create(:project, :public, :access_requestable, :repository) }
let(:master) { project.owner } let(:master) { project.owner }
...@@ -46,11 +46,10 @@ feature 'Projects > Members > User requests access' do ...@@ -46,11 +46,10 @@ feature 'Projects > Members > User requests access' do
expect(project.requesters.exists?(user_id: user)).to be_truthy expect(project.requesters.exists?(user_id: user)).to be_truthy
page.within('.layout-nav .nav-links') do page.within('.nav-sidebar') do
click_link('Members') click_link('Members')
end end
visit project_project_members_path(project)
page.within('.content') do page.within('.content') do
expect(page).not_to have_content(user.name) expect(page).not_to have_content(user.name)
end 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