Commit fb2640d3 authored by Bryce Johnson's avatar Bryce Johnson

Add specs for tooltips in linked pipeline.

parent 71400fce
......@@ -68,4 +68,15 @@ describe('Linked pipeline', () => {
const pipelineIdElement = this.linkedPipeline.$el.querySelector('.linked-pipeline-id');
expect(pipelineIdElement.innerText).toContain(`#${this.propsData.pipelineId}`);
});
it('should correctly compute the tooltip text', () => {
expect(this.linkedPipeline.tooltipText).toContain(mockPipeline.projectName);
expect(this.linkedPipeline.tooltipText).toContain(mockPipeline.pipelineState.label);
});
it('should set the tooltip text as the title attribute', () => {
const titleAttr = this.linkedPipeline.$el.querySelector('.linked-pipeline-content').getAttribute('title');
expect(titleAttr).toContain(mockPipeline.projectName);
expect(titleAttr).toContain(mockPipeline.pipelineState.label);
});
});
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