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
fe11ffda
Commit
fe11ffda
authored
Mar 09, 2021
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust specs slightly based on reviewer feedback
parent
8cca723c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ee/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
ee/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
+8
-6
No files found.
ee/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb
View file @
fe11ffda
...
@@ -31,14 +31,14 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
...
@@ -31,14 +31,14 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
rendered
rendered
end
end
shared_examples
'does not render'
do
shared_examples
'does not render
the widget & popover
'
do
it
'does not render'
do
it
'does not render'
do
is_expected
.
not_to
have_selector
'#js-trial-status-widget'
is_expected
.
not_to
have_selector
'#js-trial-status-widget'
is_expected
.
not_to
have_selector
'#js-trial-status-popover'
is_expected
.
not_to
have_selector
'#js-trial-status-popover'
end
end
end
end
shared_examples
'
does rend
er'
do
shared_examples
'
renders the widget & popov
er'
do
it
'renders both the widget & popover component initialization elements'
do
it
'renders both the widget & popover component initialization elements'
do
is_expected
.
to
have_selector
'#js-trial-status-widget'
is_expected
.
to
have_selector
'#js-trial-status-widget'
is_expected
.
to
have_selector
'#js-trial-status-popover'
is_expected
.
to
have_selector
'#js-trial-status-popover'
...
@@ -55,6 +55,7 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
...
@@ -55,6 +55,7 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
shared_examples
'does record experiment subject'
do
shared_examples
'does record experiment subject'
do
it
'records the group as an experiment subject'
do
it
'records the group as an experiment subject'
do
expect
(
view
).
to
receive
(
:record_experiment_group
).
with
(
experiment_key
,
group
)
expect
(
view
).
to
receive
(
:record_experiment_group
).
with
(
experiment_key
,
group
)
subject
subject
end
end
end
end
...
@@ -62,15 +63,16 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
...
@@ -62,15 +63,16 @@ RSpec.describe 'layouts/nav/sidebar/_group' do
shared_examples
'does not record experiment subject'
do
shared_examples
'does not record experiment subject'
do
it
'does not record the group as an experiment subject'
do
it
'does not record the group as an experiment subject'
do
expect
(
view
).
not_to
receive
(
:record_experiment_group
)
expect
(
view
).
not_to
receive
(
:record_experiment_group
)
subject
subject
end
end
end
end
where
:show_widget
,
:experiment_enabled
,
:examples_to_include
do
where
:show_widget
,
:experiment_enabled
,
:examples_to_include
do
true
|
true
|
[
'does record experiment subject'
,
'
does rend
er'
]
true
|
true
|
[
'does record experiment subject'
,
'
renders the widget & popov
er'
]
true
|
false
|
[
'does record experiment subject'
,
'does not render'
]
true
|
false
|
[
'does record experiment subject'
,
'does not render
the widget & popover
'
]
false
|
true
|
[
'does not record experiment subject'
,
'does not render'
]
false
|
true
|
[
'does not record experiment subject'
,
'does not render
the widget & popover
'
]
false
|
false
|
[
'does not record experiment subject'
,
'does not render'
]
false
|
false
|
[
'does not record experiment subject'
,
'does not render
the widget & popover
'
]
end
end
with_them
do
with_them
do
...
...
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