@mighty-justice/tester
Advanced tools
Comparing version 1.2.3 to 1.3.0
@@ -357,2 +357,13 @@ 'use strict'; | ||
}, { | ||
key: "checkBox", | ||
value: function checkBox(selector) { | ||
var checked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
var component = this.getComponent(selector); | ||
component.simulate('change', { | ||
target: { | ||
checked: checked | ||
} | ||
}); | ||
} | ||
}, { | ||
key: "click", | ||
@@ -359,0 +370,0 @@ value: function click(selector) { |
@@ -29,3 +29,3 @@ import React from 'react'; | ||
text(): any; | ||
find(selector: string): any; | ||
find(selector: string | ComponentClass): any; | ||
update(): any; | ||
@@ -36,2 +36,3 @@ sleep(ms?: number): Promise<void>; | ||
changeInput(selector: ISelectArg, value: string): void; | ||
checkBox(selector: ISelectArg, checked?: boolean): void; | ||
click(selector: ISelectArg): void; | ||
@@ -38,0 +39,0 @@ submit(selector?: ISelectArg): Promise<void>; |
@@ -350,2 +350,13 @@ import React, { Fragment } from 'react'; | ||
}, { | ||
key: "checkBox", | ||
value: function checkBox(selector) { | ||
var checked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
var component = this.getComponent(selector); | ||
component.simulate('change', { | ||
target: { | ||
checked: checked | ||
} | ||
}); | ||
} | ||
}, { | ||
key: "click", | ||
@@ -352,0 +363,0 @@ value: function click(selector) { |
@@ -356,2 +356,13 @@ (function (global, factory) { | ||
}, { | ||
key: "checkBox", | ||
value: function checkBox(selector) { | ||
var checked = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
var component = this.getComponent(selector); | ||
component.simulate('change', { | ||
target: { | ||
checked: checked | ||
} | ||
}); | ||
} | ||
}, { | ||
key: "click", | ||
@@ -358,0 +369,0 @@ value: function click(selector) { |
{ | ||
"name": "@mighty-justice/tester", | ||
"version": "1.2.3", | ||
"version": "1.3.0", | ||
"description": "Bootstrap your tests!", | ||
@@ -5,0 +5,0 @@ "main": "dist/tester.cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
150374
1935