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
fda398d4
Commit
fda398d4
authored
Feb 11, 2022
by
Tyler Williams
Committed by
Sean McGivern
Feb 11, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GTM to /users/sign_up/groups_project/new view
parent
bcf42ad0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
ee/app/views/registrations/groups_projects/new.html.haml
ee/app/views/registrations/groups_projects/new.html.haml
+2
-0
ee/spec/views/registrations/groups_projects/new.html.haml_spec.rb
...views/registrations/groups_projects/new.html.haml_spec.rb
+45
-0
No files found.
ee/app/views/registrations/groups_projects/new.html.haml
View file @
fda398d4
...
...
@@ -3,7 +3,9 @@
-
page_title
_
(
'Your GitLab group'
)
-
form_params
=
{
trial_onboarding_flow:
params
[
:trial_onboarding_flow
],
glm_source:
params
[
:glm_source
],
glm_content:
params
[
:glm_content
],
skip_trial:
params
[
:skip_trial
]
}
-
content_for
:page_specific_javascripts
do
=
render
"layouts/google_tag_manager_head"
=
render
"layouts/one_trust"
=
render
"layouts/google_tag_manager_body"
.row.gl-flex-grow-1
.gl-display-flex.gl-flex-direction-column.gl-align-items-center.gl-w-full.gl-px-5.gl-pb-5
...
...
ee/spec/views/registrations/groups_projects/new.html.haml_spec.rb
0 → 100644
View file @
fda398d4
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'registrations/groups_projects/new'
do
let
(
:google_tag_manager_id
)
{
'GTM-WWKMTWS'
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
before
do
assign
(
:group
,
group
)
assign
(
:project
,
project
)
stub_config
(
extra:
{
google_tag_manager_id:
google_tag_manager_id
,
google_tag_manager_nonce_id:
google_tag_manager_id
})
allow
(
view
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
view
).
to
receive
(
:import_sources_enabled?
).
and_return
(
false
)
end
context
'when Google Tag Manager is enabled'
do
before
do
allow
(
view
).
to
receive
(
:google_tag_manager_enabled?
).
and_return
(
true
)
render
end
subject
{
rendered
}
it
'contains a Google Tag Manager tag'
do
is_expected
.
to
match
(
/www.googletagmanager.com/
)
end
end
context
'when Google Tag Manager is disabled'
do
before
do
allow
(
view
).
to
receive
(
:google_tag_manager_enabled?
).
and_return
(
false
)
render
end
subject
{
rendered
}
it
'does not contain a Google Tag Manager tag'
do
is_expected
.
not_to
match
(
/www.googletagmanager.com/
)
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