VLCiOSTestMenu.swift 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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(.Downloads)
  46. XCTAssertNotNil(app.navigationBars[Tab.Downloads.rawValue])
  47. }
  48. func testNavigationToNetworkStream() {
  49. helper.tapTabBarItem(.LocalNetwork)
  50. app.cells["Stream"].tap()
  51. XCTAssertNotNil(app.navigationBars[Tab.Stream.rawValue])
  52. }
  53. func testNavigationToAbout() {
  54. helper.tapTabBarItem(.Settings)
  55. app.cells["About"].tap()
  56. XCTAssertNotNil(app.navigationBars[Tab.About.rawValue])
  57. }
  58. }