Fix license fabrication

parent c0e69e10
......@@ -57,8 +57,8 @@ export default {
data-testid="activate-subscription-link"
:href="$options.links.activateSubscriptionUrl"
target="_blank"
>{{ content }}</gl-link
>
>{{ content }}
</gl-link>
</template>
</gl-sprintf>
</p>
......@@ -67,7 +67,11 @@ export default {
@subscription-activation-failure="handleFormActivationFailure"
/>
<template #footer>
<gl-link v-if="licenseUploadPath" data-testid="upload-license-link" :href="licenseUploadPath"
<gl-link
v-if="licenseUploadPath"
data-testid="upload-license-link"
data-qa-selector="license_upload_link"
:href="licenseUploadPath"
>{{ $options.i18n.uploadLicenseFile }}
</gl-link>
</template>
......
......@@ -62,4 +62,4 @@
%p= _('If you remove this license, GitLab will fall back on the previous license, if any.')
%p= _('If there is no previous license or if the previous license has expired, some GitLab functionality will be blocked until a new, valid license is uploaded.')
%br
= link_to _('Remove license'), admin_license_path, data: { confirm: _('Are you sure you want to remove the license?'), qa_selector: 'remove_license_link' }, method: :delete, class: 'gl-button btn btn-danger'
= link_to _('Remove license'), admin_license_path, data: { confirm: _('Are you sure you want to remove the license?') }, method: :delete, class: 'gl-button btn btn-danger'
......@@ -7,7 +7,7 @@
- if @license&.trial?
= render 'upload_buy_license'
- else
= link_to _('Upload New License'), new_admin_license_path, class: 'gl-button btn btn-confirm float-right', data: { qa_selector: 'license_upload_link' }
= link_to _('Upload New License'), new_admin_license_path, class: 'gl-button btn btn-confirm float-right'
%hr
......
= nav_link(controller: 'admin/subscriptions') do
= link_to admin_subscription_path, class: "qa-link-license-menu" do
= link_to admin_subscription_path, class: "qa-link-subscription-menu" do
.nav-icon-container
= sprite_icon('license')
%span.nav-item-name
......
......@@ -9,11 +9,11 @@ module QA
element :missing_license_content
end
view 'ee/app/views/admin/licenses/show.html.haml' do
view 'ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_activation_card.vue' do
element :license_upload_link
end
view 'ee/app/views/admin/licenses/_info.html.haml' do
view 'ee/app/assets/javascripts/admin/subscriptions/show/components/subscription_breakdown.vue' do
element :remove_license_link
end
......@@ -25,7 +25,7 @@ module QA
end
def license?
has_element?(:remove_license_link) || !has_element?(:missing_license_content)
has_element?(:remove_license_link)
end
def add_new_license(key)
......
......@@ -21,7 +21,7 @@ module QA
end
view 'ee/app/views/layouts/nav/sidebar/_licenses_link.html.haml' do
element :link_license_menu
element :link_subscription_menu
end
view 'ee/app/views/layouts/nav/ee/admin/_new_monitoring_sidebar.html.haml' do
......@@ -42,8 +42,8 @@ module QA
click_element :link_geo_menu
end
def click_license_menu_link
click_element :link_license_menu
def click_subscription_menu_link
click_element :link_subscription_menu
end
def go_to_template_settings
......
......@@ -7,7 +7,7 @@ module QA
def fabricate!(license)
QA::Page::Main::Login.perform(&:sign_in_using_admin_credentials)
QA::Page::Main::Menu.perform(&:go_to_admin_area)
QA::Page::Admin::Menu.perform(&:click_license_menu_link)
QA::Page::Admin::Menu.perform(&:click_subscription_menu_link)
EE::Page::Admin::License.perform do |license_page|
license_page.add_new_license(license) unless license_page.license?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment