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
4248cb0c
Commit
4248cb0c
authored
Feb 25, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests to correspond with GlButton changes
parent
a51135fb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+1
-1
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
...widget/components/states/mr_widget_ready_to_merge_spec.js
+6
-10
No files found.
ee/spec/frontend/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
4248cb0c
...
...
@@ -269,7 +269,7 @@ describe('ReadyToMerge', () => {
const
button
=
findMergeButton
();
expect
(
button
.
exists
()).
toBe
(
true
);
expect
(
button
.
attributes
(
'
disabled
'
)).
toBe
(
'
disabled
'
);
expect
(
button
.
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
});
});
});
...
...
spec/javascripts/vue_mr_widget/components/states/mr_widget_ready_to_merge_spec.js
View file @
4248cb0c
...
...
@@ -145,34 +145,30 @@ describe('ReadyToMerge', () => {
});
});
describe
(
'
mergeButtonClass
'
,
()
=>
{
const
defaultClass
=
'
btn btn-sm btn-success accept-merge-request
'
;
const
failedClass
=
`
${
defaultClass
}
btn-danger`
;
const
inActionClass
=
`
${
defaultClass
}
btn-info`
;
describe
(
'
mergeButtonVariant
'
,
()
=>
{
it
(
'
defaults to success class
'
,
()
=>
{
Vue
.
set
(
vm
.
mr
,
'
availableAutoMergeStrategies
'
,
[]);
expect
(
vm
.
mergeButton
Class
).
toEqual
(
defaultClass
);
expect
(
vm
.
mergeButton
Variant
).
toEqual
(
'
success
'
);
});
it
(
'
returns success class for success status
'
,
()
=>
{
Vue
.
set
(
vm
.
mr
,
'
availableAutoMergeStrategies
'
,
[]);
Vue
.
set
(
vm
.
mr
,
'
pipeline
'
,
true
);
expect
(
vm
.
mergeButton
Class
).
toEqual
(
defaultClass
);
expect
(
vm
.
mergeButton
Variant
).
toEqual
(
'
success
'
);
});
it
(
'
returns info class for pending status
'
,
()
=>
{
Vue
.
set
(
vm
.
mr
,
'
availableAutoMergeStrategies
'
,
[
MTWPS_MERGE_STRATEGY
]);
expect
(
vm
.
mergeButton
Class
).
toEqual
(
inActionClass
);
expect
(
vm
.
mergeButton
Variant
).
toEqual
(
'
info
'
);
});
it
(
'
returns
failed
class for failed status
'
,
()
=>
{
it
(
'
returns
danger
class for failed status
'
,
()
=>
{
vm
.
mr
.
hasCI
=
true
;
expect
(
vm
.
mergeButton
Class
).
toEqual
(
failedClass
);
expect
(
vm
.
mergeButton
Variant
).
toEqual
(
'
danger
'
);
});
});
...
...
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