forked from flutter/plugins
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Delete flaky flutter_gallery XCUITest (#103666)" (#103726)
This reverts commit 145be18.
- Loading branch information
1 parent
145be18
commit 708c363
Showing
5 changed files
with
237 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright 2014 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:flutter_devicelab/framework/devices.dart'; | ||
import 'package:flutter_devicelab/framework/framework.dart'; | ||
import 'package:flutter_devicelab/framework/ios.dart'; | ||
import 'package:flutter_devicelab/framework/task_result.dart'; | ||
import 'package:flutter_devicelab/framework/utils.dart'; | ||
import 'package:path/path.dart' as path; | ||
|
||
Future<void> main() async { | ||
deviceOperatingSystem = DeviceOperatingSystem.ios; | ||
|
||
await task(() async { | ||
final String projectDirectory = '${flutterDirectory.path}/dev/integration_tests/flutter_gallery'; | ||
|
||
await inDirectory(projectDirectory, () async { | ||
section('Build clean'); | ||
|
||
await flutter('clean'); | ||
|
||
section('Build gallery app'); | ||
|
||
await flutter( | ||
'build', | ||
options: <String>[ | ||
'ios', | ||
'-v', | ||
'--release', | ||
'--config-only', | ||
], | ||
); | ||
}); | ||
|
||
section('Run platform unit tests'); | ||
|
||
final Device device = await devices.workingDevice; | ||
if (!await runXcodeTests( | ||
platformDirectory: path.join(projectDirectory, 'ios'), | ||
destination: 'id=${device.deviceId}', | ||
testName: 'native_ui_tests_ios', | ||
)) { | ||
return TaskResult.failure('Platform unit tests failed'); | ||
} | ||
|
||
return TaskResult.success(null); | ||
}); | ||
} |
26 changes: 26 additions & 0 deletions
26
dev/integration_tests/flutter_gallery/ios/GalleryUITests/GalleryUITests.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2014 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#import <XCTest/XCTest.h> | ||
|
||
@interface GalleryUITests : XCTestCase | ||
@property (strong) XCUIApplication *app; | ||
@end | ||
|
||
@implementation GalleryUITests | ||
|
||
- (void)setUp { | ||
self.continueAfterFailure = NO; | ||
|
||
XCUIApplication *app = [[XCUIApplication alloc] init]; | ||
[app launch]; | ||
self.app = app; | ||
} | ||
|
||
- (void)testLaunch { | ||
// Basic smoke test that the app launched and any element was loaded. | ||
XCTAssertTrue([self.app.otherElements.firstMatch waitForExistenceWithTimeout:60.0]); | ||
} | ||
|
||
@end |
22 changes: 22 additions & 0 deletions
22
dev/integration_tests/flutter_gallery/ios/GalleryUITests/Info.plist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>$(DEVELOPMENT_LANGUAGE)</string> | ||
<key>CFBundleExecutable</key> | ||
<string>$(EXECUTABLE_NAME)</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>$(PRODUCT_NAME)</string> | ||
<key>CFBundlePackageType</key> | ||
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleVersion</key> | ||
<string>1</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters