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.",