VLCiOSTestMenu.swift 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*****************************************************************************
  2. * VLCiOSTestMenu.swift
  3. * VLC for iOSUITests
  4. *****************************************************************************
  5. * Copyright (c) 2018 VideoLAN. All rights reserved.
  6. * $Id$
  7. *
  8. * Authors: Mike JS. Choi <mkchoi212 # icloud.com>
  9. *
  10. * Refer to the COPYING file of the official project for license.
  11. *****************************************************************************/
  12. import Foundation
  13. import XCTest
  14. class VLCiOSTestMenu: XCTestCase {
  15. let app = XCUIApplication()
  16. var helper: TestHelper!
  17. override func setUp() {
  18. super.setUp()
  19. XCUIDevice.shared.orientation = .portrait
  20. setupSnapshot(app)
  21. helper = TestHelper(app)
  22. app.launch()
  23. }
  24. func testNavigationToAudioTab() {
  25. helper.tap(.Audio)
  26. XCTAssertNotNil(app.navigationBars[Tab.Audio.rawValue])
  27. }
  28. func testNavigationToNetworkTab() {
  29. helper.tap(.Server)
  30. XCTAssertNotNil(app.navigationBars[Tab.Server.rawValue])
  31. }
  32. func testNavigationToVideoTab() {
  33. helper.tap(.Video)
  34. XCTAssertNotNil(app.navigationBars[Tab.Video.rawValue])
  35. }
  36. func testNavigationToSettingsTab() {
  37. helper.tap(.Settings)
  38. XCTAssertNotNil(app.navigationBars[Tab.Settings.rawValue])
  39. }
  40. func testNavigationToCloudServices() {
  41. helper.tap(.Cloud)
  42. XCTAssertNotNil(app.navigationBars[Tab.Cloud.rawValue])
  43. }
  44. func testNavigationToDownloads() {
  45. helper.tap(.Downloads)
  46. XCTAssertNotNil(app.navigationBars[Tab.Downloads.rawValue])
  47. }
  48. func testNavigationToNetworkStream() {
  49. helper.tap(.Stream)
  50. XCTAssertNotNil(app.navigationBars[Tab.Stream.rawValue])
  51. }
  52. func testNavigationToAbout() {
  53. helper.tap(.About)
  54. XCTAssertNotNil(app.navigationBars[Tab.About.rawValue])
  55. }
  56. }