Commit 74a00ae1 authored by Illya Klymov's avatar Illya Klymov

Replace invoking `is` with string

`is` is deprecated in `@vue/test-utils` 1.x
parent 5dc5bd3b
...@@ -20,7 +20,7 @@ describe('MrWidgetIcon', () => { ...@@ -20,7 +20,7 @@ describe('MrWidgetIcon', () => {
}); });
it('renders icon and container', () => { it('renders icon and container', () => {
expect(wrapper.is('.circle-icon-container')).toBe(true); expect(wrapper.element.className).toContain('circle-icon-container');
expect(wrapper.find(GlIcon).props('name')).toEqual(TEST_ICON); expect(wrapper.find(GlIcon).props('name')).toEqual(TEST_ICON);
}); });
}); });
import { shallowMount } from '@vue/test-utils'; import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlButton } from '@gitlab/ui'; import { GlDropdown, GlDropdownDivider, GlButton } from '@gitlab/ui';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive'; import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import ActionsButton from '~/vue_shared/components/actions_button.vue'; import ActionsButton from '~/vue_shared/components/actions_button.vue';
...@@ -53,7 +53,7 @@ describe('Actions button component', () => { ...@@ -53,7 +53,7 @@ describe('Actions button component', () => {
findDropdown() findDropdown()
.findAll('gl-dropdown-item-stub,gl-dropdown-divider-stub') .findAll('gl-dropdown-item-stub,gl-dropdown-divider-stub')
.wrappers.map((x) => { .wrappers.map((x) => {
if (x.is('gl-dropdown-divider-stub')) { if (x.is(GlDropdownDivider)) {
return { type: 'divider' }; return { type: 'divider' };
} }
......
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