FBIntegrationTestCase.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Copyright (c) 2015-present, Facebook, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. */
  9. #import <XCTest/XCTest.h>
  10. extern NSString *const FBShowAlertButtonName;
  11. extern NSString *const FBShowSheetAlertButtonName;
  12. extern NSString *const FBShowAlertForceTouchButtonName;
  13. extern NSString *const FBTouchesCountLabelIdentifier;
  14. extern NSString *const FBTapsCountLabelIdentifier;
  15. /**
  16. XCTestCase helper class used for integration tests
  17. */
  18. @interface FBIntegrationTestCase : XCTestCase
  19. @property (nonatomic, strong, readonly) XCUIApplication *testedApplication;
  20. @property (nonatomic, strong, readonly) XCUIApplication *springboard;
  21. /**
  22. Launches application and resets side effects of testing like orientation etc.
  23. */
  24. - (void)launchApplication;
  25. /**
  26. Navigates integration app to attributes page
  27. */
  28. - (void)goToAttributesPage;
  29. /**
  30. Navigates integration app to alerts page
  31. */
  32. - (void)goToAlertsPage;
  33. /**
  34. Navigates integration app to touch page
  35. */
  36. - (void)goToTouchPage;
  37. /**
  38. Navigates to SpringBoard first page
  39. */
  40. - (void)goToSpringBoardFirstPage;
  41. /**
  42. Navigates to SpringBoard path with Extras folder
  43. */
  44. - (void)goToSpringBoardExtras;
  45. /**
  46. Navigates to SpringBoard's dashboard
  47. */
  48. - (void)goToSpringBoardDashboard;
  49. /**
  50. Navigates integration app to scrolling page
  51. @param showCells whether should navigate to view with cell or plain scrollview
  52. */
  53. - (void)goToScrollPageWithCells:(BOOL)showCells;
  54. /**
  55. Verifies no alerts are present on the page.
  56. If an alert exists then it is going to be dismissed.
  57. */
  58. - (void)clearAlert;
  59. /**
  60. Resets device orientation to portrait mode
  61. */
  62. - (void)resetOrientation;
  63. @end