Commit 66550172 authored by Illya Klymov's avatar Illya Klymov

Replace isEmpty() assertion with html()

@vue/test-utils deprecates isEmpty()
We replace it with .html()
parent e8c7d7ed
...@@ -62,7 +62,7 @@ describe('EE Approvlas MRRulesHiddenInputs', () => { ...@@ -62,7 +62,7 @@ describe('EE Approvlas MRRulesHiddenInputs', () => {
it('is empty', () => { it('is empty', () => {
factory(); factory();
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
......
...@@ -188,7 +188,7 @@ describe('EE - DastProfilesList', () => { ...@@ -188,7 +188,7 @@ describe('EE - DastProfilesList', () => {
getDeleteButtonWithin(getTableRowForProfile(profile)); getDeleteButtonWithin(getTableRowForProfile(profile));
it('opens a modal with the correct title when a delete button is clicked', async () => { it('opens a modal with the correct title when a delete button is clicked', async () => {
expect(getModal().isEmpty()).toBe(true); expect(getModal().html()).toBe('');
getCurrentProfileDeleteButton().trigger('click'); getCurrentProfileDeleteButton().trigger('click');
......
...@@ -48,7 +48,7 @@ describe('BlockingMergeRequestsReport', () => { ...@@ -48,7 +48,7 @@ describe('BlockingMergeRequestsReport', () => {
props.mr.blockingMergeRequests.visible_merge_requests = {}; props.mr.blockingMergeRequests.visible_merge_requests = {};
createComponent(props); createComponent(props);
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
it('passes merged MRs as resolved issues and anything else as unresolved ', () => { it('passes merged MRs as resolved issues and anything else as unresolved ', () => {
......
...@@ -60,7 +60,7 @@ describe('Severity Badge', () => { ...@@ -60,7 +60,7 @@ describe('Severity Badge', () => {
}); });
it(`renders an empty component`, () => { it(`renders an empty component`, () => {
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
}); });
...@@ -28,7 +28,7 @@ describe('ClustersAncestorNotice', () => { ...@@ -28,7 +28,7 @@ describe('ClustersAncestorNotice', () => {
}); });
it('displays no notice', () => { it('displays no notice', () => {
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
......
...@@ -52,7 +52,7 @@ describe('IDE TerminalSession', () => { ...@@ -52,7 +52,7 @@ describe('IDE TerminalSession', () => {
state.session = null; state.session = null;
factory(); factory();
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
it('shows terminal', () => { it('shows terminal', () => {
......
...@@ -58,7 +58,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => { ...@@ -58,7 +58,7 @@ describe('ide/components/terminal_sync/terminal_sync_status', () => {
it('shows nothing', () => { it('shows nothing', () => {
createComponent(); createComponent();
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
......
...@@ -150,7 +150,7 @@ describe('DiscussionFilter component', () => { ...@@ -150,7 +150,7 @@ describe('DiscussionFilter component', () => {
eventHub.$emit('MergeRequestTabChange', 'commit'); eventHub.$emit('MergeRequestTabChange', 'commit');
wrapper.vm.$nextTick(() => { wrapper.vm.$nextTick(() => {
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
done(); done();
}); });
}); });
......
...@@ -30,7 +30,7 @@ describe('detailedMetric', () => { ...@@ -30,7 +30,7 @@ describe('detailedMetric', () => {
}); });
it('does not render the element', () => { it('does not render the element', () => {
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
......
...@@ -27,7 +27,7 @@ describe('request warning', () => { ...@@ -27,7 +27,7 @@ describe('request warning', () => {
}); });
it('does nothing', () => { it('does nothing', () => {
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
}); });
}); });
...@@ -34,7 +34,7 @@ describe('Pagination component', () => { ...@@ -34,7 +34,7 @@ describe('Pagination component', () => {
change: spy, change: spy,
}); });
expect(wrapper.isEmpty()).toBe(true); expect(wrapper.html()).toBe('');
}); });
it('renders if there is a next page', () => { it('renders if there is a next page', () => {
......
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