Skip to content

Fix broken Before and After functions #388

@delatrie

Description

@delatrie

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Since #371 fixture and step contexts are separated. That means StopStep can't be used to stop a fixture context as it was before. But Before and After methods (all overloads) are leveraging the private Execute method that uses StopStep under the hood.

This should be fixed as the current behavior will break everyone who uses CoreStepsHelper.Before and CoreStepsHelper.After.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Run any overload of CoreStepsHeler.Before or CoreStepsHelper.After. An unexpected exception is thrown saying "No step context exists".

What is the expected behavior?

No exception is thrown (given an underlying action doesn't produce one). A corresponding fixture correctly created in the current container.

What is the motivation / use case for changing the behavior?

Fix unintended behavior left by #371.

Please tell us about your environment:

  • Version: 2.10.0-preview.1
  • Branch: preview

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions