From 125fa33f3dcb8046ba538079d87cb7991fea63c9 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Fri, 4 Oct 2024 16:33:49 +0300 Subject: [PATCH] chore(demo-cypress): provide `NG_EVENT_PLUGINS` for all component tests by default --- projects/demo-cypress/src/support/component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/demo-cypress/src/support/component.ts b/projects/demo-cypress/src/support/component.ts index 5d1746f752a7..13c0049205b7 100644 --- a/projects/demo-cypress/src/support/component.ts +++ b/projects/demo-cypress/src/support/component.ts @@ -1,3 +1,4 @@ +import {NG_EVENT_PLUGINS} from '@taiga-ui/event-plugins'; import {mount} from 'cypress/angular'; import addCompareSnapshotCommand from 'cypress-image-diff-js/command'; @@ -12,8 +13,11 @@ declare global { } } -export const stableMount: typeof mount = (...mountArgs) => - mount(...mountArgs).then((mountResponse) => +export const stableMount: typeof mount = (component, config) => + mount(component, { + ...config, + providers: [...(config?.providers || []), NG_EVENT_PLUGINS], + }).then((mountResponse) => cy .get('body') .find('[data-cy-root]')