Commit e77f4dff authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo Committed by Natalia Tepluhina

Pipeline Graph Structural Update: SVG Bugfix

parent c89d94e5
...@@ -86,11 +86,11 @@ export default { ...@@ -86,11 +86,11 @@ export default {
reportToSentry(this.$options.name, `error: ${err}, info: ${info}`); reportToSentry(this.$options.name, `error: ${err}, info: ${info}`);
}, },
mounted() { mounted() {
this.measurements = this.getMeasurements(); this.getMeasurements();
}, },
methods: { methods: {
getMeasurements() { getMeasurements() {
return { this.measurements = {
width: this.$refs[this.containerId].scrollWidth, width: this.$refs[this.containerId].scrollWidth,
height: this.$refs[this.containerId].scrollHeight, height: this.$refs[this.containerId].scrollHeight,
}; };
...@@ -161,6 +161,7 @@ export default { ...@@ -161,6 +161,7 @@ export default {
:pipeline-id="pipeline.id" :pipeline-id="pipeline.id"
@refreshPipelineGraph="$emit('refreshPipelineGraph')" @refreshPipelineGraph="$emit('refreshPipelineGraph')"
@jobHover="setJob" @jobHover="setJob"
@updateMeasurements="getMeasurements"
/> />
</links-layer> </links-layer>
</div> </div>
......
...@@ -67,6 +67,9 @@ export default { ...@@ -67,6 +67,9 @@ export default {
errorCaptured(err, _vm, info) { errorCaptured(err, _vm, info) {
reportToSentry('stage_column_component', `error: ${err}, info: ${info}`); reportToSentry('stage_column_component', `error: ${err}, info: ${info}`);
}, },
mounted() {
this.$emit('updateMeasurements');
},
methods: { methods: {
getGroupId(group) { getGroupId(group) {
return accessValue(GRAPHQL, 'groupId', group); return accessValue(GRAPHQL, 'groupId', group);
......
...@@ -68,6 +68,10 @@ describe('stage column component', () => { ...@@ -68,6 +68,10 @@ describe('stage column component', () => {
it('should render the provided groups', () => { it('should render the provided groups', () => {
expect(findAllStageColumnGroups().length).toBe(mockGroups.length); expect(findAllStageColumnGroups().length).toBe(mockGroups.length);
}); });
it('should emit updateMeasurements event on mount', () => {
expect(wrapper.emitted().updateMeasurements).toHaveLength(1);
});
}); });
describe('when job notifies action is complete', () => { describe('when job notifies action is complete', () => {
......
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