mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 06:55:08 -04:00
Fixed Optical Character Recognition and added tests
This commit is contained in:
parent
c23a8de5a0
commit
ab37c1e562
4 changed files with 34 additions and 24 deletions
|
@ -180,15 +180,16 @@ function loadRecipe(browser, opName, input, args) {
|
|||
* @param {Browser} browser - Nightwatch client
|
||||
* @param {string|RegExp} expected - The expected output value
|
||||
* @param {boolean} [waitNotNull=false] - Wait for the output to not be empty before testing the value
|
||||
* @param {number} [waitWindow=1000] - The number of milliseconds to wait for the output to be correct
|
||||
*/
|
||||
function expectOutput(browser, expected, waitNotNull=false) {
|
||||
function expectOutput(browser, expected, waitNotNull=false, waitWindow=1000) {
|
||||
if (waitNotNull && expected !== "") {
|
||||
browser.waitUntil(async function() {
|
||||
const output = await this.execute(function() {
|
||||
return window.app.manager.output.outputEditorView.state.doc.toString();
|
||||
});
|
||||
return output.length;
|
||||
}, 1000);
|
||||
}, waitWindow);
|
||||
}
|
||||
|
||||
browser.execute(expected => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue