Skip to content

Commit

Permalink
test fix [full ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
richardelms committed Nov 7, 2024
1 parent 433ec5d commit 6ed7258
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion features/csharp/csharp_breadcrumbs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ Feature: Csharp Breadcrumbs
And the event "breadcrumbs.0.type" equals "request"
And the event "breadcrumbs.0.metaData.method" equals "GET"
And the error payload field "events.0.breadcrumbs.0.metaData.url" equals "https://localhost:994/?success=false"
And the event "breadcrumbs.0.metaData.status" equals 0
And the event "breadcrumbs.0.metaData.status" equals one of these ints:
| 0 |
| 500 |
And the event "breadcrumbs.0.metaData.urlParams.success" equals "false"
And the event "breadcrumbs.0.metaData.duration" is greater than 0

11 changes: 11 additions & 0 deletions features/steps/unity_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,14 @@ def switch_run_on_target
"#{cache_mount_name_arg}"
Maze::Runner.run_command(command)
end

Then('the event {string} equals one of these ints:') do |string, table|
# Convert the expected values in the table to integers
expected_values = table.raw.flatten.map(&:to_i)

# Retrieve the event value as an integer
event_value = Maze::Helper.read_key_path(Maze::Server.errors.current[:body], string).to_i

# Check if the integer event value is one of the expected values
Maze.check.true(expected_values.include?(event_value), "Expected one of #{expected_values} but got #{event_value}")
end

0 comments on commit 6ed7258

Please sign in to comment.