|
@@ -19,7 +19,9 @@ class Screenshot: XCTestCase {
|
|
|
|
|
|
override func setUp() {
|
|
|
super.setUp()
|
|
|
-
|
|
|
+ app.launchEnvironment = [
|
|
|
+ "HOME" : "/Users/caro/Documents/Projects/vlc-ios/AppStoreData28June.xcappdata/AppData",
|
|
|
+ "CFFIXED_USER_HOME" : "/Users/caro/Documents/Projects/vlc-ios/AppStoreData28June.xcappdata/AppData"]
|
|
|
XCUIDevice.shared.orientation = .portrait
|
|
|
SDStatusBarManager.sharedInstance().enableOverrides()
|
|
|
setupSnapshot(app)
|
|
@@ -33,15 +35,14 @@ class Screenshot: XCTestCase {
|
|
|
}
|
|
|
|
|
|
func testCaptureVideoPlayback() {
|
|
|
- download(name: "http://jell.yfish.us/media/jellyfish-10-mbps-hd-h264.mkv")
|
|
|
helper.tapTabBarItem(VLCAccessibilityIdentifier.video)
|
|
|
- app.collectionViews.cells.element(boundBy: 0).tap()
|
|
|
-
|
|
|
+ app.collectionViews.cells.element(boundBy: 3).tap()
|
|
|
snapshot("playback")
|
|
|
}
|
|
|
|
|
|
func testCaptureAudioTab() {
|
|
|
helper.tapTabBarItem(VLCAccessibilityIdentifier.audio)
|
|
|
+ app.cells[VLCAccessibilityIdentifier.songs].tap()
|
|
|
snapshot("audio_tab")
|
|
|
}
|
|
|
|
|
@@ -49,22 +50,4 @@ class Screenshot: XCTestCase {
|
|
|
helper.tapTabBarItem(VLCAccessibilityIdentifier.video)
|
|
|
snapshot("video_tab")
|
|
|
}
|
|
|
-
|
|
|
- func download(name fileName: String) {
|
|
|
- helper.tapTabBarItem(VLCAccessibilityIdentifier.localNetwork)
|
|
|
- app.cells[VLCAccessibilityIdentifier.downloads].tap()
|
|
|
-
|
|
|
- let downloadTextfield = app.textFields["http://myserver.com/file.mkv"].firstMatch
|
|
|
- downloadTextfield.clearAndEnter(text: fileName)
|
|
|
- app.buttons["Download"].firstMatch.tap()
|
|
|
-
|
|
|
- XCTContext.runActivity(named: "Wait for download to complete") { _ in
|
|
|
- let cancelDownloadButton = app.buttons["flatDeleteButton"]
|
|
|
- let predicate = NSPredicate(format: "exists == 0")
|
|
|
- let downloadCompleted = expectation(for: predicate, evaluatedWith: cancelDownloadButton, handler: nil)
|
|
|
- wait(for: [downloadCompleted], timeout: 20.0)
|
|
|
- }
|
|
|
-
|
|
|
- downloadTextfield.typeText("\n")
|
|
|
- }
|
|
|
}
|