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
99098b5b
Commit
99098b5b
authored
Sep 21, 2021
by
pburdette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename trace in job app spec
Few other instances of trace that we can change in the spec.
parent
ea5fb9e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
spec/frontend/jobs/components/job_app_spec.js
spec/frontend/jobs/components/job_app_spec.js
+15
-16
No files found.
spec/frontend/jobs/components/job_app_spec.js
View file @
99098b5b
...
...
@@ -47,9 +47,9 @@ describe('Job App', () => {
wrapper
=
mount
(
JobApp
,
{
propsData
:
{
...
props
},
store
});
};
const
setupAndMount
=
({
jobData
=
{},
trace
Data
=
{}
}
=
{})
=>
{
const
setupAndMount
=
({
jobData
=
{},
jobLog
Data
=
{}
}
=
{})
=>
{
mock
.
onGet
(
initSettings
.
endpoint
).
replyOnce
(
200
,
{
...
job
,
...
jobData
});
mock
.
onGet
(
`
${
initSettings
.
pagePath
}
/trace.json`
).
reply
(
200
,
trace
Data
);
mock
.
onGet
(
`
${
initSettings
.
pagePath
}
/trace.json`
).
reply
(
200
,
jobLog
Data
);
const
asyncInit
=
store
.
dispatch
(
'
init
'
,
initSettings
);
...
...
@@ -77,11 +77,10 @@ describe('Job App', () => {
const
findEmptyState
=
()
=>
wrapper
.
find
(
EmptyState
);
const
findJobNewIssueLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-new-issue"]
'
);
const
findJobEmptyStateTitle
=
()
=>
wrapper
.
find
(
'
[data-testid="job-empty-state-title"]
'
);
const
findJobTraceScrollTop
=
()
=>
wrapper
.
find
(
'
[data-testid="job-controller-scroll-top"]
'
);
const
findJobTraceScrollBottom
=
()
=>
wrapper
.
find
(
'
[data-testid="job-controller-scroll-bottom"]
'
);
const
findJobTraceController
=
()
=>
wrapper
.
find
(
'
[data-testid="job-raw-link-controller"]
'
);
const
findJobTraceEraseLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-log-erase-link"]
'
);
const
findJobLogScrollTop
=
()
=>
wrapper
.
find
(
'
[data-testid="job-controller-scroll-top"]
'
);
const
findJobLogScrollBottom
=
()
=>
wrapper
.
find
(
'
[data-testid="job-controller-scroll-bottom"]
'
);
const
findJobLogController
=
()
=>
wrapper
.
find
(
'
[data-testid="job-raw-link-controller"]
'
);
const
findJobLogEraseLink
=
()
=>
wrapper
.
find
(
'
[data-testid="job-log-erase-link"]
'
);
beforeEach
(()
=>
{
mock
=
new
MockAdapter
(
axios
);
...
...
@@ -315,7 +314,7 @@ describe('Job App', () => {
});
describe
(
'
empty states block
'
,
()
=>
{
it
(
'
renders empty state when job does not have
trace
and is not running
'
,
()
=>
it
(
'
renders empty state when job does not have
log
and is not running
'
,
()
=>
setupAndMount
({
jobData
:
{
has_trace
:
false
,
...
...
@@ -342,7 +341,7 @@ describe('Job App', () => {
expect
(
findEmptyState
().
exists
()).
toBe
(
true
);
}));
it
(
'
does not render empty state when job does not have
trace
but it is running
'
,
()
=>
it
(
'
does not render empty state when job does not have
log
but it is running
'
,
()
=>
setupAndMount
({
jobData
:
{
has_trace
:
false
,
...
...
@@ -358,7 +357,7 @@ describe('Job App', () => {
expect
(
findEmptyState
().
exists
()).
toBe
(
false
);
}));
it
(
'
does not render empty state when job has
trace
but it is not running
'
,
()
=>
it
(
'
does not render empty state when job has
log
but it is not running
'
,
()
=>
setupAndMount
({
jobData
:
{
has_trace
:
true
}
}).
then
(()
=>
{
expect
(
findEmptyState
().
exists
()).
toBe
(
false
);
}));
...
...
@@ -424,10 +423,10 @@ describe('Job App', () => {
});
});
describe
(
'
trace
controls
'
,
()
=>
{
describe
(
'
job log
controls
'
,
()
=>
{
beforeEach
(()
=>
setupAndMount
({
trace
Data
:
{
jobLog
Data
:
{
html
:
'
<span>Update</span>
'
,
status
:
'
success
'
,
append
:
false
,
...
...
@@ -439,16 +438,16 @@ describe('Job App', () => {
);
it
(
'
should render scroll buttons
'
,
()
=>
{
expect
(
findJob
Trace
ScrollTop
().
exists
()).
toBe
(
true
);
expect
(
findJob
Trace
ScrollBottom
().
exists
()).
toBe
(
true
);
expect
(
findJob
Log
ScrollTop
().
exists
()).
toBe
(
true
);
expect
(
findJob
Log
ScrollBottom
().
exists
()).
toBe
(
true
);
});
it
(
'
should render link to raw ouput
'
,
()
=>
{
expect
(
findJob
Trace
Controller
().
exists
()).
toBe
(
true
);
expect
(
findJob
Log
Controller
().
exists
()).
toBe
(
true
);
});
it
(
'
should render link to erase job
'
,
()
=>
{
expect
(
findJob
Trace
EraseLink
().
exists
()).
toBe
(
true
);
expect
(
findJob
Log
EraseLink
().
exists
()).
toBe
(
true
);
});
});
});
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