See discussion on patch:
https://chromium-review.googlesource.com/c/chromium/src/+/1117719/3/ui/file_manager/integration_tests/file_manager/context_menu.js#684
Currently:
StepsRunner.run([
// Check for Javascript errors
function() {
checkIfNoErrorsOccured(this.next);
}),
]);
Option #1: Turn step function into tuple
StepsRunner.run([
["Wait for command option to appear", function() {
remoteCall.waitForElement(appId, query).then(this.next);
}],
["Check for Javascript errors", function() {
checkIfNoErrorsOccured(this.next);
}],
]);
Option #2: Turn step function into Step object
StepsRunner.run([
Step("Wait for command option to appear", function() {
remoteCall.waitForElement(appId, query).then(this.next);
}),
Step("Check for Javascript errors", function() {
checkIfNoErrorsOccured(this.next);
}),
]);
Option #3: Use predefined steps defined elsewhere
StepsRunner.run([
STEPS.WAIT_FOR_COMMAND_OPTION_TO_APPEAR,
STEPS.CHECK_FOR_JAVASCRIPT_ERRORS
]);
Option #4: Use function name (and arguments.callee.name) to document step
StepsRunner.run([
// Check for Javascript errors
function checkForJavascriptErrors() {
checkIfNoErrorsOccured(this.next);
}),
]);
This would allow us to print better debug information when a test is running.
Comment 1 by sashab@chromium.org
, Jul 2