Commit dfc1b31f authored by Martin Wortschack's avatar Martin Wortschack Committed by Jan Provaznik

Add additonal specs for onboarding

parent 94c60821
......@@ -29,7 +29,7 @@ describe 'User Onboarding' do
end
end
context 'welcome page' do
describe 'welcome page' do
before do
allow(Project).to receive(:find_by_full_path).and_return(project)
project.add_guest(user)
......@@ -41,6 +41,21 @@ describe 'User Onboarding' do
expect(page).to have_content('Welcome to the Guided GitLab Tour')
end
end
describe 'onboarding helper' do
before do
allow(Project).to receive(:find_by_full_path).and_return(project)
project.add_guest(user)
end
it 'shows the onboarding helper on the onboarding project' do
visit explore_onboarding_index_path
find('.btn-success').click
expect(page).to have_css('#js-onboarding-helper', visible: true)
end
end
end
context 'when the feature is disabled' do
......@@ -59,5 +74,21 @@ describe 'User Onboarding' do
end
end
end
describe 'welcome page' do
it 'does not show the "Learn GitLab" welcome page' do
visit explore_onboarding_index_path
expect(page).not_to have_content('Welcome to the Guided GitLab Tour')
end
end
describe 'onboarding helper' do
it 'does not show the onboarding helper on the onboarding project' do
visit project_path(project)
expect(page).not_to have_css('#js-onboarding-helper')
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