Skip to content

Commit

Permalink
chore(demo-cypress): provide NG_EVENT_PLUGINS for all component tes…
Browse files Browse the repository at this point in the history
…ts by default
  • Loading branch information
nsbarsukov committed Oct 4, 2024
1 parent 56d4a18 commit 125fa33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions projects/demo-cypress/src/support/component.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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]')
Expand Down

0 comments on commit 125fa33

Please sign in to comment.