diff --git a/features/daily/pickup.feature b/features/daily/pickup.feature index 9398532f..467f1e50 100644 --- a/features/daily/pickup.feature +++ b/features/daily/pickup.feature @@ -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 diff --git a/wazo_acceptance/steps/user.py b/wazo_acceptance/steps/user.py index 1e592707..213ad7e8 100644 --- a/wazo_acceptance/steps/user.py +++ b/wazo_acceptance/steps/user.py @@ -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