summaryrefslogtreecommitdiff
path: root/spec/frontend/reports/components/summary_row_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/reports/components/summary_row_spec.js')
-rw-r--r--spec/frontend/reports/components/summary_row_spec.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/spec/frontend/reports/components/summary_row_spec.js b/spec/frontend/reports/components/summary_row_spec.js
index bdd6de1e0be..04d9d10dcd2 100644
--- a/spec/frontend/reports/components/summary_row_spec.js
+++ b/spec/frontend/reports/components/summary_row_spec.js
@@ -1,4 +1,5 @@
import { mount } from '@vue/test-utils';
+import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import SummaryRow from '~/reports/components/summary_row.vue';
describe('Summary row', () => {
@@ -14,16 +15,19 @@ describe('Summary row', () => {
};
const createComponent = ({ propsData = {}, slots = {} } = {}) => {
- wrapper = mount(SummaryRow, {
- propsData: {
- ...props,
- ...propsData,
- },
- slots,
- });
+ wrapper = extendedWrapper(
+ mount(SummaryRow, {
+ propsData: {
+ ...props,
+ ...propsData,
+ },
+ slots,
+ }),
+ );
};
- const findSummary = () => wrapper.find('.report-block-list-issue-description-text');
+ const findSummary = () => wrapper.findByTestId('summary-row-description');
+ const findStatusIcon = () => wrapper.findByTestId('summary-row-icon');
afterEach(() => {
wrapper.destroy();
@@ -37,9 +41,7 @@ describe('Summary row', () => {
it('renders provided icon', () => {
createComponent();
- expect(wrapper.find('.report-block-list-icon span').classes()).toContain(
- 'js-ci-status-icon-warning',
- );
+ expect(findStatusIcon().classes()).toContain('js-ci-status-icon-warning');
});
describe('summary slot', () => {