Commit 23f0fd46 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'update-cloud-license-selector' into 'master'

Add qa selector for cloud license page

See merge request gitlab-org/gitlab!61493
parents 72974327 0ab25de1
...@@ -139,6 +139,7 @@ export default { ...@@ -139,6 +139,7 @@ export default {
:tbody-tr-class="rowClass" :tbody-tr-class="rowClass"
responsive responsive
stacked="sm" stacked="sm"
data-qa-selector="subscription_history"
> >
<template #cell(type)="{ value }"> <template #cell(type)="{ value }">
<gl-badge size="md" variant="info">{{ value }}</gl-badge> <gl-badge size="md" variant="info">{{ value }}</gl-badge>
......
<script> <script>
import { GlSkeletonLoader, GlTable } from '@gitlab/ui'; import { GlSkeletonLoader, GlTable } from '@gitlab/ui';
import { slugifyWithUnderscore } from '~/lib/utils/text_utility';
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
import { copySubscriptionIdButtonText } from '../constants'; import { copySubscriptionIdButtonText } from '../constants';
...@@ -60,6 +61,9 @@ export default { ...@@ -60,6 +61,9 @@ export default {
placeHolderPosition(index) { placeHolderPosition(index) {
return (index - 1) * placeholderHeightFactor; return (index - 1) * placeholderHeightFactor;
}, },
qaSelectorValue(label) {
return slugifyWithUnderscore(label.toLowerCase());
},
}, },
}; };
</script> </script>
...@@ -73,7 +77,11 @@ export default { ...@@ -73,7 +77,11 @@ export default {
</template> </template>
<template #cell(value)="{ item, value }"> <template #cell(value)="{ item, value }">
<p class="gl-relative" data-testid="details-content"> <p
class="gl-relative"
data-testid="details-content"
:data-qa-selector="qaSelectorValue(item.label)"
>
{{ value || '-' }} {{ value || '-' }}
<clipboard-button <clipboard-button
v-if="item.canCopy" v-if="item.canCopy"
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
<div class="col-md-6 gl-mb-5"> <div class="col-md-6 gl-mb-5">
<gl-card data-testid="users-in-subscription"> <gl-card data-testid="users-in-subscription">
<header> <header>
<h2>{{ usersInSubscription }}</h2> <h2 data-qa-selector="users_in_subscription">{{ usersInSubscription }}</h2>
<h5 class="gl-font-weight-normal text-uppercase"> <h5 class="gl-font-weight-normal text-uppercase">
{{ $options.i18n.usersInSubscriptionTitle }} {{ $options.i18n.usersInSubscriptionTitle }}
</h5> </h5>
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
<div class="col-md-6 gl-mb-5"> <div class="col-md-6 gl-mb-5">
<gl-card data-testid="billable-users"> <gl-card data-testid="billable-users">
<header> <header>
<h2>{{ billableUsers }}</h2> <h2 data-qa-selector="billable_users">{{ billableUsers }}</h2>
<h5 class="gl-font-weight-normal text-uppercase"> <h5 class="gl-font-weight-normal text-uppercase">
{{ $options.i18n.billableUsersTitle }} {{ $options.i18n.billableUsersTitle }}
</h5> </h5>
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
<div class="col-md-6 gl-mb-5"> <div class="col-md-6 gl-mb-5">
<gl-card data-testid="maximum-users"> <gl-card data-testid="maximum-users">
<header> <header>
<h2>{{ maximumUsers }}</h2> <h2 data-qa-selector="maximum_users">{{ maximumUsers }}</h2>
<h5 class="gl-font-weight-normal text-uppercase"> <h5 class="gl-font-weight-normal text-uppercase">
{{ $options.i18n.maximumUsersTitle }} {{ $options.i18n.maximumUsersTitle }}
</h5> </h5>
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
<div class="col-md-6 gl-mb-5"> <div class="col-md-6 gl-mb-5">
<gl-card data-testid="users-over-license"> <gl-card data-testid="users-over-license">
<header> <header>
<h2>{{ usersOverSubscription }}</h2> <h2 data-qa-selector="users_over_subscription">{{ usersOverSubscription }}</h2>
<h5 class="gl-font-weight-normal text-uppercase"> <h5 class="gl-font-weight-normal text-uppercase">
{{ $options.i18n.usersOverSubscriptionTitle }} {{ $options.i18n.usersOverSubscriptionTitle }}
</h5> </h5>
......
...@@ -60,6 +60,7 @@ describe('Subscription Details Table', () => { ...@@ -60,6 +60,7 @@ describe('Subscription Details Table', () => {
beforeEach(() => { beforeEach(() => {
createComponent([ createComponent([
{ {
label: 'label',
value: 'Something to copy', value: 'Something to copy',
canCopy: true, canCopy: true,
}, },
......
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