Skip to content

Commit 51c4f33

Browse files
pietropizzirotemmiz
authored andcommitted
Fix Android atIndex matcher by fixing typo (wix#321)
1 parent eeb58d1 commit 51c4f33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

detox/src/android/expect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class MatcherAssertionInteraction extends Interaction {
155155
super();
156156
//if (!(element instanceof Element)) throw new Error(`MatcherAssertionInteraction ctor 1st argument must be a valid Element, got ${typeof element}`);
157157
//if (!(matcher instanceof Matcher)) throw new Error(`MatcherAssertionInteraction ctor 2nd argument must be a valid Matcher, got ${typeof matcher}`);
158-
// this._call = invoke.call(element._call, 'check', invoke.call(invoke.Android.Class(ViewAssertions), 'matches', matcher._call));
158+
// this._call = invoke.call(element._call, 'check', invoke.call(invoke.Android.Class(ViewAssertions), 'matches', matcher._call));
159159
this._call = invoke.call(invoke.Android.Class(DetoxAssertion), 'assertMatcher', element._call, matcher._call);
160160
// TODO: move this.execute() here from the caller
161161
}
@@ -218,7 +218,7 @@ class Element {
218218
atIndex(index) {
219219
if (typeof index !== 'number') throw new Error(`Element atIndex argument must be a number, got ${typeof index}`);
220220
const matcher = this._originalMatcher;
221-
this._originalMatcher._call = invoke.call(invoke.Android.Class(DetoxMatcher), 'matherForAtIndex', invoke.Android.Integer(index), matcher._call);
221+
this._originalMatcher._call = invoke.call(invoke.Android.Class(DetoxMatcher), 'matcherForAtIndex', invoke.Android.Integer(index), matcher._call);
222222
this._selectElementWithMatcher(this._originalMatcher);
223223
return this;
224224
}

0 commit comments

Comments
 (0)