I have enabled the "experimentalInteractiveRunEvents": true in cypress.json to run the after:spec event of cypress-testRail-simple plugin through cypress IDE.
link for plugin : https://github.com/bahmutov/cypress-testrail-simple.git
I am using this event in cypress-testRail-simple's plugin.js file.
I have defined plugin in plugins -> index.js

enabled the flag in cypress.json file:
I have multiple spec files.
When running through command line : npx cypress run
after:spec - getting called after all the spec run finish.
When running through cypress IDE : npx cypress open
after:spec - called zero time
reference : how to run the cypress in interactive mode with flag enabled


There's a fundamental difference between
npx cypress open(interactive mode) andnpx cypress run(command line mode).Interactive mode
All the specs are run as in a single continuous run, as if they had been written as one spec. Because of this,
before:specis called only one.Command line mode
All specs are run as separate runs, hence two calls to
before:spec.From After Spec API