Commit 235b8e04 authored by Paul Slaughter's avatar Paul Slaughter

Use findRows helper in pipelines_table_spec

parent 4100fb9f
...@@ -18,6 +18,7 @@ describe('Pipelines Table', () => { ...@@ -18,6 +18,7 @@ describe('Pipelines Table', () => {
propsData: props, propsData: props,
}); });
}; };
const findRows = () => wrapper.findAll('.commit.gl-responsive-table-row');
preloadFixtures(jsonFixtureName); preloadFixtures(jsonFixtureName);
...@@ -51,7 +52,7 @@ describe('Pipelines Table', () => { ...@@ -51,7 +52,7 @@ describe('Pipelines Table', () => {
describe('without data', () => { describe('without data', () => {
it('should render an empty table', () => { it('should render an empty table', () => {
expect(wrapper.find('.commit.gl-responsive-table-row').exists()).toBe(false); expect(findRows()).toHaveLength(0);
}); });
}); });
...@@ -59,7 +60,7 @@ describe('Pipelines Table', () => { ...@@ -59,7 +60,7 @@ describe('Pipelines Table', () => {
it('should render rows', () => { it('should render rows', () => {
createComponent({ pipelines: [pipeline], autoDevopsHelpPath: 'foo', viewType: 'root' }); createComponent({ pipelines: [pipeline], autoDevopsHelpPath: 'foo', viewType: 'root' });
expect(wrapper.findAll('.commit.gl-responsive-table-row')).toHaveLength(1); expect(findRows()).toHaveLength(1);
}); });
}); });
}); });
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