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
0a7b35b8
Commit
0a7b35b8
authored
Dec 31, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add specs for Vue code
parent
dbd0fbee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
spec/frontend/jira_connect/components/app_spec.js
spec/frontend/jira_connect/components/app_spec.js
+50
-0
No files found.
spec/frontend/jira_connect/components/app_spec.js
0 → 100644
View file @
0a7b35b8
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
JiraConnectApp
from
'
~/jira_connect/components/app.vue
'
;
describe
(
'
JiraConnectApp
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
({
...
options
})
=>
{
wrapper
=
shallowMount
(
JiraConnectApp
,
{
...
options
,
});
};
afterEach
(()
=>
{
if
(
wrapper
)
{
wrapper
.
destroy
();
wrapper
=
null
;
}
});
const
findHeader
=
()
=>
wrapper
.
find
(
'
h3
'
);
const
findHeaderText
=
()
=>
wrapper
.
find
(
'
h3
'
).
text
();
describe
(
'
template
'
,
()
=>
{
describe
(
'
newJiraConnectUi is false
'
,
()
=>
{
it
(
'
does not render new UI
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
false
},
},
});
expect
(
findHeader
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
newJiraConnectUi is true
'
,
()
=>
{
it
(
'
renders new UI
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
true
},
},
});
expect
(
findHeader
().
exists
()).
toBe
(
true
);
expect
(
findHeaderText
()).
toBe
(
'
Linked namespaces
'
);
});
});
});
});
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