Feature : Exercise tool
I n o r d e r t o u s e t h e e x e r c i s e t o o l
T h e t e a c h e r s s h o u l d b e a b l e t o c r e a t e e x e r c i s e s
Background :
Given I a m a p l a t f o r m a d m i n i s t r a t o r
And I a m o n c o u r s e " T E M P " h o m e p a g e
Scenario : Create a question category
Given I a m o n " / m a i n / e x e r c i s e / t e s t s _ c a t e g o r y . p h p ? a c t i o n = a d d c a t e g o r y & c i d R e q = T E M P "
And w a i t f o r t h e p a g e t o b e l o a d e d
When I f i l l i n t h e f o l l o w i n g :
| c a t e g o r y _ n a m e | C a t e g o r y 1 |
And I f i l l i n c k e d i t o r f i e l d " c a t e g o r y _ d e s c r i p t i o n " w i t h " C a t e g o r y 1 d e s c r i p t i o n "
And I p r e s s " S u b m i t N o t e "
Then I s h o u l d s e e " C a t e g o r y a d d e d "
Scenario : Create a second question category
Given I a m o n " / m a i n / e x e r c i s e / t e s t s _ c a t e g o r y . p h p ? a c t i o n = a d d c a t e g o r y & c i d R e q = T E M P "
And w a i t f o r t h e p a g e t o b e l o a d e d
When I f i l l i n t h e f o l l o w i n g :
| c a t e g o r y _ n a m e | C a t e g o r y 2 |
And I f i l l i n c k e d i t o r f i e l d " c a t e g o r y _ d e s c r i p t i o n " w i t h " C a t e g o r y 2 d e s c r i p t i o n "
And I p r e s s " S u b m i t N o t e "
Then I s h o u l d s e e " C a t e g o r y a d d e d "
Scenario : Create an exercise
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e _ a d m i n . p h p ? c i d R e q = T E M P "
And I p r e s s a d v a n c e d s e t t i n g s
When I f i l l i n t h e f o l l o w i n g :
| e x e r c i s e _ t i t l e | E x e r c i s e 1 |
And I f i l l i n c k e d i t o r f i e l d " e x e r c i s e D e s c r i p t i o n " w i t h " E x e r c i s e d e s c r i p t i o n "
And I p r e s s " s u b m i t E x e r c i s e "
Then I s h o u l d s e e " E x e r c i s e a d d e d "
Scenario : Edit an exercise
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " E d i t t e s t n a m e a n d s e t t i n g s "
And I p r e s s " s u b m i t E x e r c i s e "
Then I s h o u l d s e e " T e s t n a m e a n d s e t t i n g s h a v e b e e n s a v e d . "
Scenario : Add question "Multiple choice" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " M u l t i p l e c h o i c e "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | M u l t i p l e c h o i c e |
| w e i g h t i n g [ 1 ] | 1 0 |
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 3 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 4 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 3 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 4 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t - q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Multiple answer" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " M u l t i p l e a n s w e r "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | M u l t i p l e a n s w e r s |
| w e i g h t i n g [ 1 ] | 1 0 |
Then I c h e c k t h e " c o r r e c t [ 1 ] " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 3 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 4 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 3 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 4 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t - q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Fill in blanks" to "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " F i l l b l a n k s o r f o r m "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | F i l l b l a n k s |
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r " w i t h " R o m e o a n d [ J u l i e t ] [ H ä t t e n | | H a e t t e n ] [ m ö c h t e | | m o e c h t e ] [ w ä r e | | w a e r e ] [ k ö n n e n | | k o e n n e n ] [ K ö n n t e n | | K o e n n t e n ] [ Ä r g e r ] [ v o i l à ] [ m ü s s e n ] [ l ' é t é ] [ c h e r c h e n t à ] [ Ü b u n g ] [ Ä r g e r | M ö g l i c h k e i t ] "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Matching" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " M a t c h i n g "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | M a t c h i n g |
And I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r A "
And I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r B "
And I f i l l i n c k e d i t o r f i e l d " o p t i o n [ 1 ] " w i t h " O p t i o n A "
And I f i l l i n c k e d i t o r f i e l d " o p t i o n [ 2 ] " w i t h " O p t i o n B "
And I f i l l i n s e l e c t b o o t s t r a p s t a t i c i n p u t " # m a t c h e s _ 2 " s e l e c t " 2 "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Open" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " O p e n "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | O p e n q u e s t i o n |
| w e i g h t i n g | 1 0 |
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Oral expression" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " O r a l e x p r e s s i o n "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | O r a l e x p r e s s i o n q u e s t i o n |
| w e i g h t i n g | 1 0 |
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Exact answers combination" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " E x a c t S e l e c t i o n "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | E x a c t a n s w e r s c o m b i n a t i o n |
Then I c h e c k t h e " c o r r e c t [ 1 ] " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Unique answer with unknown" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " U n i q u e a n s w e r w i t h u n k n o w n "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | U n i q u e a n s w e r w i t h u n k n o w n |
| w e i g h t i n g [ 1 ] | 1 0 |
Then I c h e c k t h e " c o r r e c t " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 3 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 3 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Multiple answer true/false/don't know" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " M u l t i p l e a n s w e r t r u e / f a l s e / d o n ' t k n o w "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | M u l t i p l e a n s w e r t r u e - f a l s e - d o n t k n o w |
Then I c h e c k t h e " c o r r e c t [ 1 ] " r a d i o b u t t o n
Then I c h e c k t h e " c o r r e c t [ 2 ] " r a d i o b u t t o n
Then I c h e c k t h e " c o r r e c t [ 3 ] " r a d i o b u t t o n
Then I c h e c k t h e " c o r r e c t [ 4 ] " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 3 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 4 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 3 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 4 ] " w i t h " C o m m e n t t r u e "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Combination true/false/don't-know" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " C o m b i n a t i o n t r u e / f a l s e / d o n ' t - k n o w "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | C o m b i n a t i o n t r u e - f a l s e - d o n ' t - k n o w |
Then I c h e c k t h e " c o r r e c t [ 1 ] " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Add question "Global multiple answer" to exercise created "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " G l o b a l m u l t i p l e a n s w e r "
When I f i l l i n t h e f o l l o w i n g :
| q u e s t i o n N a m e | G l o b a l m u l t i p l e a n s w e r |
| w e i g h t i n g [ 1 ] | 1 0 |
Then I c h e c k t h e " c o r r e c t [ 1 ] " r a d i o b u t t o n
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 1 ] " w i t h " A n s w e r t r u e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 2 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 3 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " a n s w e r [ 4 ] " w i t h " A n s w e r f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 1 ] " w i t h " C o m m e n t t r u e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 2 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 3 ] " w i t h " C o m m e n t f a l s e "
Then I f i l l i n c k e d i t o r f i e l d " c o m m e n t [ 4 ] " w i t h " C o m m e n t f a l s e "
And I p r e s s " s u b m i t Q u e s t i o n "
Then I s h o u l d s e e " I t e m a d d e d "
Scenario : Duplicate exercise
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " C o p y t h i s e x e r c i s e a s a n e w o n e "
And I c o n f i r m t h e p o p u p
Then I s h o u l d s e e " E x e r c i s e c o p i e d "
And I s h o u l d s e e " E x e r c i s e 1 - C o p y "
Scenario : Import exercise to test questions categories
Given I a m o n " / m a i n / e x e r c i s e / u p l o a d _ e x e r c i s e . p h p ? c i d R e q = T E M P "
And I s h o u l d s e e " I m p o r t q u i z f r o m E x c e l "
And I a t t a c h t h e f i l e " / t e s t s / b e h a t / u p l o a d a b l e _ f i l e s / e x e r c i s e . x l s " t o " u s e r _ u p l o a d _ q u i z "
When I p r e s s " U p l o a d "
And w a i t f o r t h e p a g e t o b e l o a d e d
Then I s h o u l d s e e " E x e r c i s e f o r B e h a t t e s t "
Scenario : Import exercise from excel
Given I a m o n " / m a i n / e x e r c i s e / u p l o a d _ e x e r c i s e . p h p ? c i d R e q = T E M P "
Then I s h o u l d s e e " I m p o r t q u i z f r o m E x c e l "
Then I a t t a c h t h e f i l e " / m a i n / e x e r c i s e / q u i z _ t e m p l a t e . x l s " t o " u s e r _ u p l o a d _ q u i z "
And I p r e s s " U p l o a d "
And w a i t f o r t h e p a g e t o b e l o a d e d
Then I s h o u l d s e e " D e f i n i t i o n o f o l i g a r c h y "
Scenario : Try exercise "Exercise 1"
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " S t a r t t e s t "
# Question 1
Then I s h o u l d s e e " M u l t i p l e c h o i c e "
And I c h e c k t h e " A n s w e r t r u e " r a d i o b u t t o n
And w a i t f o r t h e p a g e t o b e l o a d e d
Then I p r e s s " N e x t q u e s t i o n "
# Question 2
And w a i t f o r t h e p a g e t o b e l o a d e d
And I c h e c k t h e " A n s w e r t r u e " r a d i o b u t t o n
And w a i t f o r t h e p a g e t o b e l o a d e d
Then I p r e s s " N e x t q u e s t i o n "
# Question 3
Then I f i l l i n t h e f o l l o w i n g :
| c h o i c e _ i d _ 3 _ 0 | J u l i e t |
| c h o i c e _ i d _ 3 _ 1 | H ä t t e n |
| c h o i c e _ i d _ 3 _ 2 | m ö c h t e |
| c h o i c e _ i d _ 3 _ 3 | w ä r e |
| c h o i c e _ i d _ 3 _ 4 | k ö n n e n |
| c h o i c e _ i d _ 3 _ 5 | K ö n n t e n |
| c h o i c e _ i d _ 3 _ 6 | Ä r g e r |
| c h o i c e _ i d _ 3 _ 7 | v o i l à |
| c h o i c e _ i d _ 3 _ 8 | m ü s s e n |
| c h o i c e _ i d _ 3 _ 9 | l ' é t é |
| c h o i c e _ i d _ 3 _ 1 0 | c h e r c h e n t à |
| c h o i c e _ i d _ 3 _ 1 1 | Ü b u n g |
Then I f i l l i n s e l e c t b o o t s t r a p s t a t i c b y t e x t " # c h o i c e _ i d _ 3 _ 1 2 " s e l e c t " Ä r g e r "
And w a i t f o r t h e p a g e t o b e l o a d e d
Then I p r e s s " N e x t q u e s t i o n "
# Question 4 - Matching
Then I s e l e c t " A " f r o m " c h o i c e _ i d _ 4 _ 1 "
Then I s e l e c t " B " f r o m " c h o i c e _ i d _ 4 _ 2 "
Then I p r e s s " N e x t q u e s t i o n "
# Question 5 - Open question
Then w a i t f o r t h e p a g e t o b e l o a d e d
Then I f i l l t h e o n l y c k e d i t o r i n t h e p a g e w i t h " H e l l o y o u "
Then w a i t f o r t h e p a g e t o b e l o a d e d
Then I p r e s s " N e x t q u e s t i o n "
# Question 6 - Oral question
Then w a i t f o r t h e p a g e t o b e l o a d e d
Then I p r e s s " N e x t q u e s t i o n "
# Question 7 - Exact answers combination
Then I c h e c k " A n s w e r t r u e "
Then I p r e s s " N e x t q u e s t i o n "
Then w a i t f o r t h e p a g e t o b e l o a d e d
# Question 8 - Unique answer with unknown
And I c h e c k t h e " A n s w e r t r u e " r a d i o b u t t o n
Then I p r e s s " N e x t q u e s t i o n "
Then w a i t f o r t h e p a g e t o b e l o a d e d
# Question 9 - Multiple answer true - false - dont know
#@todo
Then I p r e s s " N e x t q u e s t i o n "
# Question 10 - Combination true - false - don't-know
#@todo
Then I p r e s s " N e x t q u e s t i o n "
# Question 11 - Global multiple answer
Then I c h e c k " A n s w e r t r u e "
Then I p r e s s " E n d t e s t "
Then I s h o u l d s e e " H e l l o y o u "
Then I s h o u l d s e e " S c o r e f o r t h e t e s t : 8 3 / 1 1 7 "
Scenario : Check exercise result
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e 1 "
And I f o l l o w " E d i t "
And I f o l l o w " R e s u l t s a n d f e e d b a c k "
Then I s h o u l d s e e " L e a r n e r s c o r e "
And w a i t v e r y l o n g f o r t h e p a g e t o b e l o a d e d
And I f o l l o w " G r a d e a c t i v i t y "
Then I s h o u l d s e e " S c o r e f o r t h e t e s t : 8 3 / 1 1 7 "
And I p r e s s " E d i t i n d i v i d u a l f e e d b a c k a n d g r a d e t h e o p e n q u e s t i o n "
And I s h o u l d s e e " A s s i g n a g r a d e "
And I f i l l t h e o n l y c k e d i t o r i n t h e p a g e w i t h " o p e n q u e s t i o n t e a c h e r a n s w e r "
And I f i l l i n s e l e c t " s e l e c t [ n a m e = m a r k s ] " w i t h o p t i o n v a l u e " 1 0 " w i t h c l a s s " . g r a d e _ s e l e c t "
Then I p r e s s " C o r r e c t t e s t "
And w a i t v e r y l o n g f o r t h e p a g e t o b e l o a d e d
And I f o l l o w " E d i t "
Then I s h o u l d s e e " o p e n q u e s t i o n t e a c h e r a n s w e r "
And I s h o u l d s e e " S c o r e f o r t h e t e s t : 9 3 / 1 1 7 "
Scenario : Create a session "Session Exercise" and add user "acostea"
Given I a m o n " / m a i n / s e s s i o n / s e s s i o n _ a d d . p h p "
When I f i l l i n t h e f o l l o w i n g :
| n a m e | S e s s i o n E x e r c i s e |
And I f i l l i n s e l e c t 2 i n p u t " # c o a c h _ u s e r n a m e " w i t h i d " 1 " a n d v a l u e " a d m i n "
And I p r e s s " s u b m i t "
Then w a i t f o r t h e p a g e t o b e l o a d e d
Then I s h o u l d s e e " A d d c o u r s e s t o t h i s s e s s i o n ( S e s s i o n E x e r c i s e ) "
Then I s e l e c t " T E M P ( T E M P ) " f r o m " N o S e s s i o n C o u r s e s L i s t [ ] "
And I p r e s s " a d d _ c o u r s e "
And I p r e s s " n e x t "
Then I s h o u l d s e e " U p d a t e s u c c e s s f u l "
Then I f o l l o w " M u l t i p l e r e g i s t r a t i o n "
Then I s e l e c t " C o s t e a A n d r e a ( a c o s t e a ) " f r o m " n o s e s s i o n U s e r s L i s t [ ] "
And I p r e s s " a d d _ u s e r "
And I p r e s s " n e x t "
Then I s h o u l d s e e " U p d a t e s u c c e s s f u l "
Scenario : Try exercise with categorized questions as student
Given I a m a s t u d e n t
And I a m o n c o u r s e " T E M P " h o m e p a g e i n s e s s i o n " S e s s i o n E x e r c i s e "
Then I s h o u l d s e e " T E M P ( S e s s i o n E x e r c i s e ) "
And I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e f o r B e h a t t e s t "
And I f o l l o w " S t a r t t e s t "
When w a i t f o r t h e p a g e t o b e l o a d e d
And I p r e s s " N e x t q u e s t i o n "
And I c h e c k " o l i g a r c h y "
And I c h e c k " o l i g o p o l y "
And I c h e c k " t i m o c r a c y "
And I c h e c k " a u t o c r a c y "
And I p r e s s " N e x t q u e s t i o n "
And I c h e c k t h e " s e m a n t i c s " r a d i o b u t t o n
And I p r e s s " N e x t q u e s t i o n "
And I c h e c k t h e " R N A S L " r a d i o b u t t o n
And I p r e s s " N e x t q u e s t i o n "
And I c h e c k t h e " 1 0 " r a d i o b u t t o n
And I p r e s s " N e x t q u e s t i o n "
And f i l l i n t h e f o l l o w i n g :
| c h o i c e _ i d _ 6 _ 0 | w o r d s |
| c h o i c e _ i d _ 6 _ 1 | f i l l |
| c h o i c e _ i d _ 6 _ 2 | b l a n k s |
And I p r e s s " N e x t q u e s t i o n "
And I s e l e c t " A " f r o m " c h o i c e _ i d _ 7 _ 1 "
And I s e l e c t " B " f r o m " c h o i c e _ i d _ 7 _ 2 "
And I s e l e c t " C " f r o m " c h o i c e _ i d _ 7 _ 3 "
And I p r e s s " N e x t q u e s t i o n "
And w a i t f o r t h e p a g e t o b e l o a d e d
And I c h e c k " 1 "
And I p r e s s " N e x t q u e s t i o n "
And w a i t f o r t h e p a g e t o b e l o a d e d
And I p r e s s " E n d t e s t "
Then I s h o u l d s e e " S c o r e f o r t h e t e s t : 1 9 0 / 1 9 0 "
And I s h o u l d s e e t h e t a b l e " # c a t e g o r y _ r e s u l t s " :
| C a t e g o r i e s | A b s o l u t e s c o r e | R e l a t i v e s c o r e |
| C a t e g o r y n a m e 2 | 5 0 / 7 0 | 7 1 . 4 3 % |
| C a t e g o r y n a m e 1 | 6 0 / 6 0 | 1 0 0 % |
| n o n e | 8 0 / 6 0 | 1 3 3 . 3 3 % |
| T o t a l | 1 9 0 / 1 9 0 | 1 0 0 % |
Scenario : Teacher looks at exercise results by categories
Given I a m o n " / u s e r _ p o r t a l . p h p "
And I a m o n c o u r s e " T E M P " h o m e p a g e i n s e s s i o n " S e s s i o n E x e r c i s e "
Then I s h o u l d s e e " T E M P ( S e s s i o n E x e r c i s e ) "
And I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " E x e r c i s e f o r B e h a t t e s t "
And I f o l l o w " R e s u l t s a n d f e e d b a c k "
Then I s h o u l d s e e " L e a r n e r s c o r e "
And w a i t v e r y l o n g f o r t h e p a g e t o b e l o a d e d
And I f o l l o w " G r a d e a c t i v i t y "
Then I s h o u l d s e e " S c o r e f o r t h e t e s t : 1 9 0 / 1 9 0 "
And I s h o u l d s e e t h e t a b l e " # c a t e g o r y _ r e s u l t s " :
| C a t e g o r i e s | A b s o l u t e s c o r e | R e l a t i v e s c o r e |
| C a t e g o r y n a m e 2 | 5 0 / 7 0 | 7 1 . 4 3 % |
| C a t e g o r y n a m e 1 | 6 0 / 6 0 | 1 0 0 % |
| n o n e | 8 0 / 6 0 | 1 3 3 . 3 3 % |
| T o t a l | 1 9 0 / 1 9 0 | 1 0 0 % |
Scenario : Delete an exercise
Given I a m o n " / m a i n / e x e r c i s e / e x e r c i s e . p h p ? c i d R e q = T E M P "
And I f o l l o w " D e l e t e "
And I c o n f i r m t h e p o p u p
Then I s h o u l d s e e " T h e t e s t h a s b e e n d e l e t e d "
Scenario : Delete an exercise category
Given I a m o n " / m a i n / e x e r c i s e / t e s t s _ c a t e g o r y . p h p ? c i d R e q = T E M P "
And I f o l l o w " D e l e t e "
Then I s h o u l d s e e " C a t e g o r y d e l e t e d "
Scenario : Delete an exercise category
Given I a m o n " / m a i n / e x e r c i s e / t e s t s _ c a t e g o r y . p h p ? c i d R e q = T E M P "
And I f o l l o w " D e l e t e "
Then I s h o u l d s e e " C a t e g o r y d e l e t e d "
Scenario : Delete session
Given I a m o n " / m a i n / s e s s i o n / s e s s i o n _ l i s t . p h p ? k e y w o r d = S e s s i o n + E x e r c i s e "
And w a i t f o r t h e p a g e t o b e l o a d e d
And I f o l l o w " D e l e t e "
And I c o n f i r m t h e p o p u p
Then I s h o u l d s e e " D e l e t e d "