Closed sakilandeswari closed 8 months ago
@sakilandeswari With your given details, I can't address the issue. Could you please provide a minimal reproduction about the issue you're facing?
@kien-ht - i have followed the steps given in the documentation and ended up with the above issue - hence, interested to check if any config missed in document and to be done during setup to overcome this issue
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 30 days since being marked as stale.
I am facing the above error while running component test case
My project is Nx project and build in typescript. i have updated configuration here, please, suggest me what is wrong in this and how to get away from this issue
Command to run test case - npx nx run-many -t component-test -p bindings-ng-pos --parallel=false --skip-nx-cache --watch
cypress.config.ts import { nxComponentTestingPreset } from '@nx/angular/plugins/component-testing'; import { defineConfig } from 'cypress'; import getCompareSnapshotsPlugin from 'cypress-image-diff-js/plugin'
export default defineConfig({ component: nxComponentTestingPreset(__filename), setupNodeEvents(on, config) { return getCompareSnapshotsPlugin(on, config) }, fixturesFolder: '../../../apps/store/src/assets/mockdata/storefacade/api/storefacade/', includeShadowDom: true, viewportWidth: 1024, viewportHeight: 720, reporter: '../../../node_modules/cypress-multi-reporters', video : false, reporterOptions: { reporterEnabled: 'mochawesome', mochawesomeReporterOptions: { reportDir: '../../../dist/cypress/reports/json', quite: true, overwrite: false, html: false, json: true }, }, });
commands.ts
import compareSnapshotCommand from 'cypress-image-diff-js/command'; import { RecurseDefaults } from 'cypress-recurse'; compareSnapshotCommand();
component.ts
import compareSnapshotCommand from 'cypress-image-diff-js/command' import { RecurseDefaults } from 'cypress-recurse'; compareSnapshotCommand()
test script cy.compareSnapshot('component-testing', 0.2)