TestHelper.swift 801 B

1234567891011121314151617181920212223242526272829303132
  1. /*****************************************************************************
  2. * TestHelper.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. enum Tab: String {
  15. case Video, Audio, Server, Cloud
  16. case Settings, Downloads, Stream, About
  17. }
  18. struct TestHelper {
  19. let app: XCUIApplication
  20. init(_ app: XCUIApplication) {
  21. self.app = app
  22. }
  23. func tap(_ type: Tab) {
  24. app.tabBars.buttons[type.rawValue].tap()
  25. }
  26. }