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
367c4bf1
Commit
367c4bf1
authored
Jun 02, 2021
by
Brandon Labuschagne
Committed by
Ezekiel Kigbo
Jun 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DevOps Adoption tooltip shows incorrect data
parent
ec2587c6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
10 deletions
+71
-10
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag.vue
...s_adoption/components/devops_adoption_table_cell_flag.vue
+4
-4
ee/spec/frontend/analytics/devops_report/devops_adoption/components/__snapshots__/devops_adoption_table_cell_flag_spec.js.snap
..._snapshots__/devops_adoption_table_cell_flag_spec.js.snap
+25
-0
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag_spec.js
...option/components/devops_adoption_table_cell_flag_spec.js
+42
-6
No files found.
ee/app/assets/javascripts/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag.vue
View file @
367c4bf1
...
...
@@ -17,10 +17,10 @@ export default {
required
:
true
,
},
},
data
()
{
return
{
tooltipText
:
this
.
enabled
?
trueText
:
falseText
,
}
;
computed
:
{
tooltipText
()
{
return
this
.
enabled
?
trueText
:
falseText
;
}
,
},
};
</
script
>
...
...
ee/spec/frontend/analytics/devops_report/devops_adoption/components/__snapshots__/devops_adoption_table_cell_flag_spec.js.snap
0 → 100644
View file @
367c4bf1
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`DevopsAdoptionTableCellFlag disabled matches the snapshot 1`] = `
<span
class="circle"
/>
`;
exports[`DevopsAdoptionTableCellFlag disabled when the enabled flag is changed to true matches the snapshot 1`] = `
<span
class="circle circle-enabled"
/>
`;
exports[`DevopsAdoptionTableCellFlag enabled matches the snapshot 1`] = `
<span
class="circle circle-enabled"
/>
`;
exports[`DevopsAdoptionTableCellFlag enabled when the enabled flag is changed to false matches the snapshot 1`] = `
<span
class="circle"
/>
`;
ee/spec/frontend/analytics/devops_report/devops_adoption/components/devops_adoption_table_cell_flag_spec.js
View file @
367c4bf1
...
...
@@ -25,9 +25,8 @@ describe('DevopsAdoptionTableCellFlag', () => {
describe
(
'
enabled
'
,
()
=>
{
beforeEach
(()
=>
createComponent
());
it
(
'
contains the circle-enabled class
'
,
()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
circle
'
);
expect
(
wrapper
.
classes
()).
toContain
(
'
circle-enabled
'
);
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
contains a tooltip
'
,
()
=>
{
...
...
@@ -36,14 +35,32 @@ describe('DevopsAdoptionTableCellFlag', () => {
expect
(
tooltip
).
toBeDefined
();
expect
(
tooltip
.
value
).
toBe
(
'
Adopted
'
);
});
describe
(
'
when the enabled flag is changed to false
'
,
()
=>
{
beforeEach
(
async
()
=>
{
wrapper
.
setProps
({
enabled
:
false
});
await
wrapper
.
vm
.
$nextTick
();
});
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
displays the correct tooltip
'
,
()
=>
{
const
tooltip
=
getBinding
(
wrapper
.
element
,
'
gl-tooltip
'
);
expect
(
tooltip
).
toBeDefined
();
expect
(
tooltip
.
value
).
toBe
(
'
Not adopted
'
);
});
});
});
describe
(
'
disabled
'
,
()
=>
{
beforeEach
(()
=>
createComponent
({
enabled
:
false
}));
it
(
'
does not contain the circle-enabled class
'
,
()
=>
{
expect
(
wrapper
.
classes
()).
toContain
(
'
circle
'
);
expect
(
wrapper
.
classes
()).
not
.
toContain
(
'
circle-enabled
'
);
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
contains a tooltip
'
,
()
=>
{
...
...
@@ -52,5 +69,24 @@ describe('DevopsAdoptionTableCellFlag', () => {
expect
(
tooltip
).
toBeDefined
();
expect
(
tooltip
.
value
).
toBe
(
'
Not adopted
'
);
});
describe
(
'
when the enabled flag is changed to true
'
,
()
=>
{
beforeEach
(
async
()
=>
{
wrapper
.
setProps
({
enabled
:
true
});
await
wrapper
.
vm
.
$nextTick
();
});
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
element
).
toMatchSnapshot
();
});
it
(
'
displays the correct tooltip
'
,
()
=>
{
const
tooltip
=
getBinding
(
wrapper
.
element
,
'
gl-tooltip
'
);
expect
(
tooltip
).
toBeDefined
();
expect
(
tooltip
.
value
).
toBe
(
'
Adopted
'
);
});
});
});
});
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