Commit a289b99c authored by Dhiraj Bodicherla's avatar Dhiraj Bodicherla

Using css vars and updated specs

parent 902eb2e1
.deployment-instance { .deployment-instance {
width: 16px; width: $gl-padding;
height: 16px; height: $gl-padding;
margin: 1px; margin: 1px;
border: 1px solid; border: 1px solid;
border-radius: $border-radius-small; border-radius: $border-radius-small;
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
border: 0; border: 0;
&::after { &::after {
width: 16px !important; width: $gl-padding !important;
height: 16px !important; height: $gl-padding !important;
} }
} }
} }
...@@ -112,6 +112,7 @@ describe('Deploy Board', () => { ...@@ -112,6 +112,7 @@ describe('Deploy Board', () => {
}); });
describe('has legend component', () => { describe('has legend component', () => {
let statuses = [];
beforeEach(done => { beforeEach(done => {
wrapper = createComponent({ wrapper = createComponent({
isLoading: false, isLoading: false,
...@@ -120,6 +121,7 @@ describe('Deploy Board', () => { ...@@ -120,6 +121,7 @@ describe('Deploy Board', () => {
hasLegacyAppLabel: true, hasLegacyAppLabel: true,
deployBoardData: deployBoardMockData, deployBoardData: deployBoardMockData,
}); });
({ statuses } = wrapper.vm);
wrapper.vm.$nextTick(done); wrapper.vm.$nextTick(done);
}); });
...@@ -127,7 +129,16 @@ describe('Deploy Board', () => { ...@@ -127,7 +129,16 @@ describe('Deploy Board', () => {
const deployBoardLegend = wrapper.find('.deploy-board-legend'); const deployBoardLegend = wrapper.find('.deploy-board-legend');
expect(deployBoardLegend).toBeDefined(); expect(deployBoardLegend).toBeDefined();
expect(deployBoardLegend.findAll('a').length).toBe(6); expect(deployBoardLegend.findAll('a').length).toBe(Object.keys(statuses).length);
});
Object.keys(statuses).forEach(item => {
it(`with ${item} text next to deployment instance icon`, () => {
expect(wrapper.find(`.deployment-instance-${item}`)).toBeDefined();
expect(wrapper.find(`.deployment-instance-${item} + .legend-text`).text()).toBe(
statuses[item].text,
);
});
}); });
}); });
}); });
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