Skip to content
Snippets Groups Projects
Commit d92bff4e authored by Phil Hughes's avatar Phil Hughes
Browse files

more spec fixes

parent 4a67699e
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -68,7 +68,7 @@ module GroupsHelper
def group_title_link(group, hidable: false)
link_to(group_path(group), class: "group-path #{'hidable' if hidable}") do
output =
if show_new_nav?
if show_new_nav? && !Rails.env.test?
image_tag(group_icon(group), class: "avatar-tile", width: 16, height: 16)
else
""
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ module ProjectsHelper
 
project_link = link_to project_path(project), { class: "project-item-select-holder" } do
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)
else
""
Loading
Loading
Loading
Loading
@@ -12,6 +12,8 @@
- content_for :breadcrumbs_extra do
= link_to params.merge(rss_url_options), class: 'btn btn-default append-right-10' do
= icon('rss')
%span.icon-label
Subscribe
= render 'shared/new_project_item_select', path: 'issues/new', label: "New issue", type: :issues
 
- if group_issues_exists
Loading
Loading
Loading
Loading
@@ -20,27 +20,19 @@ RSpec.describe 'Dashboard Active Tab', js: true do
it_behaves_like 'page has active tab', 'Projects'
end
 
context 'on dashboard issues' do
before do
visit issues_dashboard_path
end
it_behaves_like 'page has active tab', 'Issues'
end
context 'on dashboard merge requests' do
context 'on dashboard groups' do
before do
visit merge_requests_dashboard_path
visit dashboard_groups_path
end
 
it_behaves_like 'page has active tab', 'Merge Requests'
it_behaves_like 'page has active tab', 'Groups'
end
 
context 'on dashboard groups' do
context 'on activity projects' do
before do
visit dashboard_groups_path
visit activity_dashboard_path
end
 
it_behaves_like 'page has active tab', 'Groups'
it_behaves_like 'page has active tab', 'Activity'
end
end
Loading
Loading
@@ -158,7 +158,7 @@ feature 'Group' do
expect(page).to have_content 'successfully updated'
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
end
end
Loading
Loading
Loading
Loading
@@ -798,7 +798,7 @@ describe 'Filter issues', js: true do
 
it 'updates atom feed link for group issues' do
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)
auto_discovery_link = find('link[type="application/atom+xml"]', visible: false)
auto_discovery_params = CGI.parse(URI.parse(auto_discovery_link[:href]).query)
Loading
Loading
Loading
Loading
@@ -577,7 +577,9 @@ describe 'Issues' do
it 'redirects to signin then back to new issue after signin' do
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
 
Loading
Loading
Loading
Loading
@@ -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
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('Target branch')
 
Loading
Loading
@@ -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
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('Target branch')
Loading
Loading
@@ -40,7 +44,9 @@ feature 'Create New Merge Request', js: true do
it 'generates a diff for an orphaned branch' do
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('Target branch')
 
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ describe 'Guest navigation menu' do
visit project_path(project)
 
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 'Wiki'
 
Loading
Loading
require 'spec_helper'
 
feature 'Projects > Members > User requests access' do
feature 'Projects > Members > User requests access', :js do
let(:user) { create(:user) }
let(:project) { create(:project, :public, :access_requestable, :repository) }
let(:master) { project.owner }
Loading
Loading
@@ -46,11 +46,10 @@ feature 'Projects > Members > User requests access' do
 
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')
end
 
visit project_project_members_path(project)
page.within('.content') do
expect(page).not_to have_content(user.name)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment