From 5c75db434914eba161e02dd523bec893afa38ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20CG?= Date: Wed, 7 Aug 2024 16:48:46 +0200 Subject: [PATCH] test(components): revert skip on test cases --- .../__tests__/base-variable-column-grid.spec.ts | 1 - .../components/__tests__/page-loader-button.spec.ts | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/x-components/src/components/__tests__/base-variable-column-grid.spec.ts b/packages/x-components/src/components/__tests__/base-variable-column-grid.spec.ts index 1189e1bee9..b3b77f83e3 100644 --- a/packages/x-components/src/components/__tests__/base-variable-column-grid.spec.ts +++ b/packages/x-components/src/components/__tests__/base-variable-column-grid.spec.ts @@ -65,7 +65,6 @@ describe('testing BaseVariableColumnGrid component', () => { const wrapper2 = mountComponent(); - console.log(wrapper2.classes()); await nextTick(); expect(wrapper2.classes('x-base-grid--cols-6')).toBe(true); diff --git a/packages/x-components/src/components/__tests__/page-loader-button.spec.ts b/packages/x-components/src/components/__tests__/page-loader-button.spec.ts index 60433b30be..5428d8ad45 100644 --- a/packages/x-components/src/components/__tests__/page-loader-button.spec.ts +++ b/packages/x-components/src/components/__tests__/page-loader-button.spec.ts @@ -3,7 +3,7 @@ import { Result } from '@empathyco/x-types'; import { getDataTestSelector, installNewXPlugin } from '../../__tests__/utils'; import PageLoaderButton from '../page-loader-button.vue'; import { getResultsStub } from '../../__stubs__/index'; -import { bus } from '../../plugins/index'; +import { XPlugin } from '../../plugins/index'; function renderPageLoaderButton({ query = 'dress', @@ -29,7 +29,7 @@ function renderPageLoaderButton({ return { wrapper, - emitSpy: jest.spyOn(bus, 'emit') + emitSpy: jest.spyOn(XPlugin.bus, 'emit') }; } @@ -75,9 +75,7 @@ describe('testing PageLoaderButton component', () => { expect(wrapper.find('.x-rounded-full').exists()).toBe(true); }); - // TODO: Enable test when BaseEventButton component is migrated - // eslint-disable-next-line jest/no-disabled-tests - it.skip('emits the event UserReachedResultsListEnd when the button is clicked', () => { + it('emits the event UserReachedResultsListEnd when the button is clicked', () => { const { wrapper, emitSpy } = renderPageLoaderButton(); const baseEventButton = wrapper.find(getDataTestSelector('load-content')); @@ -92,9 +90,7 @@ describe('testing PageLoaderButton component', () => { }); }); - // TODO: Enable test when BaseEventButton component is migrated - // eslint-disable-next-line jest/no-disabled-tests - it.skip('emits an event passed via prop', async () => { + it('emits an event passed via prop', async () => { const { wrapper, emitSpy } = renderPageLoaderButton(); const baseEventButton = wrapper.find(getDataTestSelector('load-content'));