VLCiOSTestMenu.swift 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.tapTabBarItem(.Audio)
  26. XCTAssertNotNil(app.navigationBars[Tab.Audio.rawValue])
  27. }
  28. func testNavigationToNetworkTab() {
  29. helper.tapTabBarItem(.LocalNetwork)
  30. XCTAssertNotNil(app.navigationBars[Tab.LocalNetwork.rawValue])
  31. }
  32. func testNavigationToVideoTab() {
  33. helper.tapTabBarItem(.Video)
  34. XCTAssertNotNil(app.navigationBars[Tab.Video.rawValue])
  35. }
  36. func testNavigationToSettingsTab() {
  37. helper.tapTabBarItem(.Settings)
  38. XCTAssertNotNil(app.navigationBars[Tab.Settings.rawValue])
  39. }
  40. func testNavigationToCloudServices() {
  41. helper.tapTabBarItem(.Cloud)
  42. XCTAssertNotNil(app.navigationBars[Tab.Cloud.rawValue])
  43. }
  44. func testNavigationToDownloads() {
  45. helper.tapTabBarItem(.LocalNetwork)
  46. app.cells["Downloads"].tap()
  47. XCTAssertNotNil(app.navigationBars[Tab.Downloads.rawValue])
  48. }
  49. func testNavigationToNetworkStream() {
  50. helper.tapTabBarItem(.LocalNetwork)
  51. app.cells["Stream"].tap()
  52. XCTAssertNotNil(app.navigationBars[Tab.Stream.rawValue])
  53. }
  54. func testNavigationToAbout() {
  55. helper.tapTabBarItem(.Settings)
  56. app.cells["About"].tap()
  57. XCTAssertNotNil(app.navigationBars[Tab.About.rawValue])
  58. }
  59. }