Commit b105ad9a authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch 'xanf-vtu-v1-name' into 'master'

Upgrading VTU to v1: Remove deprecated `name` calls usage

See merge request gitlab-org/gitlab!50513
parents 3c36090c 0e3be014
import { GlLink } from '@gitlab/ui';
import { GlIcon, GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import ProjectWithExcessStorage from 'ee/storage_counter/components/project_with_excess_storage.vue';
import { formatUsageSize } from 'ee/storage_counter/utils';
......@@ -22,7 +22,8 @@ const createComponent = (propsData = {}) => {
};
const findTableRow = () => wrapper.find('[data-testid="projectTableRow"]');
const findWarningIcon = () => wrapper.find({ name: 'status_warning' });
const findWarningIcon = () =>
wrapper.findAll(GlIcon).wrappers.find((w) => w.props('name') === 'status_warning');
const findProjectLink = () => wrapper.find(GlLink);
const getWarningIconTooltipText = () => getBinding(findWarningIcon().element, 'gl-tooltip').value;
......@@ -49,7 +50,7 @@ describe('Storage Counter project component', () => {
});
it('does not render the warning icon if project is not in error state', () => {
expect(findWarningIcon().exists()).toBe(false);
expect(findWarningIcon()).toBe(undefined);
});
it('render row without error state background', () => {
......
......@@ -124,10 +124,9 @@ describe('DiscussionNotes', () => {
describe('with groupped notes and replies expanded', () => {
const findNoteAtIndex = (index) => {
const noteComponents = [NoteableNote, SystemNote, PlaceholderNote, PlaceholderSystemNote];
const allowedNames = noteComponents.map((c) => c.name);
return wrapper
.findAll('.notes *')
.filter((w) => allowedNames.includes(w.name()))
.filter((w) => noteComponents.some((Component) => w.is(Component)))
.at(index);
};
......
......@@ -137,7 +137,7 @@ describe('note_app', () => {
});
it('should render form', () => {
expect(wrapper.find('.js-main-target-form').name()).toEqual('form');
expect(wrapper.find('.js-main-target-form').element.tagName).toBe('FORM');
expect(wrapper.find('.js-main-target-form textarea').attributes('placeholder')).toEqual(
'Write a comment or drag your files here…',
);
......@@ -202,7 +202,7 @@ describe('note_app', () => {
});
it('should render form', () => {
expect(wrapper.find('.js-main-target-form').name()).toEqual('form');
expect(wrapper.find('.js-main-target-form').element.tagName).toBe('FORM');
expect(wrapper.find('.js-main-target-form textarea').attributes('placeholder')).toEqual(
'Write a comment or drag your files here…',
);
......
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