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
ec56425b
Commit
ec56425b
authored
Jun 14, 2019
by
Martin Wortschack
Committed by
Filipa Lacerda
Jun 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display loading icon when user clicks "Skip step"
- Add specs for displaying the loading icon
parent
54a8e358
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
ee/app/assets/javascripts/onboarding/onboarding_helper/components/onboarding_helper.vue
...arding/onboarding_helper/components/onboarding_helper.vue
+11
-2
ee/spec/javascripts/onboarding/onboarding_helper/components/onboarding_helper_spec.js
...ng/onboarding_helper/components/onboarding_helper_spec.js
+15
-1
No files found.
ee/app/assets/javascripts/onboarding/onboarding_helper/components/onboarding_helper.vue
View file @
ec56425b
<
script
>
import
{
__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
GlLink
,
GlProgressBar
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
GlProgressBar
,
GlButton
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
userAvatarImage
from
'
~/vue_shared/components/user_avatar/user_avatar_image.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
HelpContentPopover
from
'
./help_content_popover.vue
'
;
...
...
@@ -14,6 +14,7 @@ export default {
GlLink
,
GlProgressBar
,
GlButton
,
GlLoadingIcon
,
HelpContentPopover
,
TourPartsList
,
},
...
...
@@ -68,6 +69,7 @@ export default {
showPopover
:
false
,
popoverDismissed
:
false
,
helpContentTrigger
:
null
,
showLoadingIcon
:
false
,
};
},
computed
:
{
...
...
@@ -124,6 +126,7 @@ export default {
}
},
skipStep
()
{
this
.
showLoadingIcon
=
true
;
this
.
$emit
(
'
skipStep
'
);
},
restartStep
()
{
...
...
@@ -158,7 +161,13 @@ export default {
/>
<div
class=
"d-flex align-items-center cursor-pointer"
>
<div
class=
"avatar s48 mr-1 d-flex"
>
<img
:src=
"goldenTanukiSvgPath"
:alt=
"s__('Golden Tanuki')"
class=
"m-auto"
/>
<img
v-if=
"!showLoadingIcon"
:src=
"goldenTanukiSvgPath"
:alt=
"s__('Golden Tanuki')"
class=
"m-auto"
/>
<gl-loading-icon
v-else
:inline=
"true"
class=
"m-auto"
/>
</div>
<div
class=
"d-flex flex-grow justify-content-between"
>
<div
class=
"qa-headline"
>
...
...
ee/spec/javascripts/onboarding/onboarding_helper/components/onboarding_helper_spec.js
View file @
ec56425b
...
...
@@ -2,7 +2,7 @@ import component from 'ee/onboarding/onboarding_helper/components/onboarding_hel
import
TourPartsList
from
'
ee/onboarding/onboarding_helper/components/tour_parts_list.vue
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlProgressBar
}
from
'
@gitlab/ui
'
;
import
{
GlProgressBar
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
describe
(
'
User onboarding tour parts list
'
,
()
=>
{
let
wrapper
;
...
...
@@ -24,6 +24,7 @@ describe('User onboarding tour parts list', () => {
initialShow
:
false
,
dismissPopover
:
false
,
goldenTanukiSvgPath
:
'
illustrations/golden_tanuki.svg
'
,
showLoadingIcon
:
false
,
};
function
createComponent
(
propsData
)
{
...
...
@@ -198,6 +199,19 @@ describe('User onboarding tour parts list', () => {
expect
(
wrapper
.
emitted
(
'
skipStep
'
)).
toBeTruthy
();
});
it
(
'
displays the loading icon instead of the tanuki SVG when the "Skip this step" link is clicked
'
,
done
=>
{
wrapper
.
find
(
'
.qa-skip-step-link
'
).
vm
.
$emit
(
'
click
'
);
expect
(
wrapper
.
vm
.
showLoadingIcon
).
toBe
(
true
);
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
find
(
GlLoadingIcon
).
exists
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
'
.avatar img
'
).
exists
()).
toBe
(
false
);
done
();
});
});
});
describe
(
'
restartStep
'
,
()
=>
{
...
...
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