Commit 8a8e6c9a authored by Illya Klymov's avatar Illya Klymov

Replace isEmpty() check with other expectations

parent e8c7d7ed
......@@ -110,8 +110,8 @@ describe('ImportProjectsTable', () => {
wrapper
.findAll('th')
.filter(w => w.text() === `From ${providerTitle}`)
.isEmpty(),
).toBe(false);
.exists(),
).toBe(true);
expect(wrapper.contains(ProviderRepoTableRow)).toBe(true);
expect(wrapper.contains(ImportedProjectTableRow)).toBe(true);
......
......@@ -41,7 +41,7 @@ describe('Issuable suggestions app component', () => {
wrapper.setData(data);
return wrapper.vm.$nextTick(() => {
expect(wrapper.isEmpty()).toBe(false);
expect(wrapper.findAll('li').length).toBe(data.issues.length);
});
});
......
......@@ -122,7 +122,6 @@ describe('EnvironmentLogs', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findEnvironmentsDropdown().is(GlDeprecatedDropdown)).toBe(true);
expect(findSimpleFilters().exists()).toBe(true);
......
......@@ -69,7 +69,6 @@ describe('LogAdvancedFilters', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findFilteredSearch().exists()).toBe(true);
expect(findTimeRangePicker().exists()).toBe(true);
......
......@@ -29,7 +29,6 @@ describe('LogControlButtons', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findScrollToTop().is(GlButton)).toBe(true);
expect(findScrollToBottom().is(GlButton)).toBe(true);
......
......@@ -60,7 +60,6 @@ describe('LogSimpleFilters', () => {
initWrapper();
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findPodsDropdown().exists()).toBe(true);
});
......
......@@ -668,7 +668,11 @@ describe('Dashboard', () => {
});
it('shows a remove button, which removes a panel', () => {
expect(findFirstDraggableRemoveButton().isEmpty()).toBe(false);
expect(
findFirstDraggableRemoveButton()
.find('a')
.exists(),
).toBe(true);
expect(findDraggablePanels().length).toEqual(metricsDashboardPanelCount);
findFirstDraggableRemoveButton().trigger('click');
......
......@@ -48,7 +48,6 @@ describe('Pipelines filtered search', () => {
it('displays UI elements', () => {
expect(wrapper.isVueInstance()).toBe(true);
expect(wrapper.isEmpty()).toBe(false);
expect(findFilteredSearch().exists()).toBe(true);
});
......
......@@ -50,7 +50,7 @@ describe('Pagination component', () => {
change: spy,
});
expect(wrapper.isEmpty()).toBe(false);
expect(wrapper.find(GlPagination).exists()).toBe(true);
});
it('renders if there is a prev page', () => {
......@@ -66,7 +66,7 @@ describe('Pagination component', () => {
change: spy,
});
expect(wrapper.isEmpty()).toBe(false);
expect(wrapper.find(GlPagination).exists()).toBe(true);
});
});
......
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