Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
4480ea1f
Commit
4480ea1f
authored
Jun 11, 2021
by
Alper Akgun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
JS error on continuous onboarding welcome page
Changelog: fixed EE: true
parent
1b36def8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
8 deletions
+29
-8
ee/app/assets/javascripts/pages/registrations/welcome/index.js
...p/assets/javascripts/pages/registrations/welcome/index.js
+12
-6
ee/spec/features/registrations/user_sees_new_onboarding_flow_spec.rb
...tures/registrations/user_sees_new_onboarding_flow_spec.rb
+17
-2
No files found.
ee/app/assets/javascripts/pages/registrations/welcome/index.js
View file @
4480ea1f
...
...
@@ -6,10 +6,16 @@ const emailUpdatesForm = document.querySelector('.js-email-opt-in');
const
setupForCompany
=
document
.
querySelector
(
'
.js-setup-for-company
'
);
const
setupForMe
=
document
.
querySelector
(
'
.js-setup-for-me
'
);
setupForCompany
.
addEventListener
(
'
change
'
,
()
=>
{
emailUpdatesForm
.
classList
.
add
(
'
hidden
'
);
});
if
(
emailUpdatesForm
)
{
if
(
setupForCompany
)
{
setupForCompany
.
addEventListener
(
'
change
'
,
()
=>
{
emailUpdatesForm
.
classList
.
add
(
'
hidden
'
);
});
}
setupForMe
.
addEventListener
(
'
change
'
,
()
=>
{
emailUpdatesForm
.
classList
.
remove
(
'
hidden
'
);
});
if
(
setupForMe
)
{
setupForMe
.
addEventListener
(
'
change
'
,
()
=>
{
emailUpdatesForm
.
classList
.
remove
(
'
hidden
'
);
});
}
}
ee/spec/features/registrations/user_sees_new_onboarding_flow_spec.rb
View file @
4480ea1f
...
...
@@ -11,7 +11,7 @@ RSpec.describe 'User sees new onboarding flow', :js do
visit
users_sign_up_welcome_path
end
it
'shows the expected pages'
do
def
common_flow
expect
(
page
).
to
have_content
(
'Welcome to GitLab'
)
expect
(
page
).
to
have_content
(
'Your profile Your GitLab group Your first project'
)
expect
(
page
).
to
have_css
(
'li.current'
,
text:
'Your profile'
)
...
...
@@ -38,14 +38,29 @@ RSpec.describe 'User sees new onboarding flow', :js do
expect
(
page
).
to
have_field
(
'project_path'
,
with:
'test'
)
click_on
'Create project'
end
it
'shows onboarding flow pages'
do
common_flow
expect
(
page
).
to
have_content
(
'Welcome to the guided GitLab tour'
)
Sidekiq
::
Worker
.
drain_all
click_on
'Show me the basics'
expect
(
page
).
to
have_content
(
'Learn GitLab'
)
expect
(
page
).
to
have_css
(
'.selectable'
,
text:
'Label = ~Novice'
)
end
context
'continuous onboarding experiment enabled'
do
before
do
stub_experiment_for_subject
(
learn_gitlab_a:
true
,
learn_gitlab_b:
true
)
end
it
'shows continuous onboarding flow pages'
do
common_flow
expect
(
page
).
to
have_content
(
'Get started with GitLab'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment