Commit 2b19ce62 authored by Bryce Johnson's avatar Bryce Johnson

Add specs for coercing triggeredBy into a collection.

parent 608e5aca
......@@ -83,6 +83,10 @@ describe('graph component', function () {
});
describe('linked pipelines components', function () {
it('should coerce triggeredBy into a collection', function () {
expect(this.component.triggeredBy.length).toBe(1);
});
it('should render an upstream pipelines column', function () {
expect(this.component.$el.querySelector('.linked-pipelines-column')).not.toBeNull();
expect(this.component.$el.innerHTML).toContain('Upstream');
......
......@@ -130,6 +130,14 @@ describe('MRWidgetPipeline', () => {
});
});
it('should set triggered to an empty array', () => {
expect(vm.triggered.length).toBe(0);
});
it('should set triggeredBy to an empty array', () => {
expect(vm.triggered.length).toBe(0);
});
it('should not render upstream or downstream pipelines', () => {
expect(el.querySelector('.linked-pipeline-mini-list')).toBeNull();
});
......@@ -149,6 +157,10 @@ describe('MRWidgetPipeline', () => {
}).$mount();
});
it('should coerce triggeredBy into a collection', function() {
expect(this.vm.triggeredBy.length).toBe(1);
});
it('should render the linked pipelines mini list', function (done) {
Vue.nextTick(() => {
expect(this.vm.$el.querySelector('.linked-pipeline-mini-list.is-upstream')).not.toBeNull();
......
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