roku-test-automation
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -127,2 +127,3 @@ "use strict"; | ||
this.conditionallyAddDefaultNodeReferenceKey(args); | ||
args = this.breakOutFieldFromKeyPath(args); | ||
const match = args.match; | ||
@@ -135,6 +136,7 @@ if (match !== undefined) { | ||
else { | ||
// If it's not we take base and keyPath from the base and keyPath args | ||
// If it's not we take base and keyPath from the base, keyPath and field args | ||
args.match = { | ||
base: args.base, | ||
keyPath: args.keyPath, | ||
field: args.field, | ||
value: match | ||
@@ -160,3 +162,3 @@ }; | ||
args.retryTimeout = retryTimeout; | ||
const result = await this.sendRequest(ODC.RequestType.onFieldChangeOnce, this.breakOutFieldFromKeyPath(args), options); | ||
const result = await this.sendRequest(ODC.RequestType.onFieldChangeOnce, args, options); | ||
return result.json; | ||
@@ -163,0 +165,0 @@ } |
@@ -174,2 +174,4 @@ /// <reference types="node" /> | ||
export interface GetValueArgs extends BaseKeyPath { | ||
/** Allows supplying a keypath to a node and the field fpr that node separately to allow for better integration with an elements library */ | ||
field?: string; | ||
} | ||
@@ -299,3 +301,3 @@ export interface GetValuesArgs { | ||
} | ||
interface MatchObject extends BaseKeyPath { | ||
interface MatchObject extends GetValueArgs { | ||
/** If the match value is passed in then the observer will be fired when the field value equals to the value in match */ | ||
@@ -309,3 +311,3 @@ value: ComparableValueTypes; | ||
retryTimeout?: number; | ||
/** The field that we want to observe for changes on. If not supplied, the last part of `keyPath` will be */ | ||
/** The field that we want to observe for changes on. If not supplied, the last part of `keyPath` will be used */ | ||
field?: string; | ||
@@ -312,0 +314,0 @@ /** If provided will only return when this matches (including if it already equals that value) */ |
{ | ||
"name": "roku-test-automation", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "Helps with automating functional tests", | ||
@@ -5,0 +5,0 @@ "main": "client/dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
430284
5519