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
a22bc313
Commit
a22bc313
authored
Jul 02, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix unit test and vue component
* Import GlButton and update unit tests
parent
52755244
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
ee/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_policy_violation.vue
...t_widget/components/states/mr_widget_policy_violation.vue
+4
-2
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_policy_violation_spec.js
...dget/components/states/mr_widget_policy_violation_spec.js
+3
-2
No files found.
ee/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_policy_violation.vue
View file @
a22bc313
<
script
>
import
statusIcon
from
'
~/vue_merge_request_widget/components/mr_widget_status_icon.vue
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
StatusIcon
from
'
~/vue_merge_request_widget/components/mr_widget_status_icon.vue
'
;
export
default
{
name
:
'
MRWidgetPolicyViolation
'
,
components
:
{
statusIcon
,
GlButton
,
StatusIcon
,
},
};
</
script
>
...
...
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_policy_violation_spec.js
View file @
a22bc313
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
MrWidgetPolicyViolation
from
'
ee/vue_merge_request_widget/components/states/mr_widget_policy_violation.vue
'
;
describe
(
'
EE MrWidgetPolicyViolation
'
,
()
=>
{
let
wrapper
;
const
findButton
=
()
=>
wrapper
.
find
(
'
button
'
);
const
findButton
=
()
=>
wrapper
.
find
(
GlButton
);
const
createComponent
=
()
=>
{
wrapper
=
shallowMount
(
MrWidgetPolicyViolation
,
{});
...
...
@@ -21,7 +22,7 @@ describe('EE MrWidgetPolicyViolation', () => {
it
(
'
shows the disabled merge button
'
,
()
=>
{
expect
(
wrapper
.
text
()).
toContain
(
'
Merge
'
);
expect
(
findButton
().
attributes
().
disabled
).
toBe
(
'
disabled
'
);
expect
(
findButton
().
attributes
().
disabled
).
toBe
(
'
true
'
);
});
it
(
'
shows the disabled reason
'
,
()
=>
{
...
...
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