How to use the selianize.RegisterSuiteHook function in selianize

To help you get started, we’ve selected a few selianize examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SeleniumHQ / selenium-ide / packages / selenium-ide / src / plugin / manager.js View on Github external
registerPlugin(plugin) {
    if (!this.hasPlugin(plugin.id)) {
      plugin.canEmit = false
      this.plugins.push(plugin)
      RegisterSuiteHook(this.emitSuite.bind(undefined, plugin))
      RegisterTestHook(this.emitTest.bind(undefined, plugin))
      if (plugin.commands) {
        plugin.commands.forEach(({ id, name, type, docs }) => {
          const doks = this.useExistingArgTypesIfProvided(
            Object.assign({}, docs, {
              plugin: {
                id,
              },
            })
          )
          Commands.addCommand(id, { name, type, ...doks })
          registerCommand(id, RunCommand.bind(undefined, plugin.id, id))
          RegisterEmitter(id, this.emitCommand.bind(undefined, plugin, id))
        })
      }
    } else {