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
94fae0df
Commit
94fae0df
authored
Jul 27, 2020
by
Jarek Ostrowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update suggest gitlab ci popover button
MR:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37987
parent
dc6b984c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue
...scripts/blob/suggest_gitlab_ci_yml/components/popover.vue
+5
-7
changelogs/unreleased/219888-suggest-gitlab-ci-popover.yml
changelogs/unreleased/219888-suggest-gitlab-ci-popover.yml
+5
-0
spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js
...end/blob/suggest_gitlab_ci_yml/components/popover_spec.js
+2
-2
No files found.
app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue
View file @
94fae0df
<
script
>
<
script
>
import
{
GlPopover
,
GlSprintf
,
Gl
DeprecatedButton
,
GlIc
on
}
from
'
@gitlab/ui
'
;
import
{
GlPopover
,
GlSprintf
,
Gl
Butt
on
}
from
'
@gitlab/ui
'
;
import
{
parseBoolean
,
scrollToElement
,
setCookie
,
getCookie
}
from
'
~/lib/utils/common_utils
'
;
import
{
parseBoolean
,
scrollToElement
,
setCookie
,
getCookie
}
from
'
~/lib/utils/common_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
Tracking
from
'
~/tracking
'
;
import
Tracking
from
'
~/tracking
'
;
...
@@ -29,8 +29,7 @@ export default {
...
@@ -29,8 +29,7 @@ export default {
components
:
{
components
:
{
GlPopover
,
GlPopover
,
GlSprintf
,
GlSprintf
,
GlIcon
,
GlButton
,
GlDeprecatedButton
,
},
},
mixins
:
[
trackingMixin
],
mixins
:
[
trackingMixin
],
props
:
{
props
:
{
...
@@ -112,18 +111,17 @@ export default {
...
@@ -112,18 +111,17 @@ export default {
<template
#title
>
<template
#title
>
<span
v-html=
"suggestTitle"
></span>
<span
v-html=
"suggestTitle"
></span>
<span
class=
"ml-auto"
>
<span
class=
"ml-auto"
>
<gl-
deprecated-
button
<gl-button
:aria-label=
"__('Close')"
:aria-label=
"__('Close')"
class=
"btn-blank"
class=
"btn-blank"
name=
"dismiss"
name=
"dismiss"
icon=
"close"
:data-track-property=
"humanAccess"
:data-track-property=
"humanAccess"
:data-track-value=
"$options.dismissTrackValue"
:data-track-value=
"$options.dismissTrackValue"
:data-track-event=
"$options.clickTrackValue"
:data-track-event=
"$options.clickTrackValue"
:data-track-label=
"trackLabel"
:data-track-label=
"trackLabel"
@
click=
"onDismiss"
@
click=
"onDismiss"
>
/>
<gl-icon
name=
"close"
aria-hidden=
"true"
/>
</gl-deprecated-button>
</span>
</span>
</
template
>
</
template
>
...
...
changelogs/unreleased/219888-suggest-gitlab-ci-popover.yml
0 → 100644
View file @
94fae0df
---
title
:
Update suggest gitlab ci popover to gl-button
merge_request
:
37987
author
:
type
:
changed
spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js
View file @
94fae0df
...
@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
...
@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
import
Popover
from
'
~/blob/suggest_gitlab_ci_yml/components/popover.vue
'
;
import
Popover
from
'
~/blob/suggest_gitlab_ci_yml/components/popover.vue
'
;
import
{
mockTracking
,
unmockTracking
,
triggerEvent
}
from
'
helpers/tracking_helper
'
;
import
{
mockTracking
,
unmockTracking
,
triggerEvent
}
from
'
helpers/tracking_helper
'
;
import
*
as
utils
from
'
~/lib/utils/common_utils
'
;
import
*
as
utils
from
'
~/lib/utils/common_utils
'
;
import
{
Gl
Deprecated
Button
}
from
'
@gitlab/ui
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
jest
.
mock
(
'
~/lib/utils/common_utils
'
,
()
=>
({
jest
.
mock
(
'
~/lib/utils/common_utils
'
,
()
=>
({
...
jest
.
requireActual
(
'
~/lib/utils/common_utils
'
),
...
jest
.
requireActual
(
'
~/lib/utils/common_utils
'
),
...
@@ -96,7 +96,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
...
@@ -96,7 +96,7 @@ describe('Suggest gitlab-ci.yml Popover', () => {
const
expectedAction
=
'
click_button
'
;
const
expectedAction
=
'
click_button
'
;
const
expectedProperty
=
'
owner
'
;
const
expectedProperty
=
'
owner
'
;
const
expectedValue
=
'
10
'
;
const
expectedValue
=
'
10
'
;
const
dismissButton
=
wrapper
.
find
(
Gl
Deprecated
Button
);
const
dismissButton
=
wrapper
.
find
(
GlButton
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
trackingSpy
=
mockTracking
(
'
_category_
'
,
wrapper
.
element
,
jest
.
spyOn
);
triggerEvent
(
dismissButton
.
element
);
triggerEvent
(
dismissButton
.
element
);
...
...
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