Skip to content

Commit

Permalink
updated test.
Browse files Browse the repository at this point in the history
  • Loading branch information
apotonick committed Dec 11, 2023
1 parent fd16924 commit 8d0f4dd
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 176 deletions.
2 changes: 1 addition & 1 deletion test/collaboration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class CollaborationTest < Minitest::Spec
assert_equal configuration.lane_positions.keys, [lane_activity, lane_activity_ui]

assert_equal configuration.lane_positions.values.inspect, %([#<Trailblazer::Workflow::Event::Suspend resumes=["catch-before-#{update_id}", "catch-before-#{notify_id}"] type=:suspend semantic=[:suspend, "suspend-Gateway_0fnbg3r"]>, \
#<Trailblazer::Workflow::Event::Suspend resumes=["catch-before-#{ui_update_form}"] type=:suspend semantic=[:suspend, "suspend-Gateway_01cn7zv"]>])
#<Trailblazer::Workflow::Event::Suspend resumes=["catch-before-#{ui_update_form}", "catch-before-#{ui_notify_approver}"] type=:suspend semantic=[:suspend, "suspend-Gateway_0kknfje"]>])
assert_equal ctx.inspect, %({:seq=>[:create, :create]})
end
end
206 changes: 108 additions & 98 deletions test/fixtures/v1/moderation.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": 3,
"id": 1,
"type": "collaboration",
"lanes": [
{
Expand Down Expand Up @@ -487,30 +487,6 @@
"id": "<ui> author workflow",
"type": "lane",
"elements": [
{
"id": "Event_0co8ygx",
"label": "invalid?",
"type": "catch_event",
"data": {},
"links": [
{
"target_id": "Activity_08p0cun",
"semantic": "success"
}
]
},
{
"id": "Event_0km79t5",
"label": "valid?",
"type": "catch_event",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_01cn7zv",
"semantic": "success"
}
]
},
{
"id": "Event_1npw1tg",
"label": "accepted?",
Expand Down Expand Up @@ -559,18 +535,6 @@
}
]
},
{
"id": "Activity_1psp91r",
"label": "Create",
"type": "task",
"data": {},
"links": [
{
"target_id": "throw-after-Activity_1psp91r",
"semantic": "success"
}
]
},
{
"id": "Activity_1165bw9",
"label": "Update form",
Expand Down Expand Up @@ -703,18 +667,6 @@
}
]
},
{
"id": "Activity_08p0cun",
"label": "Create form with errors",
"type": "task",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_14h0q7a",
"semantic": "success"
}
]
},
{
"id": "Activity_00kfo8w",
"label": "Update form with errors",
Expand Down Expand Up @@ -795,25 +747,49 @@
"links": []
},
{
"id": "catch-before-Activity_1psp91r",
"label": null,
"id": "Event_0co8ygx",
"label": "invalid?",
"type": "catch_event",
"data": {},
"links": [
{
"target_id": "Activity_1psp91r",
"target_id": "Activity_08p0cun",
"semantic": "success"
}
]
},
{
"id": "throw-after-Activity_1psp91r",
"label": null,
"type": "throw_event",
"id": "Event_0km79t5",
"label": "valid?",
"type": "catch_event",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_1d05yki",
"target_id": "suspend-Gateway_0kknfje",
"semantic": "success"
}
]
},
{
"id": "Activity_1psp91r",
"label": "Create",
"type": "task",
"data": {},
"links": [
{
"target_id": "throw-after-Activity_1psp91r",
"semantic": "success"
}
]
},
{
"id": "Activity_08p0cun",
"label": "Create form with errors",
"type": "task",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_14h0q7a",
"semantic": "success"
}
]
Expand Down Expand Up @@ -963,27 +939,25 @@
]
},
{
"id": "Activity_0wc2mcq",
"label": "Create form",
"type": "task",
"id": "catch-before-Activity_1psp91r",
"label": null,
"type": "catch_event",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_14h0q7a",
"target_id": "Activity_1psp91r",
"semantic": "success"
}
]
},
{
"id": "catch-before-Activity_0wc2mcq",
"id": "throw-after-Activity_1psp91r",
"label": null,
"type": "catch_event",
"data": {
"start_task": true
},
"type": "throw_event",
"data": {},
"links": [
{
"target_id": "Activity_0wc2mcq",
"target_id": "suspend-Gateway_1d05yki",
"semantic": "success"
}
]
Expand Down Expand Up @@ -1037,29 +1011,30 @@
]
},
{
"id": "suspend-Gateway_14h0q7a",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"catch-before-Activity_1psp91r"
]
},
"links": []
"id": "Activity_0wc2mcq",
"label": "Create form",
"type": "task",
"data": {},
"links": [
{
"target_id": "suspend-Gateway_14h0q7a",
"semantic": "success"
}
]
},
{
"id": "suspend-Gateway_1d05yki",
"id": "catch-before-Activity_0wc2mcq",
"label": null,
"type": "suspend",
"type": "catch_event",
"data": {
"resumes": [
"Event_0km79t5",
"Event_0co8ygx",
"catch-before-Activity_1165bw9",
"catch-before-Activity_1dt5di5"
]
"start_task": true
},
"links": []
"links": [
{
"target_id": "Activity_0wc2mcq",
"semantic": "success"
}
]
},
{
"id": "suspend-Gateway_01cn7zv",
Expand Down Expand Up @@ -1167,6 +1142,41 @@
},
"links": []
},
{
"id": "suspend-Gateway_14h0q7a",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"catch-before-Activity_1psp91r"
]
},
"links": []
},
{
"id": "suspend-Gateway_1d05yki",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"Event_0km79t5",
"Event_0co8ygx"
]
},
"links": []
},
{
"id": "suspend-Gateway_0kknfje",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"catch-before-Activity_1165bw9",
"catch-before-Activity_1dt5di5"
]
},
"links": []
},
{
"id": "suspend-gw-to-Event_1vrfxsv",
"label": null,
Expand Down Expand Up @@ -1212,23 +1222,23 @@
"links": []
},
{
"id": "suspend-gw-to-catch-before-Activity_0wc2mcq",
"id": "suspend-gw-to-catch-before-Activity_0zsock2",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"catch-before-Activity_0wc2mcq"
"catch-before-Activity_0zsock2"
]
},
"links": []
},
{
"id": "suspend-gw-to-catch-before-Activity_0zsock2",
"id": "suspend-gw-to-catch-before-Activity_0wc2mcq",
"label": null,
"type": "suspend",
"data": {
"resumes": [
"catch-before-Activity_0zsock2"
"catch-before-Activity_0wc2mcq"
]
},
"links": []
Expand Down Expand Up @@ -1347,16 +1357,6 @@
"Event_1vb197y"
]
],
[
[
"<ui> author workflow",
"throw-after-Activity_1psp91r"
],
[
"article moderation",
"catch-before-Activity_0wwfenp"
]
],
[
[
"<ui> author workflow",
Expand Down Expand Up @@ -1416,6 +1416,16 @@
"article moderation",
"catch-before-Activity_1hgscu3"
]
],
[
[
"<ui> author workflow",
"throw-after-Activity_1psp91r"
],
[
"article moderation",
"catch-before-Activity_0wwfenp"
]
]
]
}
Loading

0 comments on commit 8d0f4dd

Please sign in to comment.