Open dotnetprofessional opened 7 years ago
The current design uses variables at the global scope. This can cause issues if trying run in parallel and can make discovery more difficult. This proposal passes the context into the function call.
feature("my feature", (context: LiveDocContext) => {}); scenario("my scenario", (context: LiveDocContext) => {}); scenarioOutline("my scenario outline", (context: LiveDocContext) => {}); given("...", (context: LiveDocContext) => {}); when("...", (context: LiveDocContext) => {}); then("...", (context: LiveDocContext) => {}); and("...", (context: LiveDocContext) => {}); but("...", (context: LiveDocContext) => {});
The LiveDocConext would have the schema:
class LiveDocContext { feature: FeaturCongtext; background: BackgroundContext; scenario: ScenarioContext; scenarioOutline: ScenarioOutlineContext; stepContext: StepContext; }
Problem
The current design uses variables at the global scope. This can cause issues if trying run in parallel and can make discovery more difficult. This proposal passes the context into the function call.
Proposal
feature("my feature", (context: LiveDocContext) => {}); scenario("my scenario", (context: LiveDocContext) => {}); scenarioOutline("my scenario outline", (context: LiveDocContext) => {}); given("...", (context: LiveDocContext) => {}); when("...", (context: LiveDocContext) => {}); then("...", (context: LiveDocContext) => {}); and("...", (context: LiveDocContext) => {}); but("...", (context: LiveDocContext) => {});
The LiveDocConext would have the schema: