Skip to content

Commit

Permalink
Merge pull request #564 from smartdevicelink/bugfix/test-updates
Browse files Browse the repository at this point in the history
Fix failing tests and add artwork imagerpc clone test
  • Loading branch information
crokita authored Sep 27, 2022
2 parents c1d4d3c + 61faad3 commit 254ab94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions tests/managers/file/SdlFileTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,13 @@ module.exports = function (appClient) {
.setTemplateImage(true);
Validator.assertTrue(file.equals(file2));

// forcibly create the image rpc
file.getImageRPC();

const fileClone = file.clone();
Validator.assertTrue(file !== fileClone);
Validator.assertTrue(file.equals(file2));
Validator.assertNotEquals(file._imageRPC, fileClone._imageRPC);

fileClone.setName('something else');
fileClone.setFilePath('./goes_nowhere.txt');
Expand Down
8 changes: 4 additions & 4 deletions tests/managers/screen/TextAndGraphicUpdateOperationTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ module.exports = function (appClient) {
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());

versionStub.restore();
fileStub.restore();
Expand Down Expand Up @@ -1052,7 +1052,7 @@ module.exports = function (appClient) {
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());

versionStub.restore();
});
Expand Down Expand Up @@ -1097,7 +1097,7 @@ module.exports = function (appClient) {
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());

versionStub.restore();
});
Expand Down Expand Up @@ -1142,7 +1142,7 @@ module.exports = function (appClient) {
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());

versionStub.restore();
});
Expand Down

0 comments on commit 254ab94

Please sign in to comment.