#-- copyright
# OpenProject Reporting Plugin
#
# Copyright (C) 2010 - 2014 the OpenProject Foundation (OPF)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#++
Feature : Permissions
######################
# Dimensions to test:
#
# see_cost_entries: none, own, all
# see_time_entries: none, own, all
# see_rates: none, own, all
Scenario : Anonymous can not access the project specific cost reports page
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And I a m n o t l o g g e d i n
And I a m o n t h e C o s t R e p o r t s p a g e f o r t h e p r o j e c t c a l l e d " P e r m i s s i o n _ T e s t " w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " L o g i n "
And I s h o u l d s e e " P a s s w o r d "
Scenario : Anonymous can not access the overall cost reports page as there are no other public projects
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And I a m n o t l o g g e d i n
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " L o g i n "
And I s h o u l d s e e " P a s s w o r d "
@javascript
Scenario : Admin sees everything
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r e i s 1 u s e r w i t h :
| l o g i n | a d m i n |
| a d m i n | t r u e |
And I a m a l r e a d y l o g g e d i n a s " a d m i n "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who has all rights sees everything
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
| v i e w _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
Scenario : User who has no rights, sees nothing
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| n o n e |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
# permission denied
Then I s h o u l d s e e " 4 0 3 "
@javascript
Scenario : User who may only see own cost entries, only sees his own cost entries without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see cost entries, sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see his own time entries, only sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see time entries, only sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see own time and cost entries, only sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see own time entries, but all cost entries, sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may only see own cost entries, but all time entries, sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who my see all time and cost entries, sees them without costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
Scenario : User who may see own costs, but no entries sees nothing
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
# access denied
Then I s h o u l d s e e " 4 0 3 "
@javascript
Scenario : User who may see own costs and own cost entries, sees them with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see own costs and all cost entries, sees all cost entries, but own costs only
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d n o t s e e " 1 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see own costs and own time entries, sees his entries with own costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ o w n _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : A user who may see own costs, own time entries and own cost entries, sees then with costs (as they are his costs)
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see own costs, own time entries and all cost entries, only sees those entries and only own entries with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see own costs and time entries, only sees own time entries with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who can see own costs, all time entries and only his own cost entries, see only the requested entries where costs are only visible on own entries
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ o w n _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see own costs and all entries, only sees his own entries attached with costs
# ATTENTION: there is no right to see own CostEntry costs - so no costs for cost entries are visible after all
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ o w n _ h o u r l y _ r a t e |
| v i e w _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
Scenario : User who can see all costs but no entries sees nothing after all
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " 4 0 3 " #access denied
@javascript
Scenario : User wh can see all costs and his own cost entries, only sees own cost entries with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 . 0 0 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs and all cost entries, sees all cost entries with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 1 . 0 0 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d n o t s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs and own time entries, sees them with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs, own time- and cost- entries, sees his own entires with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs, own time entries and all cost entries, only sees them with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ t i m e _ e n t r i e s |
| v i e w _ c o s t _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 1 . 0 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d n o t s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs and all time entries, sees them with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 0 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d n o t s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "
@javascript
Scenario : User who may see all costs, all time entries and his own cost entries, sees them with costs
Given t h e r e i s a s t a n d a r d p e r m i s s i o n t e s t p r o j e c t n a m e d " P e r m i s s i o n _ T e s t "
And t h e r o l e " T e s t u s e r " m a y h a v e t h e f o l l o w i n g r i g h t s :
| v i e w _ h o u r l y _ r a t e s |
| v i e w _ c o s t _ r a t e s |
| v i e w _ o w n _ c o s t _ e n t r i e s |
| v i e w _ t i m e _ e n t r i e s |
And I a m a l r e a d y l o g g e d i n a s " t e s t u s e r "
And I a m o n t h e o v e r a l l C o s t R e p o r t s p a g e w i t h o u t f i l t e r s o r g r o u p s
Then I s h o u l d s e e " C o s t R e p o r t " w i t h i n " # c o n t e n t "
And I c h o o s e " C a s h v a l u e "
And I c l i c k " A p p l y "
And I s h o u l d n o t s e e " N o d a t a t o d i s p l a y "
# Costs
# costs (0.01 [own, time] + 0.10 [other, time] + 1.00 [own, cost] + 10.00 [other, cost])
And I s h o u l d s e e " 1 . 1 1 E U R " w i t h i n " . r e s u l t "
And I s h o u l d n o t s e e " - " w i t h i n " . r e s u l t "
# TimeEntries
# own
And I s h o u l d s e e " 1 . 0 0 h o u r "
# other
And I s h o u l d s e e " 2 . 0 0 h o u r "
# CostEntries
# own
And I s h o u l d s e e " 1 . 0 o n e "
# other
And I s h o u l d n o t s e e " 1 . 0 t e n "