Flutter Engine
The Flutter Engine
Instance Methods | Properties | List of all members
StatusBarTest Class Reference

#import <StatusBarTest.h>

Inheritance diagram for StatusBarTest:

Instance Methods

(void) - setUp [implementation]
 
(void) - testTapStatusBar [implementation]
 

Properties

XCUIApplication * application
 

Detailed Description

Definition at line 12 of file StatusBarTest.h.

Method Documentation

◆ setUp

- (void) setUp
implementation

Definition at line 1 of file StatusBarTest.m.

9 {
10 [super setUp];
11 self.continueAfterFailure = NO;
12
13 self.application = [[XCUIApplication alloc] init];
14 self.application.launchArguments = @[ @"--tap-status-bar" ];
15 [self.application launch];
16}

◆ testTapStatusBar

- (void) testTapStatusBar
implementation

Definition at line 1 of file StatusBarTest.m.

18 {
19 if (@available(iOS 13, *)) {
20 XCUIApplication* systemApp =
21 [[XCUIApplication alloc] initWithBundleIdentifier:@"com.apple.springboard"];
22 XCUIElement* statusBar = [systemApp.statusBars firstMatch];
23 if (statusBar.isHittable) {
24 [statusBar tap];
25 } else {
26 XCUICoordinate* coordinates = [statusBar coordinateWithNormalizedOffset:CGVectorMake(0, 0)];
27 [coordinates tap];
28 }
29 } else {
30 [[self.application.statusBars firstMatch] tap];
31 }
32
33 XCUIElement* addTextField =
34 self.application
35 .textFields[@"0,PointerChange.add,device=0,buttons=0,signalKind=PointerSignalKind.none"];
36 BOOL exists = [addTextField waitForExistenceWithTimeout:1];
37 XCTAssertTrue(exists, @"");
38 XCUIElement* downTextField =
39 self.application
40 .textFields[@"1,PointerChange.down,device=0,buttons=0,signalKind=PointerSignalKind.none"];
41 exists = [downTextField waitForExistenceWithTimeout:1];
42 XCTAssertTrue(exists, @"");
43 XCUIElement* upTextField =
44 self.application
45 .textFields[@"2,PointerChange.up,device=0,buttons=0,signalKind=PointerSignalKind.none"];
46 exists = [upTextField waitForExistenceWithTimeout:1];
47 XCTAssertTrue(exists, @"");
48}
int BOOL
Definition: windows_types.h:37

Property Documentation

◆ application

- (XCUIApplication*) application
readwritenonatomicstrong

Definition at line 13 of file StatusBarTest.h.


The documentation for this class was generated from the following files: