Commit 337c51fa authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'mw-onboarding-tour-additional-specs' into 'master'

Add additonal specs for onboarding

See merge request gitlab-org/gitlab-ee!14317
parents 94c60821 dfc1b31f
...@@ -29,7 +29,7 @@ describe 'User Onboarding' do ...@@ -29,7 +29,7 @@ describe 'User Onboarding' do
end end
end end
context 'welcome page' do describe 'welcome page' do
before do before do
allow(Project).to receive(:find_by_full_path).and_return(project) allow(Project).to receive(:find_by_full_path).and_return(project)
project.add_guest(user) project.add_guest(user)
...@@ -41,6 +41,21 @@ describe 'User Onboarding' do ...@@ -41,6 +41,21 @@ describe 'User Onboarding' do
expect(page).to have_content('Welcome to the Guided GitLab Tour') expect(page).to have_content('Welcome to the Guided GitLab Tour')
end end
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 end
context 'when the feature is disabled' do context 'when the feature is disabled' do
...@@ -59,5 +74,21 @@ describe 'User Onboarding' do ...@@ -59,5 +74,21 @@ describe 'User Onboarding' do
end end
end 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
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