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
1a50abff
Commit
1a50abff
authored
Jan 29, 2021
by
jboyson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace mountComponent with mount
parent
5e900d3e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
spec/frontend/pipelines/blank_state_spec.js
spec/frontend/pipelines/blank_state_spec.js
+8
-13
No files found.
spec/frontend/pipelines/blank_state_spec.js
View file @
1a50abff
import
Vue
from
'
vue
'
;
import
mountComponent
from
'
helpers/vue_mount_component_helper
'
;
import
component
from
'
~/pipelines/components/pipelines_list/blank_state.vue
'
;
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
getByText
}
from
'
@testing-library/dom
'
;
import
BlankState
from
'
~/pipelines/components/pipelines_list/blank_state.vue
'
;
describe
(
'
Pipelines Blank State
'
,
()
=>
{
let
vm
;
let
Component
;
beforeEach
(()
=>
{
Component
=
Vue
.
extend
(
component
);
vm
=
mountComponent
(
Component
,
{
const
wrapper
=
mount
(
BlankState
,
{
propsData
:
{
svgPath
:
'
foo
'
,
message
:
'
Blank State
'
,
}
);
}
,
});
it
(
'
should render svg
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.svg-content img
'
).
getAttribute
(
'
src
'
)).
toEqual
(
'
foo
'
);
expect
(
wrapper
.
find
(
'
.svg-content img
'
).
attributes
(
'
src
'
)).
toEqual
(
'
foo
'
);
});
it
(
'
should render message
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
h4
'
).
textContent
.
trim
()).
toEqual
(
'
Blank State
'
);
expect
(
getByText
(
wrapper
.
element
,
/Blank State/i
)).
toBeTruthy
(
);
});
});
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