Commit 71919170 authored by Fernando's avatar Fernando

Clean up hard coded strings

* Use variables in test assertions
parent ce04a2bb
......@@ -196,6 +196,10 @@ describe('Project Licenses', () => {
});
describe('when the tabs are rendered', () => {
const pageInfo = {
total: 1,
};
beforeEach(() => {
createComponent({
state: {
......@@ -213,9 +217,7 @@ describe('Project Licenses', () => {
generatedAt: '',
status: REPORT_STATUS.ok,
},
pageInfo: {
total: 1,
},
pageInfo,
},
options: {
provide: {
......@@ -232,7 +234,7 @@ describe('Project Licenses', () => {
.findAll(GlBadge)
.at(0)
.text(),
).toBe('1');
).toBe(pageInfo.total.toString());
});
it('it renders the correct count in "Policies" tab', () => {
......@@ -241,7 +243,7 @@ describe('Project Licenses', () => {
.findAll(GlBadge)
.at(1)
.text(),
).toBe('2');
).toBe(managedLicenses.length.toString());
});
});
......
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