@@ -37,6 +37,39 @@ describe('User view privileges', () => {
3737 cy . wait ( 3000 ) //Let react load all state objects
3838 } )
3939
40+ it ( 'Create and delete entities' , ( ) => {
41+ cy . get ( '#navigation' ) . get ( 'button' ) . then ( tabs => {
42+ var workingtab = conf . tabs . userlist
43+ tabs [ workingtab . index ] . click ( )
44+ cy . get ( '#cypress-agile-local' ) . should ( 'not.exist' )
45+ } )
46+ cy . get ( '#navigation' ) . get ( 'button' ) . then ( tabs => {
47+ var workingtab = conf . tabs . userlist
48+ tabs [ workingtab . index ] . click ( )
49+ var regex = new RegExp ( workingtab . path . replace ( / : [ a - z A - Z ] * / , '.*' ) )
50+ cy . url ( ) . should ( 'match' , regex )
51+ cy . wait ( 1500 )
52+ cy . get ( '.container--app' ) . get ( 'a' ) . then ( viewbuttons => {
53+ viewbuttons [ viewbuttons . length - 1 ] . click ( )
54+ cy . location ( 'pathname' ) . should ( 'eq' , conf . views . addUser . path )
55+ cy . get ( '#root_user_name' ) . type ( 'cypress' )
56+ cy . get ( '#root_auth_type' ) . select ( 'agile-local' )
57+ cy . get ( '#root_password' ) . type ( 'secret' )
58+ cy . get ( '#root_role' ) . select ( 'admin' )
59+ cy . get ( 'button[type="submit"]' ) . click ( )
60+ cy . wait ( 3000 )
61+ } )
62+ } )
63+ cy . get ( '#navigation' ) . get ( 'button' ) . then ( tabs => {
64+ var workingtab = conf . tabs . userlist
65+ tabs [ workingtab . index ] . click ( )
66+ cy . get ( '#cypress-agile-local' ) . should ( 'exist' )
67+ cy . get ( '#delete_cypress-agile-local' ) . click ( )
68+ cy . wait ( 3000 )
69+ cy . get ( '#cypress-agile-local' ) . should ( 'not.exist' )
70+ } )
71+ } )
72+
4073 it ( 'Add and update attribute to own user entity and delete it' , ( ) => {
4174 cy . get ( '#navigation' ) . get ( 'button' ) . then ( tabs => {
4275 var workingtab = conf . tabs . profile
0 commit comments