Skip to content

Commit 254ab94

Browse files
authored
Merge pull request #564 from smartdevicelink/bugfix/test-updates
Fix failing tests and add artwork imagerpc clone test
2 parents c1d4d3c + 61faad3 commit 254ab94

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

tests/managers/file/SdlFileTests.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,13 @@ module.exports = function (appClient) {
7171
.setTemplateImage(true);
7272
Validator.assertTrue(file.equals(file2));
7373

74+
// forcibly create the image rpc
75+
file.getImageRPC();
76+
7477
const fileClone = file.clone();
7578
Validator.assertTrue(file !== fileClone);
7679
Validator.assertTrue(file.equals(file2));
80+
Validator.assertNotEquals(file._imageRPC, fileClone._imageRPC);
7781

7882
fileClone.setName('something else');
7983
fileClone.setFilePath('./goes_nowhere.txt');

tests/managers/screen/TextAndGraphicUpdateOperationTests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ module.exports = function (appClient) {
10051005
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
10061006
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
10071007
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
1008-
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
1008+
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
10091009

10101010
versionStub.restore();
10111011
fileStub.restore();
@@ -1052,7 +1052,7 @@ module.exports = function (appClient) {
10521052
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
10531053
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
10541054
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
1055-
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
1055+
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
10561056

10571057
versionStub.restore();
10581058
});
@@ -1097,7 +1097,7 @@ module.exports = function (appClient) {
10971097
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
10981098
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
10991099
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
1100-
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
1100+
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
11011101

11021102
versionStub.restore();
11031103
});
@@ -1142,7 +1142,7 @@ module.exports = function (appClient) {
11421142
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField2Type());
11431143
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField3Type());
11441144
Validator.assertNull(textAndGraphicUpdateOperation._getCurrentScreenData().getTextField4Type());
1145-
Validator.assertEquals(configuration, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
1145+
Validator.assertEquals(configurationOld, textAndGraphicUpdateOperation._getCurrentScreenData().getTemplateConfiguration());
11461146

11471147
versionStub.restore();
11481148
});

0 commit comments

Comments
 (0)