Commit 0d026e4b authored by Filipa Lacerda's avatar Filipa Lacerda Committed by Phil Hughes

ee - Only render signout screen when user is signed out

parent 55e7ffb9
......@@ -8,11 +8,12 @@
= image_tag 'illustrations/issues.svg'
.col-xs-12
.text-content
- if has_button && current_user
- if current_user
%h4
= _("The Issue Tracker is the place to add things that need to be improved or solved in a project")
%p
= _("Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.")
- if has_button
.text-center
- if project_select_button
= render 'shared/new_project_item_select', path: 'issues/new', label: 'New issue', type: :issues
......
......@@ -8,6 +8,19 @@ describe 'Issues' do
let(:user) { create(:user) }
let(:project) { create(:project, :public) }
describe 'while user is signed out' do
describe 'empty state' do
it 'user sees empty state' do
visit project_issues_path(project)
expect(page).to have_content('Register / Sign In')
expect(page).to have_content('The Issue Tracker is the place to add things that need to be improved or solved in a project.')
expect(page).to have_content('You can register or sign in to create issues for this project.')
end
end
end
describe 'while user is signed in' do
before do
sign_in(user)
user2 = create(:user)
......@@ -15,6 +28,16 @@ describe 'Issues' do
project.team << [[user, user2], :developer]
end
describe 'empty state' do
it 'user sees empty state' do
visit project_issues_path(project)
expect(page).to have_content('The Issue Tracker is the place to add things that need to be improved or solved in a project')
expect(page).to have_content('Issues can be bugs, tasks or ideas to be discussed. Also, issues are searchable and filterable.')
expect(page).to have_content('New issue')
end
end
describe 'Edit issue' do
let!(:issue) do
create(:issue,
......@@ -769,4 +792,5 @@ describe 'Issues' do
expect(page).not_to have_css('.is-active')
end
end
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