aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js
diff options
context:
space:
mode:
Diffstat (limited to 'example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js')
-rw-r--r--example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js b/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js
index 67510c74..1078b04b 100644
--- a/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js
+++ b/example/ios/iOS UI Test/iOS UI Test/MCOMessageViewScript.js
@@ -16,13 +16,14 @@ var findCIDImageURL = function() {
return JSON.stringify(imgLinks);
}
-var replaceImageSrc = function(original, local) {
+var replaceImageSrc = function(jsonString) {
+ var parsedJson = JSON.parse(jsonString);
var images = imageElements();
for (var i = 0; i < images.length; i++) {
var url = images[i].getAttribute('src');
- if (url.indexOf(original) == 0) {
- images[i].setAttribute('src', local);
+ if (url.indexOf(parsedJson.URLKey) == 0) {
+ images[i].setAttribute('src', parsedJson.LocalPathKey);
break;
}
}