@@ -58,9 +58,12 @@ describe('Change contexts via cd', function() {
58
58
doSwitch ( '..' , '/wsk' )
59
59
doSwitch ( './actions' , '/wsk/actions' )
60
60
doSwitch ( '..' , '/wsk' )
61
- doSwitch ( '..' , '/' )
61
+ // doSwitch('..', '/')
62
62
doSwitch ( '/wsk/triggers' , '/wsk/triggers' )
63
63
64
+ bogusSwitch ( '/' ) // disallow switching to /
65
+ bogusSwitch ( '/history' ) // disallow switching to /history, as it is a command handler not a subtree
66
+
64
67
doSwitch ( '/wsk/action' , '/wsk/actions' ) // test that we switch to /wsk/actions, even when asking to change to /wsk/action
65
68
bogusSwitch ( 'actions' ) // type 'actions' while in /wsk/actions, and expect error
66
69
doSwitch ( '/wsk/trigger' , '/wsk/triggers' ) // test that we switch to /wsk/triggers, even when asking to change to /wsk/trigger
@@ -86,9 +89,10 @@ describe('Change contexts via cd', function() {
86
89
. catch ( common . oops ( this ) ) )
87
90
88
91
sidecar . close ( this )
89
- doSwitch ( '../../' , '/' , undefined , actionName ) // actionName had better still be selected
90
- doSwitch ( 'wsk/rules' , '/wsk/rules' , undefined , actionName ) // actionName had better still be selected
91
- doSwitch ( '../..' , '/' , undefined , actionName ) // actionName had better still be selected
92
+ bogusSwitch ( '../../' ) // this would cd us to /, which is disallowed
93
+ //doSwitch('../../', '/', undefined, actionName) // actionName had better still be selected
94
+ // doSwitch('wsk/rules', '/wsk/rules', undefined, actionName) // actionName had better still be selected
95
+ //doSwitch('../..', '/', undefined, actionName) // actionName had better still be selected
92
96
93
97
bogusSwitch ( 'ffjdsjfioas990890890890' )
94
98
@@ -104,7 +108,7 @@ describe('Change contexts via cd', function() {
104
108
doSwitch ( '..' , '/wsk' , undefined , actionName ) // actionName had better still be selected
105
109
doSwitch ( 'actions' , '/wsk/actions' , undefined , actionName ) // actionName had better still be selected
106
110
doSwitch ( '..' , '/wsk' , undefined , actionName ) // actionName had better still be selected
107
- doSwitch ( '..' , '/' , undefined , actionName ) // actionName had better still be selected
108
- doSwitch ( 'wsk' , '/wsk' , undefined , actionName ) // actionName had better still be selected
111
+ // doSwitch('..', '/', undefined, actionName) // actionName had better still be selected
112
+ // doSwitch('wsk', '/wsk', undefined, actionName) // actionName had better still be selected
109
113
bogusSwitch ( 'ufdufdasufdsa' , undefined , actionName ) // actionName had better still be selected
110
114
} )
0 commit comments