mirror of
https://github.com/directus/directus.git
synced 2026-02-14 07:15:01 -05:00
Bump @vue/test-utils from 1.0.0-beta.31 to 1.0.0-beta.32 (#149)
* Bump @vue/test-utils from 1.0.0-beta.31 to 1.0.0-beta.32 Bumps [@vue/test-utils](https://github.com/vuejs/vue-test-utils/tree/HEAD/packages/test-utils) from 1.0.0-beta.31 to 1.0.0-beta.32. - [Release notes](https://github.com/vuejs/vue-test-utils/releases) - [Changelog](https://github.com/vuejs/vue-test-utils/blob/dev/packages/test-utils/CHANGELOG.md) - [Commits](https://github.com/vuejs/vue-test-utils/commits/v1.0.0-beta.32/packages/test-utils) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Fix tests to match test-utils change Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
committed by
GitHub
parent
22c554b5ce
commit
6eaf81896c
@@ -57,7 +57,7 @@
|
||||
"@vue/cli-service": "^4.1.0",
|
||||
"@vue/eslint-config-prettier": "^6.0.0",
|
||||
"@vue/eslint-config-typescript": "^5.0.2",
|
||||
"@vue/test-utils": "^1.0.0-beta.30",
|
||||
"@vue/test-utils": "^1.0.0-beta.32",
|
||||
"autoprefixer": "^9.7.4",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babel-preset-vue": "^2.0.2",
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('Checkbox', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toBe(true);
|
||||
expect(component.emitted()?.change?.[0][0]).toBe(true);
|
||||
});
|
||||
|
||||
it('Disables the button when disabled prop is set', () => {
|
||||
@@ -81,7 +81,7 @@ describe('Checkbox', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toEqual(['blue', 'green', 'red']);
|
||||
expect(component.emitted()?.change?.[0][0]).toEqual(['blue', 'green', 'red']);
|
||||
});
|
||||
|
||||
it('Removes value from array', () => {
|
||||
@@ -96,7 +96,7 @@ describe('Checkbox', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toEqual(['blue', 'green']);
|
||||
expect(component.emitted()?.change?.[0][0]).toEqual(['blue', 'green']);
|
||||
});
|
||||
|
||||
it('Renders the correct icon for state', () => {
|
||||
@@ -128,6 +128,6 @@ describe('Checkbox', () => {
|
||||
|
||||
component.find('button').trigger('click');
|
||||
|
||||
expect(component.emitted('update:indeterminate')[0]).toEqual([false]);
|
||||
expect(component.emitted('update:indeterminate')?.[0]).toEqual([false]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -74,7 +74,7 @@ describe('Chip', () => {
|
||||
|
||||
(component.vm as any).onClick(new Event('click'));
|
||||
|
||||
expect(component.emitted('click')[0][0]).toBeInstanceOf(Event);
|
||||
expect(component.emitted('click')?.[0][0]).toBeInstanceOf(Event);
|
||||
});
|
||||
|
||||
it('Does not emit click when disabled', async () => {
|
||||
@@ -98,7 +98,7 @@ describe('Chip', () => {
|
||||
|
||||
(component.vm as any).onCloseClick(new Event('click'));
|
||||
|
||||
expect(component.emitted('close')[0][0]).toBeInstanceOf(Event);
|
||||
expect(component.emitted('close')?.[0][0]).toBeInstanceOf(Event);
|
||||
});
|
||||
|
||||
it('Does not emit click when disabled and close button is clicked', async () => {
|
||||
|
||||
@@ -66,6 +66,6 @@ describe('Input', () => {
|
||||
const input = component.find('input');
|
||||
(input.element as HTMLInputElement).value = 'The value';
|
||||
input.trigger('input');
|
||||
expect(component.emitted('input')[0]).toEqual(['The value']);
|
||||
expect(component.emitted('input')?.[0]).toEqual(['The value']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,6 +19,6 @@ describe('Components / Item Group', () => {
|
||||
state.onSelectionChange([1, 2, 3]);
|
||||
});
|
||||
const component = mount(VItemGroup, { localVue });
|
||||
expect(component.emitted('input')[0][0]).toEqual([1, 2, 3]);
|
||||
expect(component.emitted('input')?.[0][0]).toEqual([1, 2, 3]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -43,6 +43,6 @@ describe('Overlay', () => {
|
||||
|
||||
it('Emits click event', async () => {
|
||||
component.find('.v-overlay').trigger('click');
|
||||
expect(component.emitted('click')[0]).toBeTruthy();
|
||||
expect(component.emitted('click')?.[0]).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('Slider', () => {
|
||||
(input.element as HTMLInputElement).value = '500';
|
||||
input.trigger('input');
|
||||
|
||||
expect(component.emitted('input')[0]).toEqual([500]);
|
||||
expect(component.emitted('input')?.[0]).toEqual([500]);
|
||||
});
|
||||
|
||||
it('Emits just the value on change', async () => {
|
||||
@@ -38,7 +38,7 @@ describe('Slider', () => {
|
||||
(input.element as HTMLInputElement).value = '500';
|
||||
input.trigger('change');
|
||||
|
||||
expect(component.emitted('change')[0]).toEqual([500]);
|
||||
expect(component.emitted('change')?.[0]).toEqual([500]);
|
||||
});
|
||||
|
||||
it('Renders the prepend/append slots', async () => {
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('Switch', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toBe(true);
|
||||
expect(component.emitted()?.change?.[0][0]).toBe(true);
|
||||
});
|
||||
|
||||
it('Disables the button when disabled prop is set', () => {
|
||||
@@ -79,7 +79,7 @@ describe('Switch', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toEqual(['blue', 'green', 'red']);
|
||||
expect(component.emitted()?.change?.[0][0]).toEqual(['blue', 'green', 'red']);
|
||||
});
|
||||
|
||||
it('Removes value from array', () => {
|
||||
@@ -94,6 +94,6 @@ describe('Switch', () => {
|
||||
const button = component.find('button');
|
||||
button.trigger('click');
|
||||
|
||||
expect(component.emitted().change[0][0]).toEqual(['blue', 'green']);
|
||||
expect(component.emitted()?.change?.[0][0]).toEqual(['blue', 'green']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('Table / Header', () => {
|
||||
await component.vm.$nextTick();
|
||||
|
||||
component.find('th .content').trigger('click');
|
||||
expect(component.emitted('update:sort')[0]).toEqual([{ by: 'col1', desc: false }]);
|
||||
expect(component.emitted('update:sort')?.[0]).toEqual([{ by: 'col1', desc: false }]);
|
||||
|
||||
component.setProps({
|
||||
sort: {
|
||||
@@ -77,7 +77,7 @@ describe('Table / Header', () => {
|
||||
|
||||
component.find('th .content').trigger('click');
|
||||
|
||||
expect(component.emitted('update:sort')[1]).toEqual([{ by: 'col1', desc: true }]);
|
||||
expect(component.emitted('update:sort')?.[1]).toEqual([{ by: 'col1', desc: true }]);
|
||||
|
||||
component.setProps({
|
||||
sort: {
|
||||
@@ -89,7 +89,7 @@ describe('Table / Header', () => {
|
||||
await component.vm.$nextTick();
|
||||
|
||||
component.find('th .content').trigger('click');
|
||||
expect(component.emitted('update:sort')[2]).toEqual([{ by: null, desc: false }]);
|
||||
expect(component.emitted('update:sort')?.[2]).toEqual([{ by: null, desc: false }]);
|
||||
});
|
||||
|
||||
it("Doesn't emit the update sort event when dragging", async () => {
|
||||
@@ -112,7 +112,7 @@ describe('Table / Header', () => {
|
||||
|
||||
component.find(VCheckbox).trigger('click');
|
||||
|
||||
expect(component.emitted('toggle-select-all')[0]).toEqual([true]);
|
||||
expect(component.emitted('toggle-select-all')?.[0]).toEqual([true]);
|
||||
});
|
||||
|
||||
it('Prevents unsortable columns from being sorted', async () => {
|
||||
@@ -248,7 +248,7 @@ describe('Table / Header', () => {
|
||||
|
||||
component.find('.manual.cell').trigger('click');
|
||||
|
||||
expect(component.emitted('update:sort')[0]).toEqual([
|
||||
expect(component.emitted('update:sort')?.[0]).toEqual([
|
||||
{
|
||||
by: '$manual',
|
||||
desc: false
|
||||
@@ -267,7 +267,7 @@ describe('Table / Header', () => {
|
||||
|
||||
component.find('.manual.cell').trigger('click');
|
||||
|
||||
expect(component.emitted('update:sort')[1]).toEqual([
|
||||
expect(component.emitted('update:sort')?.[1]).toEqual([
|
||||
{
|
||||
by: null,
|
||||
desc: false
|
||||
@@ -345,7 +345,7 @@ describe('Table / Header', () => {
|
||||
pageX: 50
|
||||
});
|
||||
|
||||
expect(component.emitted('update:headers')[0][0][0].width).toBe(150);
|
||||
expect(component.emitted('update:headers')?.[0][0][0].width).toBe(150);
|
||||
});
|
||||
|
||||
it("Doesn't trigger on mousemove if dragging is false", async () => {
|
||||
|
||||
@@ -110,7 +110,7 @@ describe('Table / Row', () => {
|
||||
|
||||
component.find(VCheckbox).trigger('click');
|
||||
|
||||
expect(component.emitted('item-selected')[0]).toEqual([
|
||||
expect(component.emitted('item-selected')?.[0]).toEqual([
|
||||
{
|
||||
item: {
|
||||
col1: 'Test',
|
||||
|
||||
@@ -219,7 +219,7 @@ describe('Table', () => {
|
||||
component.find('th .content').trigger('click');
|
||||
|
||||
expect((component.vm as any)._sort.by).toEqual('col1');
|
||||
expect(component.emitted('update:sort')[0]).toEqual([{ by: 'col1', desc: false }]);
|
||||
expect(component.emitted('update:sort')?.[0]).toEqual([{ by: 'col1', desc: false }]);
|
||||
});
|
||||
|
||||
it('Handles sort desc updates coming from header', async () => {
|
||||
@@ -258,7 +258,7 @@ describe('Table', () => {
|
||||
|
||||
component.find('th .content').trigger('click');
|
||||
|
||||
expect(component.emitted('update:sort')[0]).toEqual([{ by: 'col1', desc: true }]);
|
||||
expect(component.emitted('update:sort')?.[0]).toEqual([{ by: 'col1', desc: true }]);
|
||||
});
|
||||
|
||||
it('Updates selection correctly', async () => {
|
||||
@@ -295,7 +295,7 @@ describe('Table', () => {
|
||||
|
||||
component.find('.v-table_table-row .select > *').trigger('click');
|
||||
|
||||
expect(component.emitted('select')[0]).toEqual([
|
||||
expect(component.emitted('select')?.[0]).toEqual([
|
||||
[
|
||||
{
|
||||
col1: 'A',
|
||||
@@ -343,7 +343,7 @@ describe('Table', () => {
|
||||
|
||||
component.find('.v-table_table-row .select > *').trigger('click');
|
||||
|
||||
expect(component.emitted('select')[1]).toEqual([[]]);
|
||||
expect(component.emitted('select')?.[1]).toEqual([[]]);
|
||||
});
|
||||
|
||||
it('Calculates selected state per row', async () => {
|
||||
@@ -439,7 +439,7 @@ describe('Table', () => {
|
||||
|
||||
component.find('.v-table_table-header .select > *').trigger('click');
|
||||
|
||||
expect(component.emitted('select')[0]).toEqual([
|
||||
expect(component.emitted('select')?.[0]).toEqual([
|
||||
[
|
||||
{
|
||||
col1: 'A',
|
||||
@@ -503,7 +503,7 @@ describe('Table', () => {
|
||||
|
||||
component.find('.v-table_table-header .select > *').trigger('click');
|
||||
|
||||
expect(component.emitted('select')[1]).toEqual([[]]);
|
||||
expect(component.emitted('select')?.[1]).toEqual([[]]);
|
||||
});
|
||||
|
||||
describe('Sorting', () => {
|
||||
@@ -666,7 +666,7 @@ describe('Table', () => {
|
||||
|
||||
await component.vm.$nextTick();
|
||||
|
||||
expect(component.emitted('update:items')[0]).toEqual([
|
||||
expect(component.emitted('update:items')?.[0]).toEqual([
|
||||
[
|
||||
{
|
||||
col1: 'A'
|
||||
@@ -712,7 +712,7 @@ describe('Table', () => {
|
||||
|
||||
await component.vm.$nextTick();
|
||||
|
||||
expect(component.emitted('update:headers')[0]).toEqual([
|
||||
expect(component.emitted('update:headers')?.[0]).toEqual([
|
||||
[
|
||||
{
|
||||
text: 'Column 1',
|
||||
@@ -735,6 +735,6 @@ describe('Table', () => {
|
||||
|
||||
await component.vm.$nextTick();
|
||||
|
||||
expect(component.emitted('drop')[0]).toEqual([{ oldIndex: 0, newIndex: 5 }]);
|
||||
expect(component.emitted('drop')?.[0]).toEqual([{ oldIndex: 0, newIndex: 5 }]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,11 +22,11 @@ describe('Views / Private / Header Bar', () => {
|
||||
const navToggle = component.find('.nav-toggle');
|
||||
navToggle.trigger('click');
|
||||
|
||||
expect(component.emitted('toggle:nav')[0]).toBeTruthy();
|
||||
expect(component.emitted('toggle:nav')?.[0]).toBeTruthy();
|
||||
|
||||
const drawerToggle = component.find('.drawer-toggle');
|
||||
drawerToggle.trigger('click');
|
||||
|
||||
expect(component.emitted('toggle:drawer')[0]).toBeTruthy();
|
||||
expect(component.emitted('toggle:drawer')?.[0]).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2183,10 +2183,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-1.1.1.tgz#18723530d304f443021da2292d6ec9502826104a"
|
||||
integrity sha512-8VCoJeeH8tCkzhkpfOkt+abALQkS11OIHhte5MBzYaKMTqK0A3ZAKEUVAffsOklhEv7t0yrQt696Opnu9oAx+w==
|
||||
|
||||
"@vue/test-utils@^1.0.0-beta.30":
|
||||
version "1.0.0-beta.31"
|
||||
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.31.tgz#580d6e45f07452e497d69807d80986e713949b73"
|
||||
integrity sha512-IlhSx5hyEVnbvDZ3P98R1jNmy88QAd/y66Upn4EcvxSD5D4hwOutl3dIdfmSTSXs4b9DIMDnEVjX7t00cvOnvg==
|
||||
"@vue/test-utils@^1.0.0-beta.32":
|
||||
version "1.0.0-beta.32"
|
||||
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0-beta.32.tgz#38c3947886236201a3f24b583c73598eb95ccc69"
|
||||
integrity sha512-ywhe7PATMAk/ZGdsrcuQIliQusOyfe0OOHjKKCCERqgHh1g/kqPtmSMT5Jx4sErx53SYbNucr8QOK6/u5ianAw==
|
||||
dependencies:
|
||||
dom-event-types "^1.0.0"
|
||||
lodash "^4.17.15"
|
||||
|
||||
Reference in New Issue
Block a user