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
bf8e670d
Commit
bf8e670d
authored
May 21, 2021
by
Angelo Gulina
Committed by
Andrew Fontaine
May 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update anchor link for subscription with code
parent
b30db443
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
ee/app/assets/javascripts/pages/admin/cloud_licenses/components/subscription_activation_card.vue
...loud_licenses/components/subscription_activation_card.vue
+10
-3
ee/app/assets/javascripts/pages/admin/cloud_licenses/components/subscription_activation_form.vue
...loud_licenses/components/subscription_activation_form.vue
+3
-3
ee/spec/frontend/admin/cloud_licenses/components/subscription_activation_card_spec.js
..._licenses/components/subscription_activation_card_spec.js
+10
-3
No files found.
ee/app/assets/javascripts/pages/admin/cloud_licenses/components/subscription_activation_card.vue
View file @
bf8e670d
...
...
@@ -5,7 +5,9 @@ import { activateSubscription, howToActivateSubscription, uploadLegacyLicense }
import
SubscriptionActivationErrors
from
'
./subscription_activation_errors.vue
'
;
import
SubscriptionActivationForm
from
'
./subscription_activation_form.vue
'
;
export
const
adminLicenseUrl
=
helpPagePath
(
'
/user/admin_area/license
'
);
export
const
activateSubscriptionUrl
=
helpPagePath
(
'
/user/admin_area/license
'
,
{
anchor
:
'
activate-gitlab-ee-with-an-activation-code
'
,
});
export
default
{
name
:
'
SubscriptionActivationCard
'
,
...
...
@@ -23,7 +25,7 @@ export default {
},
inject
:
[
'
licenseUploadPath
'
],
links
:
{
a
dminLicense
Url
,
a
ctivateSubscription
Url
,
},
data
()
{
return
{
...
...
@@ -51,7 +53,12 @@ export default {
<p
class=
"gl-mb-0 gl-px-5 gl-pt-5"
>
<gl-sprintf
:message=
"$options.i18n.howToActivateSubscription"
>
<
template
#link=
"{ content }"
>
<gl-link
:href=
"$options.links.adminLicenseUrl"
target=
"_blank"
>
{{
content
}}
</gl-link>
<gl-link
data-testid=
"activate-subscription-link"
:href=
"$options.links.activateSubscriptionUrl"
target=
"_blank"
>
{{
content
}}
</gl-link
>
</
template
>
</gl-sprintf>
</p>
...
...
ee/app/assets/javascripts/pages/admin/cloud_licenses/components/subscription_activation_form.vue
View file @
bf8e670d
...
...
@@ -155,9 +155,9 @@ export default {
>
<gl-sprintf
:message=
"$options.i18n.acceptTerms"
>
<template
#link
="
{ content }">
<gl-link
href=
"https://about.gitlab.com/terms/"
target=
"_blank"
>
{{
content
}}
</gl-link>
<gl-link
href=
"https://about.gitlab.com/terms/"
target=
"_blank"
>
{{
content
}}
</gl-link>
</
template
>
</gl-sprintf>
</gl-form-checkbox>
...
...
ee/spec/frontend/admin/cloud_licenses/components/subscription_activation_card_spec.js
View file @
bf8e670d
import
{
GlCard
}
from
'
@gitlab/ui
'
;
import
{
GlCard
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
SubscriptionActivationCard
from
'
ee/pages/admin/cloud_licenses/components/subscription_activation_card.vue
'
;
import
SubscriptionActivationCard
,
{
activateSubscriptionUrl
,
}
from
'
ee/pages/admin/cloud_licenses/components/subscription_activation_card.vue
'
;
import
SubscriptionActivationErrors
from
'
ee/pages/admin/cloud_licenses/components/subscription_activation_errors.vue
'
;
import
SubscriptionActivationForm
,
{
SUBSCRIPTION_ACTIVATION_FAILURE_EVENT
,
...
...
@@ -15,6 +17,7 @@ describe('CloudLicenseApp', () => {
const
findSubscriptionActivationForm
=
()
=>
wrapper
.
findComponent
(
SubscriptionActivationForm
);
const
findSubscriptionActivationErrors
=
()
=>
wrapper
.
findComponent
(
SubscriptionActivationErrors
);
const
findActivateSubscriptionLink
=
()
=>
wrapper
.
findByTestId
(
'
activate-subscription-link
'
);
const
findUploadLink
=
()
=>
wrapper
.
findByTestId
(
'
upload-license-link
'
);
const
createComponent
=
({
props
=
{},
stubs
=
{},
provide
=
{}
}
=
{})
=>
{
...
...
@@ -50,13 +53,17 @@ describe('CloudLicenseApp', () => {
describe
(
'
with an upload legacy license link
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
stubs
:
{
GlCard
}
});
createComponent
({
stubs
:
{
GlCard
,
GlSprintf
}
});
});
it
(
'
shows a link when provided
'
,
()
=>
{
expect
(
findUploadLink
().
text
()).
toBe
(
'
Upload a legacy license
'
);
});
it
(
'
shows an help link
'
,
()
=>
{
expect
(
findActivateSubscriptionLink
().
attributes
(
'
href
'
)).
toBe
(
activateSubscriptionUrl
);
});
it
(
'
provides the correct path
'
,
()
=>
{
expect
(
findUploadLink
().
attributes
(
'
href
'
)).
toBe
(
licenseUploadPath
);
});
...
...
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