File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/components/cylc/cylcObject Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ export default {
239
239
}
240
240
},
241
241
isDisabled (mutation , authorised ) {
242
- if (((mutation ._validStates .indexOf (this .node .node .status )) === - 1 ) || ! authorised) {
242
+ if (((! mutation ._validStates .includes (this .node .node .status ))) || ! authorised) {
243
243
return true
244
244
}
245
245
return false
Original file line number Diff line number Diff line change @@ -63,16 +63,16 @@ describe('aotf (Api On The Fly)', () => {
63
63
it ( 'should add computed fields' , ( ) => {
64
64
const input = {
65
65
name : 'fooBar' ,
66
- description : 'Short description.\n\nLong\ndescription.\nValid for: [\' stopped\'] workflows.' ,
66
+ description : 'Short description.\n\nLong\ndescription.\nValid for: stopped workflows.' ,
67
67
args : [ ]
68
68
}
69
69
const output = {
70
70
...input ,
71
71
_title : 'Foo Bar' ,
72
72
_icon : aotf . mutationIcons [ '' ] ,
73
73
_shortDescription : 'Short description.' ,
74
- _help : 'Long\ndescription.\nValid for: [\' stopped\'] workflows.' ,
75
- _validStates : "[ 'stopped']"
74
+ _help : 'Long\ndescription.\nValid for: stopped workflows.' ,
75
+ _validStates : 'stopped'
76
76
}
77
77
aotf . processMutations ( [ input ] , null )
78
78
expect ( input ) . to . deep . equal ( output )
You can’t perform that action at this time.
0 commit comments