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