From 42f5ce74d865dc86164361443935ec212682a878 Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Tue, 28 Jul 2020 13:57:24 -0700 Subject: [PATCH] Save current screenshot as attachment in scenarios test (flutter/engine#20090) --- .../ScenariosUITests/GoldenPlatformViewTests.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m b/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m index 4187abfe9e..261f93c17b 100644 --- a/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m +++ b/engine/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m @@ -59,11 +59,11 @@ static const NSInteger kSecondsToWaitForPlatformView = 30; } if (![golden compareGoldenToImage:screenshot.image]) { - XCTAttachment* goldenAttachment; - goldenAttachment = [XCTAttachment attachmentWithImage:golden.image]; - goldenAttachment.name = @"current_golden"; - goldenAttachment.lifetime = XCTAttachmentLifetimeKeepAlways; - [self addAttachment:goldenAttachment]; + XCTAttachment* screenshotAttachment; + screenshotAttachment = [XCTAttachment attachmentWithImage:screenshot.image]; + screenshotAttachment.name = golden.goldenName; + screenshotAttachment.lifetime = XCTAttachmentLifetimeKeepAlways; + [self addAttachment:screenshotAttachment]; XCTFail(@"Goldens to not match. Follow the steps in the " @"README to update golden named %@ if needed.",