Skip to content

Commit

Permalink
we can see the expected configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Feb 19, 2024
1 parent dd876e1 commit 8d0735a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/trailblazer/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ module Workflow
require "trailblazer/workflow/collaboration/lane"
require "trailblazer/workflow/collaboration/messages"
require "trailblazer/workflow/event"
require "trailblazer/workflow/state/discovery"
require "trailblazer/workflow/state/discovery/testing"
# require "trailblazer/workflow/state/discovery/testing"

require "trailblazer/workflow/test/plan"

Expand Down
19 changes: 18 additions & 1 deletion lib/trailblazer/workflow/test/plan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ def call(discovered_states, **options)

start_position_combined_column = format_positions_column(all_start_position_labels, **options)


all_expected_positions_labels = discovered_states.collect do |row|
row[:suspend_configuration].lane_positions.collect do |activity, task|
[
activity,
Discovery::Present.readable_name_for_suspend_or_terminus(activity, task, **options)
]
end
end

expected_position_combined_column = format_positions_column(all_expected_positions_labels, **options)



rows = discovered_states.collect.with_index do |row, index|
positions_before, start_position = row[:positions_before]

Expand All @@ -121,10 +135,13 @@ def call(discovered_states, **options)
"start configuration",
# start_configuration(positions_before, **options)
start_position_combined_column[index],

"expected reached configuration",
expected_position_combined_column[index],
]
end

Discovery::Present::Table.render(["triggered catch", "start configuration"], rows)
Discovery::Present::Table.render(["triggered catch", "start configuration", "expected reached configuration"], rows)
end

def start_position_label(start_position, row, **options)
Expand Down

0 comments on commit 8d0735a

Please sign in to comment.