@@ -197,7 +197,6 @@ public void WhenControlSchemeIsSelected_SelectedControlSchemeIndexIsSet()
197
197
198
198
[ Test ]
199
199
[ Category ( "AssetEditor" ) ]
200
- [ Ignore ( "Instability ISX-1905" ) ]
201
200
public void WhenControlSchemeIsSelected_SelectedControlSchemeIsPopulatedWithSelection ( )
202
201
{
203
202
var asset = TestData . inputActionAsset
@@ -260,9 +259,29 @@ public void DuplicateControlSchemeCommand_CreatesCopyOfControlSchemeWithUniqueNa
260
259
Assert . That ( newState . selectedControlScheme . deviceRequirements , Is . EqualTo ( state . selectedControlScheme . deviceRequirements ) ) ;
261
260
}
262
261
262
+ [ Test ( Description = "Verifies that when duplicating Control Scheme ending on an Int it increments that Int and jumps already existing Int names" ) ]
263
+ [ Category ( "AssetEditor" ) ]
264
+ public void DuplicateControlSchemeCommand_CreatesCopyOfControlSchemeWithUniqueNameEndingOnIntJumpsExistingNumbers ( )
265
+ {
266
+ var asset = TestData . inputActionAsset . Generate ( ) ;
267
+
268
+ asset . AddControlScheme ( new InputControlScheme ( ( "Test" ) ) ) ;
269
+ asset . AddControlScheme ( new InputControlScheme ( ( "Test1" ) ) ) ;
270
+
271
+ //select "Test" Control Scheme
272
+ var state = TestData . EditorStateWithAsset ( asset ) . Generate ( ) . With ( selectedControlScheme : asset . controlSchemes [ 0 ] ) ;
273
+
274
+ state . serializedObject . Update ( ) ;
275
+
276
+ //duplicate "Test"
277
+ var newState = ControlSchemeCommands . DuplicateSelectedControlScheme ( ) ( in state ) ;
278
+
279
+ //duplicated Control Scheme should be names "Test2", skipping "Test1"
280
+ Assert . That ( newState . selectedControlScheme . name , Is . EqualTo ( "Test2" ) ) ;
281
+ }
282
+
263
283
[ Test ]
264
284
[ Category ( "AssetEditor" ) ]
265
- [ Ignore ( "Disabled: This should not be called in batch mode." ) ]
266
285
public void DeleteControlSchemeCommand_DeletesSelectedControlScheme ( )
267
286
{
268
287
var asset = TestData . inputActionAsset . WithControlScheme ( TestData . controlScheme . WithOptionalDevice ( ) ) . Generate ( ) ;
@@ -284,7 +303,6 @@ public void DeleteControlSchemeCommand_DeletesSelectedControlScheme()
284
303
[ TestCase ( 3 , 2 , 1 , "Test1" ) ]
285
304
[ TestCase ( 1 , 0 , - 1 , null ) ]
286
305
[ Category ( "AssetEditor" ) ]
287
- [ Ignore ( "Disabled: This should not be called in batch mode." ) ]
288
306
public void DeleteControlSchemeCommand_SelectsAnotherControlSchemeAfterDelete (
289
307
int controlSchemeCount ,
290
308
int selectedControlSchemeIndex ,
0 commit comments