Skip to content

Commit

Permalink
pickup: add a scenario where directed pickup does not work
Browse files Browse the repository at this point in the history
The scenario does the right thing. I still have to figure out how to make it fail
  • Loading branch information
pc-m committed Jan 5, 2022
1 parent 73f2a78 commit 08c402a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions features/daily/pickup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,20 @@ Feature: Pickup
Then "Wally Lasagna" is hungup
Then "Dilbert Bologna" is talking
Then "Alice Wonder" is talking

Scenario: Directed pickup with mobile
Given the direct pickup is enabled with "*8"
Given there are telephony users with infos:
| firstname | lastname | exten | context | with_token |
| Dilbert | Bologna | 1001 | default | |
| Wally | Lasagna | | | mobile |
| Alice | Wonder | 1003 | default | |
Given "Wally Lasagna" has lines:
| name | exten | context | with_phone | webrtc |
| wally | 1002 | default | yes | yes |
When "Dilbert Bologna" calls "1002"
Then "Wally Lasagna" is ringing
When "Alice Wonder" calls "*81002"
Then "Wally Lasagna" is hungup
Then "Dilbert Bologna" is talking
Then "Alice Wonder" is talking
2 changes: 2 additions & 0 deletions wazo_acceptance/steps/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def given_there_are_telephony_users_with_infos(context):

if body.get('with_token', 'no') == 'yes':
context.helpers.token.create(username, password, tracking_id)
elif body.get('with_token', 'mobile') == 'mobile':
context.helpers.token.create(username, password, tracking_id, session_type='mobile')

if not body.get('context'):
# User has no line
Expand Down

0 comments on commit 08c402a

Please sign in to comment.