Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Detox Next (iOS, Phase 1) (wix#2098)
* initial ExpectTwo * Added API checks and error throwing * Proofing ExpectTwo * Changed test name * fix paths * Detox Next impl WIP * Update dependencies * Project reorg * WIP * Scroll, pinch, swipe * Better first responder management and logging * Control flow WIP * Implement control flow, while, get attributes Still need to implement: dtx_assertCanScrollWithOffset, use normal scroll actions for scroll to edge * Add support for text in RN “text” “views” * Assert ability to scroll If initial scroll started, stop once an edge is reached Modify assertion handler methods to receive an optional view, so that hierarchy can be extracted from it * User normal scroll for edge scrolling * Swift fixes for previous API changes * Update DTXLoggingInfra Support getAttributes action * Support timeouts in expectations Properly take into account modifiers in expectations * Enable asserts in release * Fix wrong conflict resolve * Invoke internals exporting. * Support attributed titles in picker views * Send invokeResult or testFailed when appropriate * Add DTXObjectiveCHelpers submodule * Support labels with RN hacks, use correct `atIndex`, fix predicate description * added by.type * ancestor/descendant inner type should be predicate, not value * Added not() modifier to protocol, closes wix#2056 * Added pinch(scale, speed, angle). closes wix#2053 * Fixes for actions and predicates * fixed pinch defaults and checks * Update expectTwo.js * Update expectTwo.js * fixed pinch defaults and checks * fixed pinch defaults and checks - again! * waitForWithTimeout now has a type `expectation` instead of `waitFor`. closes wix#2054 * Fixed test coverage * set default swipe percentage to 0.5 * Change default to 0.75 * Improvements to scrolling * Modify error stack so it displays the location in user’s test. * Further fixes to scrolling * Mark as Android * complete coverage * Even more scroll shenanigans * Improve visibility test to take into account a view’s alpha==0 * Support “ISO8601” as special case date format, and assert the date is parsed correctly * Support .not() for Android expectations in invoke1 * Support by.traits() * Update docs * modifier => modifiers array * Makes sure expectation termination works correctly in waitFor as well, closes wix#2063 * Change tap() to receive a point as optional input, closes wix#2066 * Update APIRef.ActionsOnElement.md * Update APIRef.ActionsOnElement.md * Update APIRef.ActionsOnElement.md * Remove code * Correctly use runloop spinner to allow runloop draining and use internal timeout * 🤦♂️ * Sort views when searching in specific hierarchy too * fixed merge issue(?) * Fixed waitFor.whileElement * Fix Swift nonsense * Remove legacy modifier and tapAtPoint support * Better handling of getAttributes * Fix predicate printing * Fix ancestor predicate logic * Add asynchronous versions of InvocationManager, Action and Expectation Remove usage of runloop spinner in expectations * Fix TraitsPredicate * Enable problematic test on iOS * Better wording on time out error * rename params in matchers * fixed element(by.x())).atIndex(). closes wix#2076 * Move setOrientation into its own action in iOS invoke2, closes wix#2055 * Expose methods for obtaining the assertion error directly * Convert DetoxManager, WebSocket into Swift Add nullability to shared ObjC code * Remove some unneeded @objc declarations Rename some classes to be more consistent with the project * Remove synchronous versions of actions, expectations and invocation manager Make scroll+while asynchronous Add Swift fatal error support in crash handler * Improve crash handler * Change some text in crash details * added getAttributes() action to iOS. closes wix#2075 * Improve attributes returned by getAttributes() Add documentation * Improvements to getAttributes() and docs * Docs & migration * Implement setOrientation in DetoxManager * Seconds/ms * Naming and linking * Use modern EG * Make crash handler functions C functions for readibility Ensure crash handler is initialized either by attribute constructor system or by Detox initializer itself. * Add some args for future testing * Fix picker view row selection logic Change test to reflect that setColumnToValue() no longer supports date pickers * Remove absolutely useless status bar test from suite toBeVisible() should be supported now in background * Enable locale and language test for iOS only * Build framework and test suite quietly * Add support for setting and expecting slider positions (wix#2089) * Support multiple matched elements with getAttributes() action * fixed setOrientation * Use ApproximateEquality from Swift Numerics to expect slider value Better predicate and expectation descriptions * Use custom symbolication for stack traces with Swift and C++ demangling support * Fix shake * add not() to Android matchers * Switched from .not() to .not (wix#2069) * Android tapAtPoint(point) is now tap(point) wix#2069 * .not instead of .not() * Use modern .not API * Remove only * Fix traits test + suite screen + logic * Fix existence checking logic * Remove unnecessary dtx_try nesting * Add missing dtx_try * Fixed iOS waitFor * Implement setSyncSettings for iOS * Fix Android .not support * Added setSyncSettings + removing all EarlGrey and iOS generated and generation code * MOAR Android .not fixes * Decrypt the DetoxSync framework in Profiler as well * Move example project label higher in hierarchy so it is visible * Set test suite as iOS 12.0+ * ... * Sync before attempting actions or expectations * Special case for UISegmentLabel tapping * Cleanup + fix unit tests * WTF * update generation snapshot * record videos for iOS (will it work on CI?) * Provide the date and date components if a view is UIDatePicker * New logic for visibility testing An image is taken for visible view around the hit point, and that image is tested for transparency. If a view is not transparent around the hit point, that is the visible view candidate. Visibility and hit testing also take into account stacked windows in the working scene. * Added adjustSliderToPosition() and toHaveSliderPosition() to iOS DetoxNext. closes wix#2089 * Finish slider position expectation implementation * Remove unused variable * Fix visTest * Add signposts for performance profiling * Abstract view actions from element actions Element now exposes all the API needed * Use modern tap(point) API disable tap(point) test on iOS * Add slider test * Send view hierarchy and other debug information to JS * Remove only * test: fix mock-server close * Fixed ActionScreen * Fix a few tests * fix uiDevice unit test * Disable view caching in element * Throw an error instead of crashing when trait is unknown * Only check in asl_error if level is ASL_LEVEL_ERR * Update docs * Docs * Use modern syntax for not.toBeVisible() * Latest DTXLoggingInfra [skip ci] * separate response.params.details from response.params.viewHierarchy in error log * Fixed Android waitFor * Fix unit test coverage * iOS: detox test --loglevel verbose * Use detox accessibility frame * Add more debug information for visible and hittable testing * Apply a small delay for UISwitch * Attempt to long press on switch rather than tap Add more description to errors * Remove videos * Android: split viewHierarchy from error log (but also switched "error" and "testFailed" events in DetoxActionHandler) * Xcode 12 nonsense * Fixed Android unit tests * Fixed faulty merge Co-authored-by: Rotem Mizrachi-Meidan <[email protected]> Co-authored-by: Leo Natan <[email protected]>
- Loading branch information