Add name to the XCTAttachments in the scenario test app (flutter/engine#17355)

This commit is contained in:
Emmanuel Garcia 2020-03-27 13:10:39 -07:00 committed by GitHub
parent 3aace8df56
commit e7798e90f4

View File

@ -49,11 +49,13 @@ static const NSInteger kSecondsToWaitForPlatformView = 30;
XCUIScreenshot* screenshot = [[XCUIScreen mainScreen] screenshot];
XCTAttachment* attachment = [XCTAttachment attachmentWithScreenshot:screenshot];
attachment.name = @"new_golden";
attachment.lifetime = XCTAttachmentLifetimeKeepAlways;
[self addAttachment:attachment];
if (golden.image) {
XCTAttachment* goldenAttachment = [XCTAttachment attachmentWithImage:golden.image];
attachment.name = @"current_golden";
goldenAttachment.lifetime = XCTAttachmentLifetimeKeepAlways;
[self addAttachment:goldenAttachment];
} else {