Commit 51634ee0 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'find-migrate-ee-analytics' into 'master'

Replace deprecated usage of find/findAll in ee/spec/frontend/analytics

See merge request gitlab-org/gitlab!78631
parents ad30c69e dc53131d
......@@ -56,10 +56,10 @@ describe('DevopsAdoptionDeleteModal', () => {
});
};
const findModal = () => wrapper.find(GlModal);
const findModal = () => wrapper.findComponent(GlModal);
const cancelButtonDisabledState = () => findModal().props('actionCancel').attributes[0].disabled;
const actionButtonLoadingState = () => findModal().props('actionPrimary').attributes[0].loading;
const findAlert = () => findModal().find(GlAlert);
const findAlert = () => findModal().findComponent(GlAlert);
afterEach(() => {
wrapper.destroy();
......
......@@ -26,7 +26,7 @@ describe('DevopsAdoptionEmptyState', () => {
});
};
const findEmptyState = () => wrapper.find(GlEmptyState);
const findEmptyState = () => wrapper.findComponent(GlEmptyState);
afterEach(() => {
wrapper.destroy();
......
......@@ -42,15 +42,16 @@ describe('DevopsAdoptionOverviewTable', () => {
const findCol = (testId) => wrapper.findByTestId(testId);
const findColRowChild = (col, row, child) => wrapper.findAllByTestId(col).at(row).find(child);
const findColRowChild = (col, row, child) =>
wrapper.findAllByTestId(col).at(row).findComponent(child);
const findColSubComponent = (colTestId, childComponent) =>
findCol(colTestId).find(childComponent);
findCol(colTestId).findComponent(childComponent);
const findDeleteModal = () => wrapper.findComponent(DevopsAdoptionDeleteModal);
const findSortByLocalStorageSync = () => wrapper.findAll(LocalStorageSync).at(0);
const findSortDescLocalStorageSync = () => wrapper.findAll(LocalStorageSync).at(1);
const findSortByLocalStorageSync = () => wrapper.findAllComponents(LocalStorageSync).at(0);
const findSortDescLocalStorageSync = () => wrapper.findAllComponents(LocalStorageSync).at(1);
describe('table headings', () => {
beforeEach(() => {
......
......@@ -39,20 +39,20 @@ describe('DevopsAdoptionTable', () => {
wrapper.destroy();
});
const findTable = () => wrapper.find(GlTable);
const findTable = () => wrapper.findComponent(GlTable);
const findCol = (testId) => findTable().find(`[data-testid="${testId}"]`);
const findColRowChild = (col, row, child) =>
findTable().findAll(`[data-testid="${col}"]`).at(row).find(child);
findTable().findAll(`[data-testid="${col}"]`).at(row).findComponent(child);
const findColSubComponent = (colTestId, childComponent) =>
findCol(colTestId).find(childComponent);
findCol(colTestId).findComponent(childComponent);
const findSortByLocalStorageSync = () => wrapper.findAll(LocalStorageSync).at(0);
const findSortDescLocalStorageSync = () => wrapper.findAll(LocalStorageSync).at(1);
const findSortByLocalStorageSync = () => wrapper.findAllComponents(LocalStorageSync).at(0);
const findSortDescLocalStorageSync = () => wrapper.findAllComponents(LocalStorageSync).at(1);
const findDeleteModal = () => wrapper.find(DevopsAdoptionDeleteModal);
const findDeleteModal = () => wrapper.findComponent(DevopsAdoptionDeleteModal);
describe('table headings', () => {
let headers;
......@@ -83,12 +83,12 @@ describe('DevopsAdoptionTable', () => {
const expected = Boolean(tooltipText);
it(`${expected ? 'displays' : "doesn't display"} an information icon`, () => {
expect(headerWrapper.find(GlIcon).exists()).toBe(expected);
expect(headerWrapper.findComponent(GlIcon).exists()).toBe(expected);
});
if (expected) {
it('includes a tooltip', () => {
const icon = headerWrapper.find(GlIcon);
const icon = headerWrapper.findComponent(GlIcon);
const tooltip = getBinding(icon.element, 'gl-tooltip');
expect(tooltip).toBeDefined();
......
......@@ -27,7 +27,7 @@ describe('Release stats card', () => {
wrapper = null;
});
const findLoadingIndicators = () => wrapper.findAll(GlSkeletonLoader);
const findLoadingIndicators = () => wrapper.findAllComponents(GlSkeletonLoader);
const findStats = () => wrapper.find('[data-testid="stats-container"]');
const expectLoadingIndicators = () => {
......
......@@ -53,7 +53,7 @@ describe('Shared runner usage tab', () => {
wrapper.destroy();
});
const findAreaChart = () => wrapper.find(GlAreaChart);
const findAreaChart = () => wrapper.findComponent(GlAreaChart);
describe('when the data has successfully loaded', () => {
beforeEach(() => {
......
......@@ -34,28 +34,28 @@ describe('MergeRequestAnalyticsApp', () => {
});
it('displays the filter bar component', () => {
expect(wrapper.find(FilterBar).exists()).toBe(true);
expect(wrapper.findComponent(FilterBar).exists()).toBe(true);
});
it('displays the date range component', () => {
expect(wrapper.find(DateRange).exists()).toBe(true);
expect(wrapper.findComponent(DateRange).exists()).toBe(true);
});
it('displays the throughput chart component', () => {
expect(wrapper.find(ThroughputChart).exists()).toBe(true);
expect(wrapper.findComponent(ThroughputChart).exists()).toBe(true);
});
it('displays the throughput table component', () => {
expect(wrapper.find(ThroughputTable).exists()).toBe(true);
expect(wrapper.findComponent(ThroughputTable).exists()).toBe(true);
});
describe('url sync', () => {
it('includes the url sync component', () => {
expect(wrapper.find(UrlSync).exists()).toBe(true);
expect(wrapper.findComponent(UrlSync).exists()).toBe(true);
});
it('has the start and end date params', () => {
const urlSync = wrapper.find(UrlSync);
const urlSync = wrapper.findComponent(UrlSync);
expect(urlSync.props('query')).toMatchObject({
start_date: '2020-05-01',
......
......@@ -123,7 +123,7 @@ describe('Filter bar', () => {
mock.restore();
});
const findFilteredSearch = () => wrapper.find(FilteredSearchBar);
const findFilteredSearch = () => wrapper.findComponent(FilteredSearchBar);
const getSearchToken = (type) =>
findFilteredSearch()
.props('tokens')
......
......@@ -37,7 +37,7 @@ describe('ThroughputChart', () => {
let wrapper;
function displaysComponent(component, visible) {
const element = wrapper.find(component);
const element = wrapper.findComponent(component);
expect(element.exists()).toBe(visible);
}
......@@ -68,7 +68,7 @@ describe('ThroughputChart', () => {
});
it('displays the throughput stats component', () => {
expect(wrapper.find(ThroughputStats).exists()).toBe(true);
expect(wrapper.findComponent(ThroughputStats).exists()).toBe(true);
});
it('displays the chart title', () => {
......@@ -84,7 +84,7 @@ describe('ThroughputChart', () => {
});
it('displays an empty state message when there is no data', () => {
const alert = wrapper.find(GlAlert);
const alert = wrapper.findComponent(GlAlert);
expect(alert.exists()).toBe(true);
expect(alert.text()).toBe(THROUGHPUT_CHART_STRINGS.NO_DATA);
......@@ -163,7 +163,7 @@ describe('ThroughputChart', () => {
});
it('displays an empty state message when there is no data', () => {
const alert = wrapper.find(GlAlert);
const alert = wrapper.findComponent(GlAlert);
expect(alert.exists()).toBe(true);
expect(alert.text()).toBe(THROUGHPUT_CHART_STRINGS.NO_DATA);
......@@ -187,7 +187,7 @@ describe('ThroughputChart', () => {
});
it('displays an error message', () => {
const alert = wrapper.find(GlAlert);
const alert = wrapper.findComponent(GlAlert);
expect(alert.exists()).toBe(true);
expect(alert.text()).toBe(THROUGHPUT_CHART_STRINGS.ERROR_FETCHING_DATA);
......
......@@ -60,7 +60,7 @@ describe('ThroughputTable', () => {
}
const displaysComponent = (component, visible) => {
expect(wrapper.find(component).exists()).toBe(visible);
expect(wrapper.findComponent(component).exists()).toBe(visible);
};
const additionalData = (data) => {
......@@ -74,7 +74,7 @@ describe('ThroughputTable', () => {
});
};
const findTable = () => wrapper.find(GlTableLite);
const findTable = () => wrapper.findComponent(GlTableLite);
const findCol = (testId) => findTable().find(`[data-testid="${testId}"]`);
......@@ -82,9 +82,9 @@ describe('ThroughputTable', () => {
findCol(colTestId).find(`[data-testid="${childTetestId}"]`);
const findColSubComponent = (colTestId, childComponent) =>
findCol(colTestId).find(childComponent);
findCol(colTestId).findComponent(childComponent);
const findPagination = () => wrapper.find(GlPagination);
const findPagination = () => wrapper.findComponent(GlPagination);
const findPrevious = () => findPagination().findAll('.page-item').at(0);
......@@ -101,7 +101,7 @@ describe('ThroughputTable', () => {
});
it('displays an empty state message when there is no data', () => {
const alert = wrapper.find(GlAlert);
const alert = wrapper.findComponent(GlAlert);
expect(alert.exists()).toBe(true);
expect(alert.text()).toBe(THROUGHPUT_TABLE_STRINGS.NO_DATA);
......@@ -195,7 +195,7 @@ describe('ThroughputTable', () => {
it('includes an inactive label icon by default', () => {
const labels = findColSubItem(TEST_IDS.MERGE_REQUEST_DETAILS, TEST_IDS.LABEL_DETAILS);
const icon = labels.find(GlIcon);
const icon = labels.findComponent(GlIcon);
expect(labels.text()).toBe('0');
expect(labels.classes()).toContain('gl-opacity-5');
......@@ -208,7 +208,7 @@ describe('ThroughputTable', () => {
TEST_IDS.MERGE_REQUEST_DETAILS,
TEST_IDS.COMMENT_COUNT,
);
const icon = commentCount.find(GlIcon);
const icon = commentCount.findComponent(GlIcon);
expect(commentCount.text()).toBe('0');
expect(commentCount.classes()).toContain('gl-opacity-5');
......@@ -229,7 +229,7 @@ describe('ThroughputTable', () => {
TEST_IDS.MERGE_REQUEST_DETAILS,
TEST_IDS.LABEL_DETAILS,
);
const icon = labelDetails.find(GlIcon);
const icon = labelDetails.findComponent(GlIcon);
expect(labelDetails.text()).toBe('1');
expect(labelDetails.classes()).not.toContain('gl-opacity-5');
......@@ -248,7 +248,7 @@ describe('ThroughputTable', () => {
TEST_IDS.MERGE_REQUEST_DETAILS,
TEST_IDS.COMMENT_COUNT,
);
const icon = commentCount.find(GlIcon);
const icon = commentCount.findComponent(GlIcon);
expect(commentCount.text()).toBe('2');
expect(commentCount.classes()).not.toContain('gl-opacity-5');
......@@ -273,7 +273,7 @@ describe('ThroughputTable', () => {
const icon = findColSubComponent(TEST_IDS.MERGE_REQUEST_DETAILS, GlIcon);
expect(icon.find(GlIcon).exists()).toBe(true);
expect(icon.findComponent(GlIcon).exists()).toBe(true);
expect(icon.props('name')).toBe(iconName);
});
......@@ -300,7 +300,7 @@ describe('ThroughputTable', () => {
await wrapper.vm.$nextTick();
const approved = findColSubItem(TEST_IDS.MERGE_REQUEST_DETAILS, TEST_IDS.APPROVED);
const icon = approved.find(GlIcon);
const icon = approved.findComponent(GlIcon);
expect(approved.text()).toBe('1 Approval');
expect(icon.exists()).toBe(true);
......@@ -324,7 +324,7 @@ describe('ThroughputTable', () => {
await wrapper.vm.$nextTick();
const approved = findColSubItem(TEST_IDS.MERGE_REQUEST_DETAILS, TEST_IDS.APPROVED);
const icon = approved.find(GlIcon);
const icon = approved.findComponent(GlIcon);
expect(approved.text()).toBe('2 Approvals');
expect(icon.exists()).toBe(true);
......@@ -455,7 +455,7 @@ describe('ThroughputTable', () => {
});
it('displays an error message', () => {
const alert = wrapper.find(GlAlert);
const alert = wrapper.findComponent(GlAlert);
expect(alert.exists()).toBe(true);
expect(alert.text()).toBe(THROUGHPUT_TABLE_STRINGS.ERROR_FETCHING_DATA);
......
......@@ -97,23 +97,23 @@ describe('ProductivityApp component', () => {
mock.restore();
});
const findMainMetricChart = () => wrapper.find({ ref: 'mainChart' });
const findClearFilterButton = () => wrapper.find({ ref: 'clearChartFiltersBtn' });
const findSecondaryChartsSection = () => wrapper.find({ ref: 'secondaryCharts' });
const findTimeBasedMetricChart = () => wrapper.find({ ref: 'timeBasedChart' });
const findCommitBasedMetricChart = () => wrapper.find({ ref: 'commitBasedChart' });
const findScatterplotMetricChart = () => wrapper.find({ ref: 'scatterplot' });
const findMainMetricChart = () => wrapper.findComponent({ ref: 'mainChart' });
const findClearFilterButton = () => wrapper.findComponent({ ref: 'clearChartFiltersBtn' });
const findSecondaryChartsSection = () => wrapper.findComponent({ ref: 'secondaryCharts' });
const findTimeBasedMetricChart = () => wrapper.findComponent({ ref: 'timeBasedChart' });
const findCommitBasedMetricChart = () => wrapper.findComponent({ ref: 'commitBasedChart' });
const findScatterplotMetricChart = () => wrapper.findComponent({ ref: 'scatterplot' });
const findMrTableSortSection = () => wrapper.find('.js-mr-table-sort');
const findSortFieldDropdown = () => findMrTableSortSection().find(GlDropdown);
const findSortOrderToggle = () => findMrTableSortSection().find(GlButton);
const findSortFieldDropdown = () => findMrTableSortSection().findComponent(GlDropdown);
const findSortOrderToggle = () => findMrTableSortSection().findComponent(GlButton);
const findMrTableSection = () => wrapper.find('.js-mr-table');
const findMrTable = () => findMrTableSection().find(MergeRequestTable);
const findMrTable = () => findMrTableSection().findComponent(MergeRequestTable);
describe('template', () => {
describe('without a group being selected', () => {
it('renders the empty state illustration', () => {
createComponent();
const emptyState = wrapper.find(GlEmptyState);
const emptyState = wrapper.findComponent(GlEmptyState);
expect(emptyState.exists()).toBe(true);
expect(emptyState.props('svgPath')).toBe(propsData.emptyStateSvgPath);
......@@ -145,7 +145,7 @@ describe('ProductivityApp component', () => {
});
it('renders the no access illustration', () => {
const emptyState = wrapper.find(GlEmptyState);
const emptyState = wrapper.findComponent(GlEmptyState);
expect(emptyState.exists()).toBe(true);
expect(emptyState.props('svgPath')).toBe(propsData.noAccessSvgPath);
......@@ -214,7 +214,9 @@ describe('ProductivityApp component', () => {
},
};
findMainMetricChart().find(GlColumnChart).vm.$emit('chartItemClicked', data);
findMainMetricChart()
.findComponent(GlColumnChart)
.vm.$emit('chartItemClicked', data);
});
it('dispatches updateSelectedItems action', () => {
......@@ -317,7 +319,7 @@ describe('ProductivityApp component', () => {
});
it("should update the chart's x axis label", () => {
const columnChart = findCommitBasedMetricChart().find(GlColumnChart);
const columnChart = findCommitBasedMetricChart().findComponent(GlColumnChart);
expect(columnChart.props('xAxisTitle')).toBe('Number of LOCs per commit');
});
});
......@@ -369,7 +371,7 @@ describe('ProductivityApp component', () => {
});
it("should update the chart's y axis label", () => {
const scatterplot = findScatterplotMetricChart().find(Scatterplot);
const scatterplot = findScatterplotMetricChart().findComponent(Scatterplot);
expect(scatterplot.props('yAxisTitle')).toBe('Number of LOCs per commit');
});
});
......@@ -384,7 +386,7 @@ describe('ProductivityApp component', () => {
});
it('renders a loading indicator', () => {
expect(findMrTableSection().find(GlLoadingIcon).exists()).toBe(true);
expect(findMrTableSection().findComponent(GlLoadingIcon).exists()).toBe(true);
});
});
......@@ -402,7 +404,7 @@ describe('ProductivityApp component', () => {
});
it('doesn’t render a "no data" message', () => {
expect(findMrTableSection().find(GlAlert).exists()).toBe(false);
expect(findMrTableSection().findComponent(GlAlert).exists()).toBe(false);
});
it('should change the column metric', async () => {
......@@ -425,7 +427,10 @@ describe('ProductivityApp component', () => {
});
it('should change the sort field', () => {
findSortFieldDropdown().findAll(GlDropdownItem).at(0).vm.$emit('click');
findSortFieldDropdown()
.findAllComponents(GlDropdownItem)
.at(0)
.vm.$emit('click');
expect(tableActionSpies.setSortField).toHaveBeenCalled();
});
......@@ -446,7 +451,7 @@ describe('ProductivityApp component', () => {
});
it('renders a "no data" message', () => {
expect(findMrTableSection().find(GlAlert).exists()).toBe(true);
expect(findMrTableSection().findComponent(GlAlert).exists()).toBe(true);
});
it('doesn`t render the MR table', () => {
......
......@@ -55,7 +55,7 @@ describe('FilterDropdowns component', () => {
describe('template', () => {
it('renders the groups dropdown', () => {
expect(wrapper.find(GroupsDropdownFilter).exists()).toBe(true);
expect(wrapper.findComponent(GroupsDropdownFilter).exists()).toBe(true);
});
describe('without a group selected', () => {
......@@ -64,7 +64,7 @@ describe('FilterDropdowns component', () => {
});
it('does not render the projects dropdown', () => {
expect(wrapper.find(ProjectsDropdownFilter).exists()).toBe(false);
expect(wrapper.findComponent(ProjectsDropdownFilter).exists()).toBe(false);
});
});
......@@ -75,7 +75,7 @@ describe('FilterDropdowns component', () => {
});
it('renders the projects dropdown', () => {
expect(wrapper.find(ProjectsDropdownFilter).exists()).toBe(true);
expect(wrapper.findComponent(ProjectsDropdownFilter).exists()).toBe(true);
});
});
});
......
......@@ -36,11 +36,11 @@ describe('MetricChart component', () => {
wrapper.destroy();
});
const findLoadingIndicator = () => wrapper.find(GlLoadingIcon);
const findInfoMessage = () => wrapper.find(GlAlert);
const findMetricDropdown = () => wrapper.find(GlDropdown);
const findMetricDropdownItems = () => findMetricDropdown().findAll(GlDropdownItem);
const findChartSlot = () => wrapper.find({ ref: 'chart' });
const findLoadingIndicator = () => wrapper.findComponent(GlLoadingIcon);
const findInfoMessage = () => wrapper.findComponent(GlAlert);
const findMetricDropdown = () => wrapper.findComponent(GlDropdown);
const findMetricDropdownItems = () => findMetricDropdown().findAllComponents(GlDropdownItem);
const findChartSlot = () => wrapper.findComponent({ ref: 'chart' });
describe('template', () => {
describe('when title exists', () => {
......@@ -149,7 +149,9 @@ describe('MetricChart component', () => {
wrapper.setProps({ selectedMetric: 'time_to_last_commit' });
return wrapper.vm.$nextTick().then(() => {
expect(findMetricDropdownItems().at(0).find(GlIcon).classes()).toContain('invisible');
expect(findMetricDropdownItems().at(0).findComponent(GlIcon).classes()).toContain(
'invisible',
);
});
});
});
......
......@@ -21,7 +21,7 @@ describe('MergeRequestTableRow component', () => {
const findMrDetails = () => wrapper.find('.js-mr-details');
const findMrMetrics = () => wrapper.find('.js-mr-metrics');
const findMetricColumns = () => findMrMetrics().findAll(MetricColumn);
const findMetricColumns = () => findMrMetrics().findAllComponents(MetricColumn);
afterEach(() => {
wrapper.destroy();
......@@ -43,7 +43,7 @@ describe('MergeRequestTableRow component', () => {
});
it('renders the avatar with correct URL', () => {
const avatar = wrapper.find(GlAvatar);
const avatar = wrapper.findComponent(GlAvatar);
expect(avatar.exists()).toBe(true);
expect(avatar.props('src')).toEqual(defaultProps.mergeRequest.author_avatar_url);
......@@ -72,7 +72,7 @@ describe('MergeRequestTableRow component', () => {
},
};
factory(props);
expect(wrapper.find({ ref: selector }).exists()).toBe(false);
expect(wrapper.findComponent({ ref: selector }).exists()).toBe(false);
});
});
......
......@@ -25,10 +25,10 @@ describe('MergeRequestTable component', () => {
});
};
const findMergeRequestTableRows = () => wrapper.findAll(MergeRequestTableRow);
const findMergeRequestTableRows = () => wrapper.findAllComponents(MergeRequestTableRow);
const findTableHeader = () => wrapper.find('.table-row-header');
const findDropdown = () => wrapper.find(GlDropdown);
const findDropdownItems = () => wrapper.findAll(GlDropdownItem);
const findDropdown = () => wrapper.findComponent(GlDropdown);
const findDropdownItems = () => wrapper.findAllComponents(GlDropdownItem);
const findFirstDropdownItem = () => findDropdownItems().at(0);
beforeEach(() => {
......
......@@ -17,7 +17,7 @@ describe('Download test coverage component', () => {
wrapper
.find('[data-testid="group-code-coverage-select-all-projects-button"]')
.vm.$emit('click');
const findAlert = () => wrapper.find(GlAlert);
const findAlert = () => wrapper.findComponent(GlAlert);
const injectedProperties = {
groupAnalyticsCoverageReportsPath: '/coverage.csv',
......
......@@ -31,7 +31,7 @@ describe('Group repository analytics app', () => {
});
it('renders the download test coverage component', () => {
expect(wrapper.find(DownloadTestCoverage).exists()).toBe(true);
expect(wrapper.findComponent(DownloadTestCoverage).exists()).toBe(true);
});
});
......
......@@ -15,8 +15,8 @@ describe('Select projects dropdown component', () => {
const findProjectById = (id) => wrapper.find(`[data-testid="select-project-${id}"]`);
const selectAllProjects = () => findSelectAllProjects().trigger('click');
const selectProjectById = (id) => findProjectById(id).trigger('click');
const findIntersectionObserver = () => wrapper.find(GlIntersectionObserver);
const findLoadingIcon = () => wrapper.find(GlLoadingIcon);
const findIntersectionObserver = () => wrapper.findComponent(GlIntersectionObserver);
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const createComponent = ({ data = {}, apolloGroupProjects = {} } = {}) => {
wrapper = shallowMount(SelectProjectsDropdown, {
......@@ -66,9 +66,9 @@ describe('Select projects dropdown component', () => {
selectAllProjects();
return wrapper.vm.$nextTick().then(() => {
expect(findProjectById(initialData.groupProjects[0].id).find(GlIcon).classes()).toContain(
'gl-visibility-hidden',
);
expect(
findProjectById(initialData.groupProjects[0].id).findComponent(GlIcon).classes(),
).toContain('gl-visibility-hidden');
});
});
......@@ -99,7 +99,7 @@ describe('Select projects dropdown component', () => {
selectProjectById(project.id);
return wrapper.vm.$nextTick().then(() => {
expect(findProjectById(project.id).find(GlIcon).classes()).not.toContain(
expect(findProjectById(project.id).findComponent(GlIcon).classes()).not.toContain(
'gl-visibility-hidden',
);
});
......@@ -109,7 +109,9 @@ describe('Select projects dropdown component', () => {
selectProjectById(initialData.groupProjects[0].id);
return wrapper.vm.$nextTick().then(() => {
expect(findSelectAllProjects().find(GlIcon).classes()).toContain('gl-visibility-hidden');
expect(findSelectAllProjects().findComponent(GlIcon).classes()).toContain(
'gl-visibility-hidden',
);
});
});
......
......@@ -14,7 +14,7 @@ describe('Test coverage table component', () => {
const findGroupCoverageChart = () => wrapper.findByTestId('group-coverage-chart');
const findChartLoadingState = () => wrapper.findByTestId('group-coverage-chart-loading');
const findChartEmptyState = () => wrapper.findByTestId('group-coverage-chart-empty');
const findLoadingState = () => wrapper.find(GlSkeletonLoading);
const findLoadingState = () => wrapper.findComponent(GlSkeletonLoading);
const createComponent = ({ data = {} } = {}) => {
wrapper = extendedWrapper(
......
......@@ -42,11 +42,11 @@ describe('GroupsDropdownFilter component', () => {
Api.groups.mockImplementation(() => Promise.resolve(groups));
});
const findDropdown = () => wrapper.find(GlDropdown);
const findDropdown = () => wrapper.findComponent(GlDropdown);
const findDropdownItems = () =>
findDropdown()
.findAll(GlDropdownItem)
.findAllComponents(GlDropdownItem)
.filter((w) => w.text() !== 'No matching results');
const findDropdownAtIndex = (index) => findDropdownItems().at(index);
......
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