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
5bc8c1b0
Commit
5bc8c1b0
authored
Jan 20, 2022
by
Diana Zubova
Committed by
Jose Ivan Vargas
Jan 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide tooltip on storage
Hide tooltip when no subscription end date is provided
parent
833c6a0a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
32 deletions
+27
-32
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/app.vue
...cripts/subscriptions/buy_addons_shared/components/app.vue
+1
-14
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary.vue
...scriptions/buy_addons_shared/components/order_summary.vue
+0
-6
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary/summary_details.vue
...ddons_shared/components/order_summary/summary_details.vue
+15
-2
ee/app/assets/javascripts/subscriptions/buy_minutes/components/app.vue
.../javascripts/subscriptions/buy_minutes/components/app.vue
+0
-1
ee/app/assets/javascripts/subscriptions/buy_storage/components/app.vue
.../javascripts/subscriptions/buy_storage/components/app.vue
+0
-2
ee/spec/frontend/subscriptions/buy_addons_shared/app_spec.js
ee/spec/frontend/subscriptions/buy_addons_shared/app_spec.js
+0
-3
ee/spec/frontend/subscriptions/buy_addons_shared/components/order_summary/summary_details_spec.js
...s_shared/components/order_summary/summary_details_spec.js
+11
-1
ee/spec/frontend/subscriptions/buy_minutes/components/app_spec.js
...frontend/subscriptions/buy_minutes/components/app_spec.js
+0
-1
ee/spec/frontend/subscriptions/buy_storage/components/app_spec.js
...frontend/subscriptions/buy_storage/components/app_spec.js
+0
-2
No files found.
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/app.vue
View file @
5bc8c1b0
<
script
>
import
emptySvg
from
'
@gitlab/svgs/dist/illustrations/security-dashboard-empty-state.svg
'
;
import
{
GlEmptyState
,
Gl
Icon
,
GlAlert
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
{
GlEmptyState
,
Gl
Alert
}
from
'
@gitlab/ui
'
;
import
*
as
Sentry
from
'
@sentry/browser
'
;
import
OrderSummary
from
'
ee/subscriptions/buy_addons_shared/components/order_summary.vue
'
;
import
{
ERROR_FETCHING_DATA_HEADER
,
ERROR_FETCHING_DATA_DESCRIPTION
}
from
'
~/ensure_data
'
;
...
...
@@ -17,13 +17,9 @@ export default {
AddonPurchaseDetails
,
Checkout
,
GlEmptyState
,
GlIcon
,
GlAlert
,
OrderSummary
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
props
:
{
config
:
{
required
:
true
,
...
...
@@ -175,15 +171,6 @@ export default {
<
template
#price-per-unit=
"{ price }"
>
{{
pricePerUnitLabel
(
price
)
}}
</
template
>
<
template
#tooltip
>
<gl-icon
v-gl-tooltip
.
right
:title=
"config.tooltipNote"
:aria-label=
"config.tooltipNote"
role=
"tooltip"
name=
"question"
/>
</
template
>
</order-summary>
</div>
</div>
...
...
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary.vue
View file @
5bc8c1b0
...
...
@@ -159,9 +159,6 @@ export default {
<template
#price-per-unit
="
{ price }">
<slot
name=
"price-per-unit"
:price=
"price"
></slot>
</
template
>
<
template
#tooltip
>
<slot
name=
"tooltip"
></slot>
</
template
>
</summary-details>
</gl-collapse>
</div>
...
...
@@ -184,9 +181,6 @@ export default {
<
template
#price-per-unit=
"{ price }"
>
<slot
name=
"price-per-unit"
:price=
"price"
></slot>
</
template
>
<
template
#tooltip
>
<slot
name=
"tooltip"
></slot>
</
template
>
</summary-details>
</div>
</div>
...
...
ee/app/assets/javascripts/subscriptions/buy_addons_shared/components/order_summary/summary_details.vue
View file @
5bc8c1b0
<
script
>
import
{
GlLink
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlLink
,
Gl
Icon
,
GlTooltipDirective
,
Gl
Sprintf
}
from
'
@gitlab/ui
'
;
import
formattingMixins
from
'
ee/subscriptions/new/formatting_mixins
'
;
import
{
formatNumber
}
from
'
~/locale
'
;
import
{
...
...
@@ -9,12 +9,17 @@ import {
I18N_SUMMARY_TAX
,
I18N_SUMMARY_TAX_NOTE
,
I18N_SUMMARY_TOTAL
,
I18N_STORAGE_TOOLTIP_NOTE
,
}
from
'
../../constants
'
;
export
default
{
components
:
{
GlLink
,
GlSprintf
,
GlIcon
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
mixins
:
[
formattingMixins
],
props
:
{
...
...
@@ -93,6 +98,7 @@ export default {
tax
:
I18N_SUMMARY_TAX
,
taxNote
:
I18N_SUMMARY_TAX_NOTE
,
total
:
I18N_SUMMARY_TOTAL
,
tooltipNote
:
I18N_STORAGE_TOOLTIP_NOTE
,
},
};
</
script
>
...
...
@@ -120,7 +126,14 @@ export default {
endDate
:
formatDate
(
endDate
),
}
)
}}
<
slot
name
=
"
tooltip
"
><
/slot
>
<
gl
-
icon
v
-
if
=
"
subscriptionEndDate
"
v
-
gl
-
tooltip
.
right
:
title
=
"
$options.i18n.tooltipNote
"
:
aria
-
label
=
"
$options.i18n.tooltipNote
"
role
=
"
tooltip
"
name
=
"
question
"
/>
<
/div
>
<
/div
>
<
div
class
=
"
gl-border-b-1 gl-border-b-gray-100 gl-border-b-solid gl-py-3
"
>
...
...
ee/app/assets/javascripts/subscriptions/buy_minutes/components/app.vue
View file @
5bc8c1b0
...
...
@@ -38,7 +38,6 @@ export default {
summaryTitle
:
i18nCIMinutesSummaryTitle
,
summaryTotal
:
I18N_CI_MINUTES_SUMMARY_TOTAL
,
title
:
I18N_CI_MINUTES_TITLE
,
tooltipNote
:
''
,
};
},
},
...
...
ee/app/assets/javascripts/subscriptions/buy_storage/components/app.vue
View file @
5bc8c1b0
...
...
@@ -10,7 +10,6 @@ import {
I18N_STORAGE_SUMMARY_TOTAL
,
I18N_STORAGE_TITLE
,
I18N_STORAGE_PRICE_PER_UNIT
,
I18N_STORAGE_TOOLTIP_NOTE
,
planTags
,
STORAGE_PER_PACK
,
}
from
'
ee/subscriptions/buy_addons_shared/constants
'
;
...
...
@@ -39,7 +38,6 @@ export default {
summaryTitle
:
i18nStorageSummaryTitle
,
summaryTotal
:
I18N_STORAGE_SUMMARY_TOTAL
,
title
:
I18N_STORAGE_TITLE
,
tooltipNote
:
I18N_STORAGE_TOOLTIP_NOTE
,
};
},
},
...
...
ee/spec/frontend/subscriptions/buy_addons_shared/app_spec.js
View file @
5bc8c1b0
...
...
@@ -21,7 +21,6 @@ import {
I18N_STORAGE_SUMMARY_TOTAL
,
I18N_STORAGE_TITLE
,
I18N_STORAGE_PRICE_PER_UNIT
,
I18N_STORAGE_TOOLTIP_NOTE
,
I18N_API_ERROR
,
planTags
,
STORAGE_PER_PACK
,
...
...
@@ -71,7 +70,6 @@ describe('Buy Addons Shared App', () => {
summaryTitle
:
i18nStorageSummaryTitle
,
summaryTotal
:
I18N_STORAGE_SUMMARY_TOTAL
,
title
:
I18N_STORAGE_TITLE
,
tooltipNote
:
I18N_STORAGE_TOOLTIP_NOTE
,
},
tags
:
[
planTags
.
STORAGE_PLAN
],
};
...
...
@@ -89,7 +87,6 @@ describe('Buy Addons Shared App', () => {
summaryTitle
:
i18nCIMinutesSummaryTitle
,
summaryTotal
:
I18N_CI_MINUTES_SUMMARY_TOTAL
,
title
:
I18N_CI_MINUTES_TITLE
,
tooltipNote
:
''
,
},
tags
:
[
planTags
.
CI_1000_MINUTES_PLAN
],
};
...
...
ee/spec/frontend/subscriptions/buy_addons_shared/components/order_summary/summary_details_spec.js
View file @
5bc8c1b0
import
{
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
GlSprintf
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
SummaryDetails
from
'
ee/subscriptions/buy_addons_shared/components/order_summary/summary_details.vue
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
useFakeDate
}
from
'
helpers/fake_date
'
;
...
...
@@ -21,6 +21,7 @@ describe('SummaryDetails', () => {
},
stubs
:
{
GlSprintf
,
GlIcon
,
},
});
};
...
...
@@ -32,6 +33,7 @@ describe('SummaryDetails', () => {
const
findVat
=
()
=>
wrapper
.
findByTestId
(
'
vat
'
);
const
findVatHelpLink
=
()
=>
wrapper
.
findByTestId
(
'
vat-help-link
'
);
const
findVatInfoLine
=
()
=>
wrapper
.
findByTestId
(
'
vat-info-line
'
);
const
findToolip
=
()
=>
wrapper
.
findComponent
(
GlIcon
);
afterEach
(()
=>
{
wrapper
.
destroy
();
...
...
@@ -93,6 +95,10 @@ describe('SummaryDetails', () => {
expect
(
findSubscriptionPeriod
().
isVisible
()).
toBe
(
true
);
expect
(
findSubscriptionPeriod
().
text
()).
toBe
(
'
Jan 16, 2021 - Jan 16, 2022
'
);
});
it
(
'
hides a tooltip
'
,
()
=>
{
expect
(
findToolip
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
when subscription has expiration and the end date provided
'
,
()
=>
{
...
...
@@ -104,6 +110,10 @@ describe('SummaryDetails', () => {
expect
(
findSubscriptionPeriod
().
isVisible
()).
toBe
(
true
);
expect
(
findSubscriptionPeriod
().
text
()).
toBe
(
'
Jan 16, 2021 - Feb 6, 2021
'
);
});
it
(
'
shows a tooltip
'
,
()
=>
{
expect
(
findToolip
().
isVisible
()).
toBe
(
true
);
});
});
describe
(
'
when subscription does not have expiration
'
,
()
=>
{
...
...
ee/spec/frontend/subscriptions/buy_minutes/components/app_spec.js
View file @
5bc8c1b0
...
...
@@ -51,7 +51,6 @@ describe('Buy Minutes App', () => {
summaryTitle
:
i18nCIMinutesSummaryTitle
,
summaryTotal
:
I18N_CI_MINUTES_SUMMARY_TOTAL
,
title
:
I18N_CI_MINUTES_TITLE
,
tooltipNote
:
''
,
});
});
});
ee/spec/frontend/subscriptions/buy_storage/components/app_spec.js
View file @
5bc8c1b0
...
...
@@ -11,7 +11,6 @@ import {
I18N_STORAGE_SUMMARY_TOTAL
,
I18N_STORAGE_TITLE
,
I18N_STORAGE_PRICE_PER_UNIT
,
I18N_STORAGE_TOOLTIP_NOTE
,
planTags
,
STORAGE_PER_PACK
,
}
from
'
ee/subscriptions/buy_addons_shared/constants
'
;
...
...
@@ -51,7 +50,6 @@ describe('Buy Storage App', () => {
summaryTitle
:
i18nStorageSummaryTitle
,
summaryTotal
:
I18N_STORAGE_SUMMARY_TOTAL
,
title
:
I18N_STORAGE_TITLE
,
tooltipNote
:
I18N_STORAGE_TOOLTIP_NOTE
,
});
});
});
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