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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
07e7b15f
Commit
07e7b15f
authored
Mar 06, 2018
by
George Tsiolis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move ShaMismatch vue component
parent
e1739e47
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
26 deletions
+39
-26
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js
...equest_widget/components/states/mr_widget_sha_mismatch.js
+0
-18
app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue
...e_merge_request_widget/components/states/sha_mismatch.vue
+25
-0
app/assets/javascripts/vue_merge_request_widget/dependencies.js
...sets/javascripts/vue_merge_request_widget/dependencies.js
+1
-1
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
...javascripts/vue_merge_request_widget/mr_widget_options.js
+2
-2
app/assets/javascripts/vue_merge_request_widget/stores/state_maps.js
...javascripts/vue_merge_request_widget/stores/state_maps.js
+1
-1
changelogs/unreleased/refactor-move-mr-widget-sha-mismatch-vue-component.yml
...ed/refactor-move-mr-widget-sha-mismatch-vue-component.yml
+5
-0
spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js
...r_widget/components/states/mr_widget_sha_mismatch_spec.js
+5
-4
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_sha_mismatch.js
deleted
100644 → 0
View file @
e1739e47
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
export
default
{
name
:
'
MRWidgetSHAMismatch
'
,
components
:
{
statusIcon
,
},
template
:
`
<div class="mr-widget-body media">
<status-icon status="warning" :show-disabled-button="true" />
<div class="media-body space-children">
<span class="bold">
The source branch HEAD has recently changed. Please reload the page and review the changes before merging
</span>
</div>
</div>
`
,
};
app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue
0 → 100644
View file @
07e7b15f
<
script
>
import
statusIcon
from
'
../mr_widget_status_icon.vue
'
;
export
default
{
name
:
'
ShaMismatch
'
,
components
:
{
statusIcon
,
},
};
</
script
>
<
template
>
<div
class=
"mr-widget-body media"
>
<status-icon
status=
"warning"
:show-disabled-button=
"true"
/>
<div
class=
"media-body space-children"
>
<span
class=
"bold"
>
The source branch HEAD has recently changed.
Please reload the page and review the changes before merging.
</span>
</div>
</div>
</
template
>
app/assets/javascripts/vue_merge_request_widget/dependencies.js
View file @
07e7b15f
...
@@ -28,7 +28,7 @@ export { default as NothingToMergeState } from './components/states/nothing_to_m
...
@@ -28,7 +28,7 @@ export { default as NothingToMergeState } from './components/states/nothing_to_m
export
{
default
as
MissingBranchState
}
from
'
./components/states/mr_widget_missing_branch.vue
'
;
export
{
default
as
MissingBranchState
}
from
'
./components/states/mr_widget_missing_branch.vue
'
;
export
{
default
as
NotAllowedState
}
from
'
./components/states/mr_widget_not_allowed.vue
'
;
export
{
default
as
NotAllowedState
}
from
'
./components/states/mr_widget_not_allowed.vue
'
;
export
{
default
as
ReadyToMergeState
}
from
'
./components/states/mr_widget_ready_to_merge
'
;
export
{
default
as
ReadyToMergeState
}
from
'
./components/states/mr_widget_ready_to_merge
'
;
export
{
default
as
S
HAMismatchState
}
from
'
./components/states/mr_widget_sha_mismatch
'
;
export
{
default
as
S
haMismatchState
}
from
'
./components/states/sha_mismatch.vue
'
;
export
{
default
as
UnresolvedDiscussionsState
}
from
'
./components/states/unresolved_discussions.vue
'
;
export
{
default
as
UnresolvedDiscussionsState
}
from
'
./components/states/unresolved_discussions.vue
'
;
export
{
default
as
PipelineBlockedState
}
from
'
./components/states/mr_widget_pipeline_blocked.vue
'
;
export
{
default
as
PipelineBlockedState
}
from
'
./components/states/mr_widget_pipeline_blocked.vue
'
;
export
{
default
as
PipelineFailedState
}
from
'
./components/states/mr_widget_pipeline_failed
'
;
export
{
default
as
PipelineFailedState
}
from
'
./components/states/mr_widget_pipeline_failed
'
;
...
...
app/assets/javascripts/vue_merge_request_widget/mr_widget_options.js
View file @
07e7b15f
...
@@ -19,7 +19,7 @@ import {
...
@@ -19,7 +19,7 @@ import {
MissingBranchState
,
MissingBranchState
,
NotAllowedState
,
NotAllowedState
,
ReadyToMergeState
,
ReadyToMergeState
,
S
HA
MismatchState
,
S
ha
MismatchState
,
UnresolvedDiscussionsState
,
UnresolvedDiscussionsState
,
PipelineBlockedState
,
PipelineBlockedState
,
PipelineFailedState
,
PipelineFailedState
,
...
@@ -227,7 +227,7 @@ export default {
...
@@ -227,7 +227,7 @@ export default {
'
mr-widget-not-allowed
'
:
NotAllowedState
,
'
mr-widget-not-allowed
'
:
NotAllowedState
,
'
mr-widget-missing-branch
'
:
MissingBranchState
,
'
mr-widget-missing-branch
'
:
MissingBranchState
,
'
mr-widget-ready-to-merge
'
:
ReadyToMergeState
,
'
mr-widget-ready-to-merge
'
:
ReadyToMergeState
,
'
mr-widget-sha-mismatch
'
:
S
HA
MismatchState
,
'
mr-widget-sha-mismatch
'
:
S
ha
MismatchState
,
'
mr-widget-squash-before-merge
'
:
SquashBeforeMerge
,
'
mr-widget-squash-before-merge
'
:
SquashBeforeMerge
,
'
mr-widget-checking
'
:
CheckingState
,
'
mr-widget-checking
'
:
CheckingState
,
'
mr-widget-unresolved-discussions
'
:
UnresolvedDiscussionsState
,
'
mr-widget-unresolved-discussions
'
:
UnresolvedDiscussionsState
,
...
...
app/assets/javascripts/vue_merge_request_widget/stores/state_maps.js
View file @
07e7b15f
...
@@ -16,7 +16,7 @@ const stateToComponentMap = {
...
@@ -16,7 +16,7 @@ const stateToComponentMap = {
mergeWhenPipelineSucceeds
:
'
mr-widget-merge-when-pipeline-succeeds
'
,
mergeWhenPipelineSucceeds
:
'
mr-widget-merge-when-pipeline-succeeds
'
,
failedToMerge
:
'
mr-widget-failed-to-merge
'
,
failedToMerge
:
'
mr-widget-failed-to-merge
'
,
autoMergeFailed
:
'
mr-widget-auto-merge-failed
'
,
autoMergeFailed
:
'
mr-widget-auto-merge-failed
'
,
shaMismatch
:
'
mr-widget-
sha-mismatch
'
,
shaMismatch
:
'
sha-mismatch
'
,
rebase
:
'
mr-widget-rebase
'
,
rebase
:
'
mr-widget-rebase
'
,
};
};
...
...
changelogs/unreleased/refactor-move-mr-widget-sha-mismatch-vue-component.yml
0 → 100644
View file @
07e7b15f
---
title
:
Move ShaMismatch vue component
merge_request
:
17546
author
:
George Tsiolis
type
:
performance
spec/javascripts/vue_mr_widget/components/states/mr_widget_sha_mismatch_spec.js
View file @
07e7b15f
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
shaMismatchComponent
from
'
~/vue_merge_request_widget/components/states/mr_widget_sha_mismatch
'
;
import
ShaMismatch
from
'
~/vue_merge_request_widget/components/states/sha_mismatch.vue
'
;
describe
(
'
MRWidgetSHA
Mismatch
'
,
()
=>
{
describe
(
'
Sha
Mismatch
'
,
()
=>
{
describe
(
'
template
'
,
()
=>
{
describe
(
'
template
'
,
()
=>
{
const
Component
=
Vue
.
extend
(
shaMismatchComponent
);
const
Component
=
Vue
.
extend
(
ShaMismatch
);
const
vm
=
new
Component
({
const
vm
=
new
Component
({
el
:
document
.
createElement
(
'
div
'
),
el
:
document
.
createElement
(
'
div
'
),
});
});
it
(
'
should have correct elements
'
,
()
=>
{
it
(
'
should have correct elements
'
,
()
=>
{
expect
(
vm
.
$el
.
classList
.
contains
(
'
mr-widget-body
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
classList
.
contains
(
'
mr-widget-body
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
button
'
).
getAttribute
(
'
disabled
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
querySelector
(
'
button
'
).
getAttribute
(
'
disabled
'
)).
toBeTruthy
();
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
The source branch HEAD has recently changed. Please reload the page and review the changes before merging
'
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
The source branch HEAD has recently changed.
'
);
expect
(
vm
.
$el
.
innerText
).
toContain
(
'
Please reload the page and review the changes before merging.
'
);
});
});
});
});
});
});
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