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

Nested steps should query over the wire too #45

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions features/call_nested_wire_step.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Feature: Call nested wire step
If the user specifies a "nested" step in their Ruby step definitions, the
search for that step definition should include steps defined over the wire.

A nested step should still match and be invoked succesfully if it's defined
over the wire.

@wip
Scenario: Call a nested step over the wire
Given a file named "features/step_definitions/remote.wire" with:
"""
host: localhost
port: 54321

"""
And a file named "features/nested_step.feature" with:
"""
Feature: Nested
Scenario: Nested
Given a step over the wire
And a ruby step
"""
And a file named "features/step_definitions/steps.rb" with:
"""
Given "a ruby step" do
step "a step over the wire"
end
"""
And there is a wire server running on port 54321 which understands the following protocol:
| request | response |
| ["step_matches",{"name_to_match":"a ruby step"}] | ["success",[]] |
| ["step_matches",{"name_to_match":"a step over the wire"}] | ["success",[{"id":"1", "args":[]}]] |
| ["begin_scenario"] | ["success"] |
| ["invoke",{"id":"1","args":[]}] | ["success"] |
| ["end_scenario"] | ["success"] |
When I run `cucumber -f progress`
And it should pass with:
"""
.

1 scenario (1 passed)
1 step (1 passed)

"""