2017-07-26 21:45:26 +00:00
Feature : User validate first factor
Scenario : User succeeds first factor
Given I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / "
When I s e t f i e l d " u s e r n a m e " t o " b o b "
And I s e t f i e l d " p a s s w o r d " t o " p a s s w o r d "
And I c l i c k o n " S i g n i n "
Then I ' m r e d i r e c t e d t o " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / s e c o n d f a c t o r "
Scenario : User fails first factor
Given I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / "
When I s e t f i e l d " u s e r n a m e " t o " j o h n "
And I s e t f i e l d " p a s s w o r d " t o " b a d - p a s s w o r d "
And I c l i c k o n " S i g n i n "
2017-08-04 19:20:31 +00:00
Then I g e t a n o t i f i c a t i o n o f t y p e " e r r o r " w i t h m e s s a g e " A u t h e n t i c a t i o n f a i l e d . P l e a s e d o u b l e c h e c k y o u r c r e d e n t i a l s . "
2017-07-26 21:45:26 +00:00
2017-09-21 20:07:34 +00:00
Scenario : User registers TOTP secret and succeeds authentication
2017-07-26 21:45:26 +00:00
Given I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / "
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
And I r e g i s t e r a T O T P s e c r e t c a l l e d " S e c 0 "
2017-09-22 15:53:18 +00:00
When I v i s i t " h t t p s : / / s e c r e t . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l " a n d g e t r e d i r e c t e d " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F s e c r e t . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-07-26 21:45:26 +00:00
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
And I u s e " S e c 0 " a s T O T P t o k e n h a n d l e
And I c l i c k o n " T O T P "
Then I ' m r e d i r e c t e d t o " h t t p s : / / s e c r e t . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l "
Scenario : User fails TOTP second factor
2017-09-22 15:53:18 +00:00
When I v i s i t " h t t p s : / / s e c r e t . t e s t . l o c a l : 8 0 8 0 / s e c r e t . h t m l " a n d g e t r e d i r e c t e d " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / ? r e d i r e c t = h t t p s % 3 A % 2 F % 2 F s e c r e t . t e s t . l o c a l % 3 A 8 0 8 0 % 2 F s e c r e t . h t m l "
2017-09-02 23:25:43 +00:00
And I l o g i n w i t h u s e r " j o h n " a n d p a s s w o r d " p a s s w o r d "
2017-07-26 21:45:26 +00:00
And I u s e " B A D T O K E N " a s T O T P t o k e n
And I c l i c k o n " T O T P "
2017-08-04 19:20:31 +00:00
Then I g e t a n o t i f i c a t i o n o f t y p e " e r r o r " w i t h m e s s a g e " P r o b l e m w i t h T O T P v a l i d a t i o n . "
2017-07-26 21:45:26 +00:00
2017-09-21 20:07:34 +00:00
Scenario : Logout redirects user to redirect URL given in parameter
2017-07-26 21:45:26 +00:00
When I v i s i t " h t t p s : / / a u t h . t e s t . l o c a l : 8 0 8 0 / l o g o u t ? r e d i r e c t = h t t p s : / / w w w . g o o g l e . f r "
2017-09-22 15:53:18 +00:00
Then I ' m r e d i r e c t e d t o " h t t p s : / / w w w . g o o g l e . f r "