-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cucumber test skipping implementation done
- Loading branch information
1 parent
5a889cf
commit 685c205
Showing
6 changed files
with
92 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module Datadog | ||
module CI | ||
module Contrib | ||
module Cucumber | ||
# instruments Cucumber::Core::Test::Step from cucumber-ruby-core to change | ||
module Step | ||
def self.included(base) | ||
base.prepend(InstanceMethods) | ||
end | ||
|
||
module InstanceMethods | ||
def execute(*args) | ||
test_span = CI.active_test | ||
if test_span&.skipped_by_itr? | ||
@action.skip(*args) | ||
else | ||
super | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module Datadog | ||
module CI | ||
module Contrib | ||
module Cucumber | ||
module Step | ||
def self.included: (untyped base) -> untyped | ||
|
||
module InstanceMethods | ||
prepend ::Cucumber::Core::Test::Step | ||
def execute: (*untyped args) -> untyped | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters