Flutter Engine
The Flutter Engine
testing
scenario_app
ios
Scenarios
ScenariosUITests
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>
9
#import "
GoldenTestManager.h
"
10
11
NS_ASSUME_NONNULL_BEGIN
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`.
31
- (void)
checkPlatformViewGolden
;
32
33
@end
34
35
NS_ASSUME_NONNULL_END
36
37
#endif
// FLUTTER_TESTING_SCENARIO_APP_IOS_SCENARIOS_SCENARIOSUITESTS_GOLDENPLATFORMVIEWTESTS_H_
NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_BEGIN
Definition:
FlutterMacros.h:19
NS_ASSUME_NONNULL_END
#define NS_ASSUME_NONNULL_END
Definition:
FlutterMacros.h:20
GoldenTestManager.h
GoldenPlatformViewTests
Definition:
GoldenPlatformViewTests.h:22
GoldenPlatformViewTests::application
XCUIApplication * application
Definition:
GoldenPlatformViewTests.h:23
-[GoldenPlatformViewTests checkPlatformViewGolden]
void checkPlatformViewGolden()
Definition:
GoldenPlatformViewTests.m:39
GoldenPlatformViewTests::rmseThreadhold
double rmseThreadhold
Definition:
GoldenPlatformViewTests.h:24
GoldenTestManager
Definition:
GoldenTestManager.h:22
Generated on Sun Jun 23 2024 21:55:19 for Flutter Engine by
1.9.4