-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#162] Don't cancel possible transitions even though it is the future…
… of one of those that is cancelled
- Loading branch information
Showing
3 changed files
with
140 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Feature: An example #162 Flow that is set up with django-river (https://github.com/javrasya/django-river/issues/162) | ||
|
||
Background: some requirement of this test | ||
# Groups | ||
Given a group with name "Authorized Group" | ||
|
||
# Users | ||
Given a user with name authorized_user with group "Authorized Group" | ||
|
||
# States | ||
Given a state with label "Draft" | ||
And a state with label "Issued" | ||
And a state with label "Part Received" | ||
And a state with label "Received" | ||
And a state with label "Closed" | ||
|
||
# Workflow | ||
Given a workflow with an identifier "#162 Flow" and initial state "Draft" | ||
|
||
# Transitions | ||
Given a transition "Draft" -> "Issued" in "#162 Flow" | ||
And a transition "Issued" -> "Part Received" in "#162 Flow" | ||
And a transition "Part Received" -> "Received" in "#162 Flow" | ||
And a transition "Issued" -> "Received" in "#162 Flow" | ||
And a transition "Received" -> "Issued" in "#162 Flow" | ||
And a transition "Received" -> "Closed" in "#162 Flow" | ||
|
||
# Authorization Rules | ||
Given an authorization rule for the transition "Draft" -> "Issued" with group "Authorized Group" and priority 0 | ||
Given an authorization rule for the transition "Issued" -> "Part Received" with group "Authorized Group" and priority 0 | ||
Given an authorization rule for the transition "Part Received" -> "Received" with group "Authorized Group" and priority 0 | ||
Given an authorization rule for the transition "Issued" -> "Received" with group "Authorized Group" and priority 0 | ||
Given an authorization rule for the transition "Received" -> "Issued" with group "Authorized Group" and priority 0 | ||
Given an authorization rule for the transition "Received" -> "Closed" with group "Authorized Group" and priority 0 | ||
|
||
Scenario: Should allow multiple cyclic transitions when one of them goes through | ||
Given a workflow object with identifier "object 1" | ||
When "object 1" is attempted to be approved for next state "Issued" by authorized_user | ||
And "object 1" is attempted to be approved for next state "Part Received" by authorized_user | ||
And "object 1" is attempted to be approved for next state "Received" by authorized_user | ||
And "object 1" is attempted to be approved for next state "Closed" by authorized_user | ||
And get current state of "object 1" | ||
Then return current state as "Closed" |
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