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

1521 Fix skip scenario retry #218

Merged
merged 3 commits into from
May 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions lib/cucumber/core/test/result.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# encoding: utf-8
# frozen_string_literal: true

require "cucumber/messages/time_conversion"

module Cucumber
module Core
module Test
Expand Down
12 changes: 12 additions & 0 deletions spec/cucumber/core/report/summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ module Cucumber::Core::Report
expect( @summary.test_cases.total(:flaky) ).to eq(1)
expect( @summary.test_cases.total ).to eq(1)
end

it "handless flaky with following skip test cases" do
allow(test_case).to receive(:==).and_return(false, false, true)
mattwynne marked this conversation as resolved.
Show resolved Hide resolved
event_bus.send(:test_case_finished, test_case, failed_result)
event_bus.send(:test_case_finished, test_case, passed_result)
event_bus.send(:test_case_finished, test_case, skipped_result)

expect( @summary.test_cases.total(:failed) ).to eq(0)
expect( @summary.test_cases.total(:flaky) ).to eq(1)
expect( @summary.test_cases.total(:skipped) ).to eq(0)
expect( @summary.test_cases.total ).to eq(2)
end
end

context "test step summary" do
Expand Down