Commit c8141f4c authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '276949-fix-cutoff-svg' into 'master'

Pipeline Graph Structural Update: SVG Bugfix

See merge request gitlab-org/gitlab!53067
parents e242480c e77f4dff
......@@ -86,11 +86,11 @@ export default {
reportToSentry(this.$options.name, `error: ${err}, info: ${info}`);
},
mounted() {
this.measurements = this.getMeasurements();
this.getMeasurements();
},
methods: {
getMeasurements() {
return {
this.measurements = {
width: this.$refs[this.containerId].scrollWidth,
height: this.$refs[this.containerId].scrollHeight,
};
......@@ -161,6 +161,7 @@ export default {
:pipeline-id="pipeline.id"
@refreshPipelineGraph="$emit('refreshPipelineGraph')"
@jobHover="setJob"
@updateMeasurements="getMeasurements"
/>
</links-layer>
</div>
......
......@@ -67,6 +67,9 @@ export default {
errorCaptured(err, _vm, info) {
reportToSentry('stage_column_component', `error: ${err}, info: ${info}`);
},
mounted() {
this.$emit('updateMeasurements');
},
methods: {
getGroupId(group) {
return accessValue(GRAPHQL, 'groupId', group);
......
......@@ -68,6 +68,10 @@ describe('stage column component', () => {
it('should render the provided groups', () => {
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', () => {
......
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