Skip to content

Commit

Permalink
improve jsdocs
Browse files Browse the repository at this point in the history
fixes #10133
  • Loading branch information
christian-bromann committed Apr 14, 2023
1 parent 7adb7f6 commit ef1f58e
Show file tree
Hide file tree
Showing 57 changed files with 281 additions and 281 deletions.
12 changes: 6 additions & 6 deletions examples/appium/helpers/drawHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const r = 100

/**
* simple helper function to draw a circle
* @param {Number} h horizontal center of the circle
* @param {Number} k vertical center of the circle
* @param {number} h horizontal center of the circle
* @param {number} k vertical center of the circle
* @return {Actions[]} list of actions for touchAction command
*/
export function circleAction (h, k) {
Expand All @@ -26,8 +26,8 @@ export function circleAction (h, k) {

/**
* helper function to draw an arc
* @param {Number} start start point
* @param {Number} end end point
* @param {number} start start point
* @param {number} end end point
* @return {Actions[]} list of action for touchAction command
*/
export function arcAction(start, end) {
Expand All @@ -48,8 +48,8 @@ export function arcAction(start, end) {

/**
* helper function to draw an curved arc
* @param {Number} start start point
* @param {Number} end end point
* @param {number} start start point
* @param {number} end end point
* @return {Actions[]} list of action for touchAction command
*/
export function innerArcAction(start, end) {
Expand Down
12 changes: 6 additions & 6 deletions examples/pageobject/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ exports.config = {
//
// Runs before a Cucumber Scenario.
// @param {ITestCaseHookParameter} world world object containing information on pickle and test step
// @param {Object} context Cucumber World object
// @param {object} context Cucumber World object
//
// beforeScenario: function (world, context) {
// },
Expand All @@ -165,7 +165,7 @@ exports.config = {
// Runs before a Cucumber Step.
// @param {Pickle.IPickleStep} step step data
// @param {IPickle} scenario scenario pickle
// @param {Object} context Cucumber World object
// @param {object} context Cucumber World object
//
// beforeStep: function (step, scenario, context) {
// },
Expand All @@ -174,23 +174,23 @@ exports.config = {
// Runs after a Cucumber Step.
// @param {Pickle.IPickleStep} step step data
// @param {IPickle} scenario scenario pickle
// @param {Object} result results object containing scenario results
// @param {object} result results object containing scenario results
// @param {boolean} result.passed true if scenario has passed
// @param {string} result.error error stack if scenario failed
// @param {number} result.duration duration of scenario in milliseconds
// @param {Object} context Cucumber World object
// @param {object} context Cucumber World object
//
// afterStep: function (step, scenario, result, context) {
// },
//
//
// Runs after a Cucumber Scenario.
// @param {ITestCaseHookParameter} world world object containing information on pickle and test step
// @param {Object} result results object containing scenario results
// @param {object} result results object containing scenario results
// @param {boolean} result.passed true if scenario has passed
// @param {string} result.error error stack if scenario failed
// @param {number} result.duration duration of scenario in milliseconds
// @param {Object} context Cucumber World object
// @param {object} context Cucumber World object
//
// afterScenario: function (world, result) {
// },
Expand Down
82 changes: 41 additions & 41 deletions examples/wdio.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,38 +221,38 @@ exports.config = {
//
/**
* Gets executed once before all workers get launched.
* @param {Object} config wdio configuration object
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
*/
onPrepare: function (config, capabilities) {
},
/**
* Gets executed before a worker process is spawned and can be used to initialise specific service
* for that worker as well as modify runtime environments in an async fashion.
* @param {String} cid capability id (e.g 0-0)
* @param {[type]} caps object containing capabilities for session that will be spawn in the worker
* @param {String[]} specs specs to be run in the worker process
* @param {[type]} args object that will be merged with the main configuration once worker is initialised
* @param {[type]} execArgv list of string arguments passed to the worker process
* @param {string} cid capability id (e.g 0-0)
* @param {object} caps object containing capabilities for session that will be spawn in the worker
* @param {string[]} specs specs to be run in the worker process
* @param {object} args object that will be merged with the main configuration once worker is initialised
* @param {object} execArgv list of string arguments passed to the worker process
*/
onWorkerStart: function (cid, caps, specs, args, execArgv) {
},
/**
* Gets executed just after a worker process has exited.
* @param {String} cid capability id (e.g 0-0)
* @param {Number} exitCode exit code returned from worker process
* @param {String[]} specs specs to be run in the worker process
* @param {Number} retries number of retries used
* @param {string} cid capability id (e.g 0-0)
* @param {number} exitCode exit code returned from worker process
* @param {string[]} specs specs to be run in the worker process
* @param {number} retries number of retries used
*/
onWorkerEnd: function (cid, exitCode, specs, retries) {
},
/**
* Gets executed just before initialising the webdriver session and test framework. It allows you
* to manipulate configurations depending on the capability or spec.
* @param {Object} config wdio configuration object
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
* @param {Array.<String>} specs List of spec file paths that are to be run
* @param {String} cid worker id (e.g. 0-0)
* @param {string} cid worker id (e.g. 0-0)
*/
beforeSession: function (config, capabilities, specs, cid) {
},
Expand All @@ -261,13 +261,13 @@ exports.config = {
* variables like `browser`. It is the perfect place to define custom commands.
* @param {Array.<Object>} capabilities list of capabilities details
* @param {Array.<String>} specs List of spec file paths that are to be run
* @param {Object} browser instance of created browser/device session
* @param {object} browser instance of created browser/device session
*/
before: function (capabilities, specs, browser) {
},
/**
* Hook that gets executed before the suite starts
* @param {Object} suite suite details
* @param {object} suite suite details
*/
beforeSuite: function (suite) {
},
Expand All @@ -285,58 +285,58 @@ exports.config = {
},
/**
* Function to be executed before a test (in Mocha/Jasmine only)
* @param {Object} test test object
* @param {Object} context scope object the test was executed with
* @param {object} test test object
* @param {object} context scope object the test was executed with
*/
beforeTest: function (test, context) {
},
//
/**
* Runs before a WebdriverIO command gets executed.
* @param {String} commandName command name
* @param {string} commandName command name
* @param {Array} args arguments that command would receive
*/
beforeCommand: function (commandName, args) {
},
/**
* Runs after a WebdriverIO command gets executed.
* @param {String} commandName hook command name
* @param {string} commandName hook command name
* @param {Array} args arguments that command would receive
* @param {Number} result 0 - command success, 1 - command error
* @param {Object} error error object if any
* @param {number} result 0 - command success, 1 - command error
* @param {object} error error object if any
*/
afterCommand: function (commandName, args, result, error) {
},
/**
* Function to be executed after a test (in Mocha/Jasmine only)
* @param {Object} test test object
* @param {Object} context scope object the test was executed with
* @param {object} test test object
* @param {object} context scope object the test was executed with
* @param {Error} result.error error object in case the test fails, otherwise `undefined`
* @param {Any} result.result return object of test function
* @param {Number} result.duration duration of test
* @param {Boolean} result.passed true if test has passed, otherwise false
* @param {Object} result.retries informations to spec related retries, e.g. `{ attempts: 0, limit: 0 }`
* @param {*} result.result return object of test function
* @param {number} result.duration duration of test
* @param {boolean} result.passed true if test has passed, otherwise false
* @param {object} result.retries informations to spec related retries, e.g. `{ attempts: 0, limit: 0 }`
*/
afterTest: function (test, context, { error, result, duration, passed, retries }) {
},
/**
* Hook that gets executed after the suite has ended
* @param {Object} suite suite details
* @param {object} suite suite details
*/
afterSuite: function (suite) {
},
/**
* Gets executed after all tests are done. You still have access to all global variables from
* the test.
* @param {Number} result 0 - test pass, 1 - test fail
* @param {number} result 0 - test pass, 1 - test fail
* @param {Array.<Object>} capabilities list of capabilities details
* @param {Array.<String>} specs List of spec file paths that ran
*/
after: function (result, capabilities, specs) {
},
/**
* Gets executed right after terminating the webdriver session.
* @param {Object} config wdio configuration object
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
* @param {Array.<String>} specs List of spec file paths that ran
*/
Expand All @@ -345,25 +345,25 @@ exports.config = {
/**
* Gets executed after all workers got shut down and the process is about to exit. An error
* thrown in the onComplete hook will result in the test run failing.
* @param {Object} exitCode 0 - success, 1 - fail
* @param {Object} config wdio configuration object
* @param {object} exitCode 0 - success, 1 - fail
* @param {object} config wdio configuration object
* @param {Array.<Object>} capabilities list of capabilities details
* @param {<Object>} results object containing test results
*/
onComplete: function (exitCode, config, capabilities, results) {
},
/**
* Gets executed when a refresh happens.
* @param {String} oldSessionId session ID of the old session
* @param {String} newSessionId session ID of the new session
* @param {string} oldSessionId session ID of the old session
* @param {string} newSessionId session ID of the new session
*/
onReload: function(oldSessionId, newSessionId) {
},
/**
* Cucumber Hooks
*
* Runs before a Cucumber Feature.
* @param {String} uri path to feature file
* @param {string} uri path to feature file
* @param {GherkinDocument.IFeature} feature Cucumber feature object
*/
beforeFeature: function (uri, feature) {
Expand All @@ -372,7 +372,7 @@ exports.config = {
*
* Runs before a Cucumber Scenario.
* @param {ITestCaseHookParameter} world world object containing information on pickle and test step
* @param {Object} context Cucumber World object
* @param {object} context Cucumber World object
*/
beforeScenario: function (world, context) {
},
Expand All @@ -381,7 +381,7 @@ exports.config = {
* Runs before a Cucumber Step.
* @param {Pickle.IPickleStep} step step data
* @param {IPickle} scenario scenario pickle
* @param {Object} context Cucumber World object
* @param {object} context Cucumber World object
*/
beforeStep: function (step, scenario, context) {
},
Expand All @@ -390,30 +390,30 @@ exports.config = {
* Runs after a Cucumber Step.
* @param {Pickle.IPickleStep} step step data
* @param {IPickle} scenario scenario pickle
* @param {Object} result results object containing scenario results
* @param {object} result results object containing scenario results
* @param {boolean} result.passed true if scenario has passed
* @param {string} result.error error stack if scenario failed
* @param {number} result.duration duration of scenario in milliseconds
* @param {Object} context Cucumber World object
* @param {object} context Cucumber World object
*/
afterStep: function (step, scenario, result, context) {
},
/**
*
* Runs after a Cucumber Scenario.
* @param {ITestCaseHookParameter} world world object containing information on pickle and test step
* @param {Object} result results object containing scenario results
* @param {object} result results object containing scenario results
* @param {boolean} result.passed true if scenario has passed
* @param {string} result.error error stack if scenario failed
* @param {number} result.duration duration of scenario in milliseconds
* @param {Object} context Cucumber World object
* @param {object} context Cucumber World object
*/
afterScenario: function (world, result, context) {
},
/**
*
* Runs after a Cucumber Feature.
* @param {String} uri path to feature file
* @param {string} uri path to feature file
* @param {GherkinDocument.IFeature} feature Cucumber feature object
*/
afterFeature: function (uri, feature) {
Expand Down

0 comments on commit ef1f58e

Please sign in to comment.