Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
GoldenPlatformViewTests.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENPLATFORMVIEWTESTS_H_
6#define FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENPLATFORMVIEWTESTS_H_
7
8#import <XCTest/XCTest.h>
10
12
13// The base class of all the PlatformView golden tests.
14//
15// A new PlatformView golden tests can subclass this and override the `-initiWithInvocation:`
16// method, which then retun the `-initWithManager:invocation:`
17//
18// Then in any test method, call `checkPlatformViewGolden` to perform the golden test.
19//
20// This base class doesn't run any test case on its own.
21@interface GoldenPlatformViewTests : XCTestCase
22
23@property(nonatomic, strong) XCUIApplication* application;
24@property(nonatomic, assign) double rmseThreadhold;
25
26// Initialize with a `GoldenTestManager`.
27- (instancetype)initWithManager:(GoldenTestManager*)manager invocation:(NSInvocation*)invocation;
28
29// Take a sceenshot of the test app and check it has the same pixels with goldenImage inside the
30// `GoldenTestManager`.
32
33@end
34
36
37#endif // FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENPLATFORMVIEWTESTS_H_
#define NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_END