Commit 759d4d37 authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch 'nicolasdular/use-data-testid-for-usage-quota' into 'master'

Use data attribute for storage counter spec

Closes #217959

See merge request gitlab-org/gitlab!33161
parents 9707d257 2b282c6d
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
<div class="row py-0"> <div class="row py-0">
<div class="col-sm-12"> <div class="col-sm-12">
<strong>{{ s__('UsageQuota|Storage usage:') }}</strong> <strong>{{ s__('UsageQuota|Storage usage:') }}</strong>
<span class="js-total-usage"> <span data-testid="total-usage">
{{ namespace.totalUsage }} {{ namespace.totalUsage }}
<gl-link <gl-link
:href="helpPagePath" :href="helpPagePath"
......
...@@ -52,7 +52,7 @@ describe('Storage counter app', () => { ...@@ -52,7 +52,7 @@ describe('Storage counter app', () => {
wrapper.vm wrapper.vm
.$nextTick() .$nextTick()
.then(() => { .then(() => {
expect(wrapper.find('.js-total-usage').text()).toContain( expect(wrapper.find("[data-testid='total-usage']").text()).toContain(
withRootStorageStatistics.totalUsage, withRootStorageStatistics.totalUsage,
); );
}) })
...@@ -70,7 +70,7 @@ describe('Storage counter app', () => { ...@@ -70,7 +70,7 @@ describe('Storage counter app', () => {
wrapper.vm wrapper.vm
.$nextTick() .$nextTick()
.then(() => { .then(() => {
expect(wrapper.find('.js-total-usage').text()).toContain('N/A'); expect(wrapper.find("[data-testid='total-usage']").text()).toContain('N/A');
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
......
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