Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement test:after:run plugin event #27175

Open
badeball opened this issue Jun 30, 2023 · 1 comment
Open

Implement test:after:run plugin event #27175

badeball opened this issue Jun 30, 2023 · 1 comment
Labels
topic: plugins ⚙️ type: feature New feature that does not currently exist

Comments

@badeball
Copy link
Contributor

badeball commented Jun 30, 2023

What would you like?

Similar to #2283, I'd like to propose implementing test:after:run as a plugin event, mirroring the driver event, specifically in the sense that it's invoked for skipped tests and that skipped-status can be detected.

Why is this needed?

I would like this in order to make "pretty output" of @badeball/cypress-cucumber-preprocessor to work better with skipped tests.

As explained in the docs, pretty output doesn't actually originate from the reporter, as reporters in Cypress are limited to Mocha events. Thus, most of pretty output originate from code running in setupNodeEvents() { .. }, IE. a plugin.

The plugin however is not aware of skipped tests (it.skip) and have no way of reporting them the way pretty output works with Cucumber JS, which is what the preprocessor tries to mimic.

Other

No response

@mike-plummer mike-plummer added type: feature New feature that does not currently exist topic: plugins ⚙️ labels Jun 30, 2023
@badeball
Copy link
Contributor Author

badeball commented Jul 9, 2023

Having access to the test's would-be environment variables (shown below) in the proposed hook would also be super useful.

it.skip("should work", { env: { foo: "bar" } });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: plugins ⚙️ type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

2 participants