|
Aurore
A Switch-like interface for your app, on every screen
|
#include <aurore/test/harness.hpp>
Public Member Functions | |
| Harness (Options options=Options()) | |
| ~Harness () | |
| Harness (const Harness &)=delete | |
| Harness & | operator= (const Harness &)=delete |
| const Options & | options () const |
| HeadlessPlatform * | platform () |
| void | push (Activity *activity, TransitionAnimation animation=TransitionAnimation::NONE) |
| Activity * | top () |
| View * | find (const std::string &id) |
| void | step (int count=1) |
| void | advance (double ms) |
| bool | settle (double maxMs=5000) |
| Time | now () const |
| uint64_t | frameCount () const |
| void | press (ControllerButton button) |
| void | release (ControllerButton button) |
| void | tap (ControllerButton button, int times=1) |
| void | hold (ControllerButton button, double ms) |
| void | setAxis (ControllerAxis axis, float value) |
| void | pressKey (AuroreKeyboardScancode key) |
| void | releaseKey (AuroreKeyboardScancode key) |
| void | tapKey (AuroreKeyboardScancode key, int times=1) |
| void | touchDown (float x, float y, int finger=0) |
| void | touchMove (float x, float y, int finger=0) |
| void | touchUp (int finger=0) |
| void | tapAt (float x, float y) |
| bool | tapView (View *view) |
| void | swipe (float fromX, float fromY, float toX, float toY, double ms=200) |
| void | mouseMove (float x, float y) |
| void | mouseClick (float x, float y) |
| void | mouseQuickClick (float x, float y) |
| void | mouseScroll (float dx, float dy) |
| void | setKeyboardAnswer (const std::string &text) |
| View * | focus () |
| std::string | focusText () |
| const std::vector< std::string > & | focusLog () const |
| void | clearFocusLog () |
| bool | focusByText (const std::string &text, ControllerButton button=BUTTON_DOWN, int maxSteps=30) |
| std::vector< std::string > | cutTexts () |
| std::vector< std::string > | texts () |
| bool | hasText (const std::string &text) |
| View * | findText (const std::string &text) |
| std::vector< std::string > | silentFocusables () |
| Image | screenshot () |
| bool | matchesReference (const std::string &name, int tolerance=8, double maxRatio=0.001) |
| bool | matchesReference (const std::string &name, const Rect &area, int tolerance=8, double maxRatio=0.001) |
| const ImageDiff & | lastDiff () const |
| void | resize (int width, int height) |
| aurore::test::Harness::~Harness | ( | ) |
|
delete |
| void aurore::test::Harness::advance | ( | double | ms | ) |
|
inline |
| std::vector< std::string > aurore::test::Harness::cutTexts | ( | ) |
| View * aurore::test::Harness::find | ( | const std::string & | id | ) |
| View * aurore::test::Harness::findText | ( | const std::string & | text | ) |
| View * aurore::test::Harness::focus | ( | ) |
| bool aurore::test::Harness::focusByText | ( | const std::string & | text, |
| ControllerButton | button = BUTTON_DOWN, |
||
| int | maxSteps = 30 |
||
| ) |
|
inline |
| std::string aurore::test::Harness::focusText | ( | ) |
|
inline |
| bool aurore::test::Harness::hasText | ( | const std::string & | text | ) |
| void aurore::test::Harness::hold | ( | ControllerButton | button, |
| double | ms | ||
| ) |
|
inline |
| bool aurore::test::Harness::matchesReference | ( | const std::string & | name, |
| const Rect & | area, | ||
| int | tolerance = 8, |
||
| double | maxRatio = 0.001 |
||
| ) |
| bool aurore::test::Harness::matchesReference | ( | const std::string & | name, |
| int | tolerance = 8, |
||
| double | maxRatio = 0.001 |
||
| ) |
| void aurore::test::Harness::mouseClick | ( | float | x, |
| float | y | ||
| ) |
| void aurore::test::Harness::mouseMove | ( | float | x, |
| float | y | ||
| ) |
| void aurore::test::Harness::mouseQuickClick | ( | float | x, |
| float | y | ||
| ) |
| void aurore::test::Harness::mouseScroll | ( | float | dx, |
| float | dy | ||
| ) |
| Time aurore::test::Harness::now | ( | ) | const |
|
inline |
|
inline |
| void aurore::test::Harness::press | ( | ControllerButton | button | ) |
| void aurore::test::Harness::pressKey | ( | AuroreKeyboardScancode | key | ) |
| void aurore::test::Harness::push | ( | Activity * | activity, |
| TransitionAnimation | animation = TransitionAnimation::NONE |
||
| ) |
| void aurore::test::Harness::release | ( | ControllerButton | button | ) |
| void aurore::test::Harness::releaseKey | ( | AuroreKeyboardScancode | key | ) |
| void aurore::test::Harness::resize | ( | int | width, |
| int | height | ||
| ) |
| Image aurore::test::Harness::screenshot | ( | ) |
| void aurore::test::Harness::setAxis | ( | ControllerAxis | axis, |
| float | value | ||
| ) |
| void aurore::test::Harness::setKeyboardAnswer | ( | const std::string & | text | ) |
| bool aurore::test::Harness::settle | ( | double | maxMs = 5000 | ) |
| std::vector< std::string > aurore::test::Harness::silentFocusables | ( | ) |
| void aurore::test::Harness::step | ( | int | count = 1 | ) |
| void aurore::test::Harness::swipe | ( | float | fromX, |
| float | fromY, | ||
| float | toX, | ||
| float | toY, | ||
| double | ms = 200 |
||
| ) |
| void aurore::test::Harness::tap | ( | ControllerButton | button, |
| int | times = 1 |
||
| ) |
| void aurore::test::Harness::tapAt | ( | float | x, |
| float | y | ||
| ) |
| void aurore::test::Harness::tapKey | ( | AuroreKeyboardScancode | key, |
| int | times = 1 |
||
| ) |
| bool aurore::test::Harness::tapView | ( | View * | view | ) |
| std::vector< std::string > aurore::test::Harness::texts | ( | ) |
| Activity * aurore::test::Harness::top | ( | ) |
| void aurore::test::Harness::touchDown | ( | float | x, |
| float | y, | ||
| int | finger = 0 |
||
| ) |
| void aurore::test::Harness::touchMove | ( | float | x, |
| float | y, | ||
| int | finger = 0 |
||
| ) |
| void aurore::test::Harness::touchUp | ( | int | finger = 0 | ) |