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
87bf67c5
Commit
87bf67c5
authored
Aug 11, 2020
by
Taurie Davis
Committed by
Nathan Friend
Aug 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate deprecated buttons from admin delete user modal
parent
c94a823d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
21 deletions
+30
-21
app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
...cripts/pages/admin/users/components/delete_user_modal.vue
+12
-9
spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap
...s/components/__snapshots__/delete_user_modal_spec.js.snap
+16
-10
spec/frontend/pages/admin/users/components/delete_user_modal_spec.js
...nd/pages/admin/users/components/delete_user_modal_spec.js
+2
-2
No files found.
app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue
View file @
87bf67c5
<
script
>
import
{
escape
}
from
'
lodash
'
;
import
{
GlModal
,
Gl
Deprecated
Button
,
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
GlModal
,
GlButton
,
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
s__
,
sprintf
}
from
'
~/locale
'
;
export
default
{
components
:
{
GlModal
,
Gl
Deprecated
Button
,
GlButton
,
GlFormInput
,
},
props
:
{
...
...
@@ -122,15 +122,18 @@ export default {
</form>
</
template
>
<
template
#modal-footer
>
<gl-deprecated-button
variant=
"secondary"
@
click=
"onCancel"
>
{{
s__
(
'
Cancel
'
)
}}
</gl-deprecated-button>
<gl-deprecated-button
:disabled=
"!canSubmit"
variant=
"warning"
@
click=
"onSecondaryAction"
>
<gl-button
@
click=
"onCancel"
>
{{
s__
(
'
Cancel
'
)
}}
</gl-button>
<gl-button
:disabled=
"!canSubmit"
category=
"primary"
variant=
"warning"
@
click=
"onSecondaryAction"
>
{{
secondaryAction
}}
</gl-
deprecated-
button>
<gl-
deprecated-button
:disabled=
"!canSubmit
"
variant=
"danger"
@
click=
"onSubmit"
>
{{
</gl-button>
<gl-
button
:disabled=
"!canSubmit"
category=
"primary
"
variant=
"danger"
@
click=
"onSubmit"
>
{{
action
}}
</gl-
deprecated-
button>
}}
</gl-button>
</
template
>
</gl-modal>
</template>
spec/frontend/pages/admin/users/components/__snapshots__/delete_user_modal_spec.js.snap
View file @
87bf67c5
...
...
@@ -37,29 +37,35 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
value=""
/>
</form>
<gl-deprecated-button-stub
size="md"
variant="secondary"
<gl-button-stub
category="tertiary"
icon=""
size="medium"
variant="default"
>
Cancel
</gl-
deprecated-
button-stub>
</gl-button-stub>
<gl-deprecated-button-stub
<gl-button-stub
category="primary"
disabled="true"
size="md"
icon=""
size="medium"
variant="warning"
>
secondaryAction
</gl-
deprecated-
button-stub>
</gl-button-stub>
<gl-deprecated-button-stub
<gl-button-stub
category="primary"
disabled="true"
size="md"
icon=""
size="medium"
variant="danger"
>
action
</gl-
deprecated-
button-stub>
</gl-button-stub>
</div>
`;
spec/frontend/pages/admin/users/components/delete_user_modal_spec.js
View file @
87bf67c5
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
Gl
Deprecated
Button
,
GlFormInput
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlFormInput
}
from
'
@gitlab/ui
'
;
import
DeleteUserModal
from
'
~/pages/admin/users/components/delete_user_modal.vue
'
;
import
ModalStub
from
'
./stubs/modal_stub
'
;
...
...
@@ -13,7 +13,7 @@ describe('User Operation confirmation modal', () => {
const
findButton
=
variant
=>
wrapper
.
findAll
(
Gl
Deprecated
Button
)
.
findAll
(
GlButton
)
.
filter
(
w
=>
w
.
attributes
(
'
variant
'
)
===
variant
)
.
at
(
0
);
const
findForm
=
()
=>
wrapper
.
find
(
'
form
'
);
...
...
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