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
b5357b2b
Commit
b5357b2b
authored
Apr 08, 2021
by
Quang-Minh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor frontend tests
parent
db49f207
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
57 deletions
+47
-57
spec/frontend/performance_bar/components/detailed_metric_spec.js
...ontend/performance_bar/components/detailed_metric_spec.js
+47
-57
No files found.
spec/frontend/performance_bar/components/detailed_metric_spec.js
View file @
b5357b2b
...
@@ -120,20 +120,20 @@ describe('detailedMetric', () => {
...
@@ -120,20 +120,20 @@ describe('detailedMetric', () => {
});
});
});
});
describe
(
'
when the details have summaryOptions option
'
,
()
=>
{
const
gitalyDetails
=
{
duration
:
'
123ms
'
,
calls
:
456
,
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
};
describe
(
'
when the details have summaryOptions > hideTotal option
'
,
()
=>
{
describe
(
'
when the details have summaryOptions > hideTotal option
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
({
createComponent
({
currentRequest
:
{
currentRequest
:
{
details
:
{
details
:
{
gitaly
:
{
gitaly
:
{
...
gitalyDetails
,
summaryOptions
:
{
hideTotal
:
true
}
},
duration
:
'
123ms
'
,
calls
:
456
,
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
summaryOptions
:
{
hideTotal
:
true
,
},
},
},
},
},
},
});
});
...
@@ -149,15 +149,7 @@ describe('detailedMetric', () => {
...
@@ -149,15 +149,7 @@ describe('detailedMetric', () => {
createComponent
({
createComponent
({
currentRequest
:
{
currentRequest
:
{
details
:
{
details
:
{
gitaly
:
{
gitaly
:
{
...
gitalyDetails
,
summaryOptions
:
{
hideDuration
:
true
}
},
duration
:
'
123ms
'
,
calls
:
456
,
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
summaryOptions
:
{
hideDuration
:
true
,
},
},
},
},
},
},
});
});
...
@@ -174,10 +166,7 @@ describe('detailedMetric', () => {
...
@@ -174,10 +166,7 @@ describe('detailedMetric', () => {
currentRequest
:
{
currentRequest
:
{
details
:
{
details
:
{
gitaly
:
{
gitaly
:
{
duration
:
'
123ms
'
,
...
gitalyDetails
,
calls
:
456
,
details
:
requestDetails
,
warnings
:
[
'
gitaly calls: 456 over 30
'
],
summary
:
{
summary
:
{
'
In controllers
'
:
100
,
'
In controllers
'
:
100
,
'
In middlewares
'
:
20
,
'
In middlewares
'
:
20
,
...
@@ -196,6 +185,7 @@ describe('detailedMetric', () => {
...
@@ -196,6 +185,7 @@ describe('detailedMetric', () => {
expect
(
findAllSummaryItems
()).
toEqual
([
'
In controllers 100
'
,
'
In middlewares 20
'
]);
expect
(
findAllSummaryItems
()).
toEqual
([
'
In controllers 100
'
,
'
In middlewares 20
'
]);
});
});
});
});
});
describe
(
"
when the details don't have a start field
"
,
()
=>
{
describe
(
"
when the details don't have a start field
"
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
...
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