summaryrefslogtreecommitdiff
path: root/spec/javascripts/vue_shared
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 21:09:19 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 21:09:19 +0000
commit7915c41e4261719719e791602c8235574157164c (patch)
tree6c1fc8c4ad4e974878c879fcc2c7c8f7d56d0cee /spec/javascripts/vue_shared
parent495c22d1245b6212b21b7379a542df73dfa77206 (diff)
downloadgitlab-ce-7915c41e4261719719e791602c8235574157164c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/vue_shared')
-rw-r--r--spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js b/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js
index f226dabb8a0..c062ee13231 100644
--- a/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js
+++ b/spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js
@@ -68,8 +68,20 @@ describe('StackedProgressBarComponent', () => {
});
describe('getTooltip', () => {
- it('returns label string based on label and count provided', () => {
- expect(vm.getTooltip('Synced', 10)).toBe('Synced: 10');
+ describe('when hideTooltips is false', () => {
+ it('returns label string based on label and count provided', () => {
+ expect(vm.getTooltip('Synced', 10)).toBe('Synced: 10');
+ });
+ });
+
+ describe('when hideTooltips is true', () => {
+ beforeEach(() => {
+ vm = createComponent({ hideTooltips: true });
+ });
+
+ it('returns an empty string', () => {
+ expect(vm.getTooltip('Synced', 10)).toBe('');
+ });
});
});
});