New issue
Advanced search Search tips

Issue 859393 link

Starred by 1 user

Issue metadata

Status: Closed
Owner:
Closed: Nov 22
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Change StepsRunner steps to include the name of each step

Project Member Reported by sashab@chromium.org, Jul 2

Issue description

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.
 
Cc: lucmult@chromium.org
Labels: Files-Fixit-2018
Owner: sa...@chromium.org
Status: Closed (was: Available)

Sign in to add a comment