diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2021-08-05 11:39:48 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2021-08-05 11:39:48 -0400 |
commit | aa04b9c5766547aa37dd5d6df8875ab7b8b3f737 (patch) | |
tree | 99242fab05d9e8f69155d1a91e3077067c12c23b /SmartDeviceLinkTests/DevAPISpecs | |
parent | e13e06038e5152b7a6560842d987d841a70b0fdd (diff) | |
download | sdl_ios-aa04b9c5766547aa37dd5d6df8875ab7b8b3f737.tar.gz |
Update tests for changes
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs')
5 files changed, 51 insertions, 43 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuConfigurationUpdateOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuConfigurationUpdateOperationSpec.m index 1f199b58e..78bb19aeb 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuConfigurationUpdateOperationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuConfigurationUpdateOperationSpec.m @@ -25,28 +25,26 @@ describe(@"a menu configuration update operation", ^{ SDLMenuConfiguration *testMenuConfiguration = [[SDLMenuConfiguration alloc] initWithMainMenuLayout:SDLMenuLayoutList defaultSubmenuLayout:SDLMenuLayoutTiles]; __block SDLMenuConfigurationUpdatedBlock testUpdatedBlock = nil; - __block SDLMenuConfiguration *updatedBlockMenuConfiguration = nil; + __block SDLMenuConfiguration *resultMenuConfiguration = nil; + __block NSError *resultError = nil; beforeEach(^{ testConnectionManager = [[TestConnectionManager alloc] init]; testFileManager = OCMClassMock([SDLFileManager class]); - testWindowCapability = nil; + testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:nil imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:@[] dynamicUpdateCapabilities:nil keyboardCapabilities:nil]; - updatedBlockMenuConfiguration = nil; - testUpdatedBlock = ^(SDLMenuConfiguration *newConfiguration) { - updatedBlockMenuConfiguration = newConfiguration; + resultMenuConfiguration = nil; + resultError = nil; + testUpdatedBlock = ^(SDLMenuConfiguration *newConfiguration, NSError *_Nullable error) { + resultMenuConfiguration = newConfiguration; + resultError = error; }; }); // when the layout check fails describe(@"when the layout check fails", ^{ - // when there are no known menu layouts context(@"when there are no known menu layouts", ^{ - beforeEach(^{ - testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:nil imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:@[] dynamicUpdateCapabilities:nil]; - }); - it(@"should return an error and finish", ^{ testOp = [[SDLMenuConfigurationUpdateOperation alloc] initWithConnectionManager:testConnectionManager windowCapability:testWindowCapability newMenuConfiguration:testMenuConfiguration configurationUpdatedHandler:testUpdatedBlock]; [testOp start]; @@ -54,14 +52,14 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).toNot(beNil()); expect(testConnectionManager.receivedRequests).to(beEmpty()); expect(testOp.isFinished).to(beTrue()); - expect(updatedBlockMenuConfiguration).to(beNil()); + expect(resultMenuConfiguration).to(beNil()); }); }); // when the set main menu layout is not available context(@"when the set main menu layout is not available", ^{ beforeEach(^{ - testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:nil imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:@[SDLMenuLayoutTiles] dynamicUpdateCapabilities:nil]; + testWindowCapability.menuLayoutsAvailable = @[SDLMenuLayoutTiles]; }); it(@"should return an error and finish", ^{ @@ -71,14 +69,14 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).toNot(beNil()); expect(testConnectionManager.receivedRequests).to(beEmpty()); expect(testOp.isFinished).to(beTrue()); - expect(updatedBlockMenuConfiguration).to(beNil()); + expect(resultMenuConfiguration).to(beNil()); }); }); // when the set default submenu layout is not available context(@"when the set default submenu layout is not available", ^{ beforeEach(^{ - testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:nil imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:@[SDLMenuLayoutList] dynamicUpdateCapabilities:nil]; + testWindowCapability.menuLayoutsAvailable = @[SDLMenuLayoutList]; }); it(@"should return an error and finish", ^{ @@ -88,7 +86,7 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).toNot(beNil()); expect(testConnectionManager.receivedRequests).to(beEmpty()); expect(testOp.isFinished).to(beTrue()); - expect(updatedBlockMenuConfiguration).to(beNil()); + expect(resultMenuConfiguration).to(beNil()); }); }); }); @@ -98,7 +96,7 @@ describe(@"a menu configuration update operation", ^{ __block SDLSetGlobalPropertiesResponse *response = [[SDLSetGlobalPropertiesResponse alloc] init]; beforeEach(^{ - testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:nil imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:@[SDLMenuLayoutList, SDLMenuLayoutTiles] dynamicUpdateCapabilities:nil]; + testWindowCapability.menuLayoutsAvailable = @[SDLMenuLayoutList, SDLMenuLayoutTiles]; testOp = [[SDLMenuConfigurationUpdateOperation alloc] initWithConnectionManager:testConnectionManager windowCapability:testWindowCapability newMenuConfiguration:testMenuConfiguration configurationUpdatedHandler:testUpdatedBlock]; [testOp start]; @@ -109,7 +107,8 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).to(beNil()); expect(testConnectionManager.receivedRequests).toNot(beEmpty()); expect(testOp.isFinished).to(beFalse()); - expect(updatedBlockMenuConfiguration).to(beNil()); + expect(resultMenuConfiguration).to(beNil()); + expect(resultError).to(beNil()); SDLSetGlobalProperties *receivedSGP = (SDLSetGlobalProperties *)testConnectionManager.receivedRequests[0]; expect(receivedSGP.menuLayout).to(equal(testMenuConfiguration.mainMenuLayout)); @@ -128,7 +127,7 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).toNot(beNil()); expect(testConnectionManager.receivedRequests).toNot(beEmpty()); expect(testOp.isFinished).to(beTrue()); - expect(updatedBlockMenuConfiguration).to(beNil()); + expect(resultMenuConfiguration).to(beNil()); }); }); @@ -145,7 +144,7 @@ describe(@"a menu configuration update operation", ^{ expect(testOp.error).to(beNil()); expect(testConnectionManager.receivedRequests).toNot(beEmpty()); expect(testOp.isFinished).to(beTrue()); - expect(updatedBlockMenuConfiguration).to(equal(testMenuConfiguration)); + expect(resultMenuConfiguration).to(equal(testMenuConfiguration)); }); }); }); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m index d7533c526..88d1e325c 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuManagerSpec.m @@ -49,8 +49,8 @@ describe(@"menu manager", ^{ __block SDLMenuCell *submenuCell = nil; beforeEach(^{ - textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; - submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Test 3" icon:nil submenuLayout:nil subCells:@[textOnlyCell]]; + textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Test 3" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil submenuLayout:nil subCells:@[textOnlyCell]]; testMenuConfiguration = [[SDLMenuConfiguration alloc] initWithMainMenuLayout:SDLMenuLayoutTiles defaultSubmenuLayout:SDLMenuLayoutList]; @@ -156,8 +156,8 @@ describe(@"menu manager", ^{ // containing duplicate VR commands context(@"containing duplicate VR commands", ^{ - __block SDLMenuCell *textAndVRCell1 = [[SDLMenuCell alloc] initWithTitle:@"Test 1" icon:nil voiceCommands:@[@"Cat", @"Turtle"] handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; - __block SDLMenuCell *textAndVRCell2 = [[SDLMenuCell alloc] initWithTitle:@"Test 3" icon:nil voiceCommands:@[@"Cat", @"Dog"] handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + __block SDLMenuCell *textAndVRCell1 = [[SDLMenuCell alloc] initWithTitle:@"Test 1" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:@[@"Cat", @"Turtle"] handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + __block SDLMenuCell *textAndVRCell2 = [[SDLMenuCell alloc] initWithTitle:@"Test 3" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:@[@"Cat", @"Dog"] handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; it(@"should fail when menu items have duplicate vr commands", ^{ testManager.menuCells = @[textAndVRCell1, textAndVRCell2]; @@ -353,7 +353,7 @@ describe(@"menu manager", ^{ // on a main menu cell context(@"on a main menu cell", ^{ beforeEach(^{ - cellWithHandler = [[SDLMenuCell alloc] initWithTitle:@"Hello" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { + cellWithHandler = [[SDLMenuCell alloc] initWithTitle:@"Hello" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { cellCalled = YES; testTriggerSource = triggerSource; }]; @@ -377,12 +377,12 @@ describe(@"menu manager", ^{ // on a submenu menu cell context(@"on a submenu menu cell", ^{ beforeEach(^{ - cellWithHandler = [[SDLMenuCell alloc] initWithTitle:@"Hello" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { + cellWithHandler = [[SDLMenuCell alloc] initWithTitle:@"Hello" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { cellCalled = YES; testTriggerSource = triggerSource; }]; - SDLMenuCell *submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Submenu" icon:nil submenuLayout:SDLMenuLayoutTiles subCells:@[cellWithHandler]]; + SDLMenuCell *submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Submenu" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil submenuLayout:SDLMenuLayoutTiles subCells:@[cellWithHandler]]; testManager.menuCells = @[submenuCell]; }); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m index 5eea34c80..037f2f9cb 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceOperationSpec.m @@ -51,11 +51,11 @@ describe(@"a menu replace operation", ^{ testArtwork3 = [[SDLArtwork alloc] initWithData:[@"Test data 3" dataUsingEncoding:NSUTF8StringEncoding] name:@"some artwork name" fileExtension:@"png" persistent:NO]; testArtwork3.overwrite = YES; - textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; - textAndImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 2" icon:testArtwork voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; - submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Test 3" icon:nil submenuLayout:nil subCells:@[textOnlyCell, textAndImageCell]]; - submenuImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 4" icon:testArtwork2 submenuLayout:SDLMenuLayoutTiles subCells:@[textOnlyCell]]; - textOnlyCell2 = [[SDLMenuCell alloc] initWithTitle:@"Test 5" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + textOnlyCell = [[SDLMenuCell alloc] initWithTitle:@"Test 1" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + textAndImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 2" secondaryText:nil tertiaryText:nil icon:testArtwork secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; + submenuCell = [[SDLMenuCell alloc] initWithTitle:@"Test 3" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil submenuLayout:nil subCells:@[textOnlyCell, textAndImageCell]]; + submenuImageCell = [[SDLMenuCell alloc] initWithTitle:@"Test 4" secondaryText:nil tertiaryText:nil icon:testArtwork2 secondaryArtwork:nil submenuLayout:SDLMenuLayoutTiles subCells:@[textOnlyCell]]; + textOnlyCell2 = [[SDLMenuCell alloc] initWithTitle:@"Test 5" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}]; addCommandSuccessResponse = [[SDLAddCommandResponse alloc] init]; addCommandSuccessResponse.success = @YES; @@ -67,7 +67,7 @@ describe(@"a menu replace operation", ^{ SDLImageField *commandImageField = [[SDLImageField alloc] initWithName:SDLImageFieldNameCommandIcon imageTypeSupported:@[SDLFileTypePNG] imageResolution:nil]; SDLImageField *submenuImageField = [[SDLImageField alloc] initWithName:SDLImageFieldNameSubMenuIcon imageTypeSupported:@[SDLFileTypePNG] imageResolution:nil]; - testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:@[commandImageField, submenuImageField] imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:nil dynamicUpdateCapabilities:nil]; + testWindowCapability = [[SDLWindowCapability alloc] initWithWindowID:@0 textFields:nil imageFields:@[commandImageField, submenuImageField] imageTypeSupported:nil templatesAvailable:nil numCustomPresetsAvailable:nil buttonCapabilities:nil softButtonCapabilities:nil menuLayoutsAvailable:nil dynamicUpdateCapabilities:nil keyboardCapabilities:nil]; testMenuConfiguration = [[SDLMenuConfiguration alloc] initWithMainMenuLayout:SDLMenuLayoutList defaultSubmenuLayout:SDLMenuLayoutList]; testCurrentMenu = @[]; testNewMenu = nil; @@ -114,7 +114,7 @@ describe(@"a menu replace operation", ^{ OCMStub([testFileManager fileNeedsUpload:[OCMArg any]]).andReturn(NO); }); - fit(@"should properly send the RPCs and finish the operation", ^{ + it(@"should properly send the RPCs and finish the operation", ^{ testOp = [[SDLMenuReplaceOperation alloc] initWithConnectionManager:testConnectionManager fileManager:testFileManager windowCapability:testWindowCapability menuConfiguration:testMenuConfiguration currentMenu:testCurrentMenu updatedMenu:testNewMenu compatibilityModeEnabled:YES currentMenuUpdatedHandler:testCurrentMenuUpdatedBlock]; [testOp start]; diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceUtilitiesSpecHelpers.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceUtilitiesSpecHelpers.m index 7537dec28..f34f720b3 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceUtilitiesSpecHelpers.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuReplaceUtilitiesSpecHelpers.m @@ -16,16 +16,19 @@ + (NSArray<SDLMenuCell *> *)topLevelMenuOnly { NSData *cellArtData = [@"testart" dataUsingEncoding:NSUTF8StringEncoding]; NSData *cellArtData2 = [@"testart2" dataUsingEncoding:NSUTF8StringEncoding]; + SDLArtwork *artwork1 = [[SDLArtwork alloc] initWithData:cellArtData name:@"Test Art 1" fileExtension:@"png" persistent:NO]; + return @[ - [[SDLMenuCell alloc] initWithTitle:@"Item 1" icon:[[SDLArtwork alloc] initWithData:cellArtData name:@"Test Art 1" fileExtension:@"png" persistent:NO] voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], - [[SDLMenuCell alloc] initWithTitle:@"Item 2" icon:[[SDLArtwork alloc] initWithData:cellArtData2 name:@"Test Art 1" fileExtension:@"png" persistent:NO] voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], - [[SDLMenuCell alloc] initWithTitle:@"Item 3" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}] + [[SDLMenuCell alloc] initWithTitle:@"Item 1" secondaryText:nil tertiaryText:nil icon:artwork1 secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], + [[SDLMenuCell alloc] initWithTitle:@"Item 2" secondaryText:nil tertiaryText:nil icon:artwork1 secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], + [[SDLMenuCell alloc] initWithTitle:@"Item 3" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}] ]; } + (NSArray<SDLMenuCell *> *)deepMenu { NSData *cellArtData = [@"testart" dataUsingEncoding:NSUTF8StringEncoding]; NSData *cellArtData2 = [@"testart2" dataUsingEncoding:NSUTF8StringEncoding]; + SDLArtwork *artwork1 = [[SDLArtwork alloc] initWithData:cellArtData name:@"Test Art 1" fileExtension:@"png" persistent:NO]; NSArray<SDLMenuCell *> *subList1SubList1SubList1 = @[ ]; @@ -43,9 +46,9 @@ ]; return @[ - [[SDLMenuCell alloc] initWithTitle:@"Item 1" icon:[[SDLArtwork alloc] initWithData:cellArtData name:@"Test Art 1" fileExtension:@"png" persistent:NO] submenuLayout:nil subCells:subList1], - [[SDLMenuCell alloc] initWithTitle:@"Item 2" icon:[[SDLArtwork alloc] initWithData:cellArtData2 name:@"Test Art 1" fileExtension:@"png" persistent:NO] voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], - [[SDLMenuCell alloc] initWithTitle:@"Item 3" icon:nil submenuLayout:nil subCells:subList2] + [[SDLMenuCell alloc] initWithTitle:@"Item 1" secondaryText:nil tertiaryText:nil icon:artwork1 secondaryArtwork:nil submenuLayout:nil subCells:subList1], + [[SDLMenuCell alloc] initWithTitle:@"Item 2" secondaryText:nil tertiaryText:nil icon:artwork1 secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {}], + [[SDLMenuCell alloc] initWithTitle:@"Item 3" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil submenuLayout:nil subCells:subList2] ]; } diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuShowOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuShowOperationSpec.m index 60a8db2bf..ec8b8ef18 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLMenuShowOperationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLMenuShowOperationSpec.m @@ -19,9 +19,11 @@ QuickSpecBegin(SDLMenuShowOperationSpec) describe(@"the show menu operation", ^{ __block SDLMenuShowOperation *testOp = nil; __block TestConnectionManager *testConnectionManager = nil; + __block NSError *resultError = nil; beforeEach(^{ testConnectionManager = [[TestConnectionManager alloc] init]; + resultError = nil; }); afterEach(^{ @@ -31,7 +33,9 @@ describe(@"the show menu operation", ^{ // opening to the main menu context(@"opening to the main menu", ^{ beforeEach(^{ - testOp = [[SDLMenuShowOperation alloc] initWithConnectionManager:testConnectionManager toMenuCell:nil]; + testOp = [[SDLMenuShowOperation alloc] initWithConnectionManager:testConnectionManager toMenuCell:nil completionHandler:^(NSError * _Nullable error) { + resultError = error; + }]; [testOp start]; }); @@ -93,9 +97,11 @@ describe(@"the show menu operation", ^{ __block SDLMenuCell *openToCell = nil; __block SDLMenuCell *subcell = nil; beforeEach(^{ - subcell = [[SDLMenuCell alloc] initWithTitle:@"Subcell" icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { }]; - openToCell = [[SDLMenuCell alloc] initWithTitle:@"Test submenu" icon:nil submenuLayout:nil subCells:@[subcell]]; - testOp = [[SDLMenuShowOperation alloc] initWithConnectionManager:testConnectionManager toMenuCell:openToCell]; + subcell = [[SDLMenuCell alloc] initWithTitle:@"Subcell" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) { }]; + openToCell = [[SDLMenuCell alloc] initWithTitle:@"Test submenu" secondaryText:nil tertiaryText:nil icon:nil secondaryArtwork:nil submenuLayout:nil subCells:@[subcell]]; + testOp = [[SDLMenuShowOperation alloc] initWithConnectionManager:testConnectionManager toMenuCell:openToCell completionHandler:^(NSError * _Nullable error) { + resultError = error; + }]; [testOp start]; }); |