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

CCK: reconcile skipped #65

Merged
merged 3 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions devkit/samples/skipped/skipped.feature
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Feature: Skipping scenarios

Hooks and step definitions are able to signal at runtime that the scenario should
be skipped by returning or throwing a particular value.
be skipped by raising a particular kind of exception status (For example PENDING or SKIPPED).

This can be useful when e.g. the current environment doesn't have the right conditions
for running the scenario.
This can be useful in certain situations e.g. the current environment doesn't have
the right conditions for running a particular scenario.

@skip
Scenario: Skipping from a Before hook
Given a step that we expect to be skipped
Given a step that is skipped

Scenario: Skipping from a step doesn't affect the previous steps
Given an implemented step
When a step that skips
Given a step that does not skip
And I skip a step

Scenario: Skipping from a step causes the rest of the scenario to be skipped
Given a step that skips
When a step that we expect to be skipped
Given I skip a step
And a step that is skipped
6 changes: 3 additions & 3 deletions devkit/samples/skipped/skipped.feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Before('@skip', function () {
return 'skipped'
})

Given('an implemented step', function () {
Given('a step that does not skip', function () {
// no-op
})

Given('a step that we expect to be skipped', function () {
Given('a step that is skipped', function () {
// no-op
})

Given('a step that skips', function () {
Given('I skip a step', function () {
return 'skipped'
})
10 changes: 5 additions & 5 deletions ruby/features/skipped/skipped.feature.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# frozen_string_literal: true

Before('@skip') do
'skipped'
skip_this_scenario('')
end

Given('an implemented step') do
Given('a step that does not skip') do
# no-op
end

Given('a step that we expect to be skipped') do
Given('a step that is skipped') do
# no-op
end

Given('a step that skips') do
'skipped'
Given('I skip a step') do
skip_this_scenario('')
end