Skip to content

Commit

Permalink
docs: hide constructors from JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Jan 5, 2024
1 parent d25f85b commit 8d9ff15
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 13 deletions.
8 changes: 7 additions & 1 deletion lib/core/engine/command/addText.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ const log = intel.getLogger('browsertime.command.addText');

/**
* Provides functionality to add text to elements on a web page using various selectors.
*
* @example commands.addText.
* @class
* @hideconstructor
*/
export class AddText {
constructor(browser) {
Expand All @@ -19,6 +20,7 @@ export class AddText {
* Adds text to an element identified by its ID.
*
* @async
* @example commands.addText.byId('mytext', 'id');
* @param {string} text - The text string to add.
* @param {string} id - The ID of the element.
* @returns {Promise<void>} A promise that resolves when the text has been added.
Expand All @@ -42,6 +44,7 @@ export class AddText {
* Adds text to an element identified by its XPath.
*
* @async
* @example commands.addText.byXpath('mytext', 'xpath');
* @param {string} text - The text string to add.
* @param {string} xpath - The XPath of the element.
* @returns {Promise<void>} A promise that resolves when the text has been added.
Expand All @@ -65,6 +68,7 @@ export class AddText {
* Adds text to an element identified by its CSS selector.
*
* @async
* @example commands.addText.bySelector('mytext', 'selector');
* @param {string} text - The text string to add.
* @param {string} selector - The CSS selector of the element.
* @returns {Promise<void>} A promise that resolves when the text has been added.
Expand All @@ -88,6 +92,7 @@ export class AddText {
* Adds text to an element identified by its class name.
*
* @async
* @example commands.addText.byClassName('mytext', 'className');
* @param {string} text - The text string to add.
* @param {string} className - The class name of the element.
* @returns {Promise<void>} A promise that resolves when the text has been added.
Expand All @@ -111,6 +116,7 @@ export class AddText {
* Adds text to an element identified by its name attribute.
*
* @async
* @example commands.addText.byName('mytext', 'name');
* @param {string} text - The text string to add.
* @param {string} name - The name attribute of the element.
* @returns {Promise<void>} A promise that resolves when the text has been added.
Expand Down
2 changes: 1 addition & 1 deletion lib/core/engine/command/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Android, isAndroidConfigured } from '../../../android/index.js';
const log = intel.getLogger('browsertime.command.android');
/**
* Provides functionality to interact with an Android device through shell commands.
*
* @class
* @see https://www.sitespeed.io/documentation/sitespeed.io/mobile-phones/#test-on-android
* @hideconstructor
*/
export class AndroidCommand {
constructor(options) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.cache');
* This class provides methods to clear the cache and cookies in different browsers.
*
* @class
* @hideconstructor
*/
export class Cache {
constructor(browser, browserName, extensionServer, cdp) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/chromeDevToolsProtocol.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.devtoolsprotocol');
* Allows sending commands and setting up event listeners via the protocol.
*
* @class
* @hideconstructor
* @see https://chromedevtools.github.io/devtools-protocol/
*/
export class ChromeDevelopmentToolsProtocol {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/chromeTrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const log = intel.getLogger('browsertime.command.chrometrace');
* Manages Chrome trace functionality, enabling custom profiling and trace collection in Chrome.
*
* @class
* @hideconstructor
*/
export class ChromeTrace {
constructor(engineDelegate, index, options, result) {
Expand Down
5 changes: 3 additions & 2 deletions lib/core/engine/command/click.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ function addClick(js) {
}

/**
* Provides functionality to perform click on elements in a web page using various selectors.
* This implemention gets the elemnt and adds .click(); to it.
* Provides functionality to perform click actions on elements in a web page using various selectors.
*
* @class
* @hideconstructor
*/
export class Click {
constructor(browser, pageCompleteCheck) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const delay = ms => new Promise(res => setTimeout(res, ms));
* It allows setting breakpoints to pause script execution and inspect the current state.
*
* @class
* @hideconstructor
*/
export class Debug {
constructor(browser, options) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/geckoProfiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const log = intel.getLogger('browsertime.command.geckoprofiler');
* Manages the Gecko Profiler for profiling Firefox performance.
*
* @class
* @hideconstructor
*/

export class GeckoProfiler {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/javaScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const log = intel.getLogger('browsertime.command.javascript');
* Provides functionality to execute JavaScript code in the context of the current page.
*
* @class
* @hideconstructor
*/

export class JavaScript {
Expand Down
10 changes: 1 addition & 9 deletions lib/core/engine/command/measure.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function getNewResult() {
* of metric collection including navigation, video recording, and data collection.
*
* @class
* @hideconstructor
*/
export class Measure {
constructor(
Expand Down Expand Up @@ -263,15 +264,6 @@ export class Measure {
);
}

/**
* Start collecting metrics for a URL. If you supply a URL to this method, the browser will navigate to that URL.
* If you do not use an URL (start()) everything is prepared for a new page to measure except the browser do not
* navigate to a new URL. You can also add an alias for the URL.
* @param {string} urlOrAlias
* @param {string} optionalAlias
* @returns {Promise} Promise object represents when the URL has been navigated and finished loading according to the pageCompleteCheck or when everything is setup for measuring a new URL (if no URL is supplied).
*/

/**
* Starts the measurement process for a given URL or an alias.
*
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Add meta data to your user journey.
*
* @class
* @hideconstructor
*/
export class Meta {
constructor() {}
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/mouse/clickAndHold.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.mouse');
* Provides functionality to click and hold elements on a web page using different strategies.
*
* @class
* @hideconstructor
*/
export class ClickAndHold {
constructor(browser) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/mouse/contextClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.mouse');
* Provides functionality to perform a context click (right-click) on elements in a web page.
*
* @class
* @hideconstructor
*/
export class ContextClick {
constructor(browser) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/mouse/doubleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.mouse');
* Provides functionality to perform a double-click action on elements in a web page.
*
* @class
* @hideconstructor
*/
export class DoubleClick {
constructor(browser, pageCompleteCheck) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/mouse/mouseMove.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.mouse');
* Provides functionality to move the mouse cursor to elements or specific positions on a web page.
*
* @class
* @hideconstructor
*/
export class MouseMove {
constructor(browser) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/mouse/singleClick.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.mouse');
/**
* Provides functionality to perform a single click action on elements or at specific positions in a web page. Uses Seleniums Action API.
*
* @hideconstructor
* @class
*/
export class SingleClick {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.navigation');
* Provides functionality to control browser navigation such as back, forward, and refresh actions.
*
* @class
* @hideconstructor
*/

export class Navigation {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.screenshot');
* named by the name provided to the take function.
*
* @class
* @hideconstructor
*/
export class Screenshot {
constructor(screenshotManager, browser, index) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const delay = ms => new Promise(res => setTimeout(res, ms));
* Provides functionality to control page scrolling in the browser.
*
* @class
* @hideconstructor
*/
export class Scroll {
constructor(browser, options) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.select');
* Provides functionality to interact with `<select>` elements on a web page.
*
* @class
* @hideconstructor
*/
export class Select {
constructor(browser) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/set.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const log = intel.getLogger('browsertime.command.set');
* Provides functionality to set properties like innerHTML, innerText, and value on elements in a web page.
*
* @class
* @hideconstructor
*/
export class Set {
constructor(browser) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/stopWatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.stopwatch');
* A stopwatch utility for measuring time intervals.
*
* @class
* @hideconstructor
*/
export class StopWatch {
constructor(name, measure) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const log = intel.getLogger('browsertime.command.switch');
* Provides functionality to switch between frames, windows, and tabs in the browser.
*
* @class
* @hideconstructor
*/
export class Switch {
constructor(browser, pageCompleteCheck, navigate) {
Expand Down
1 change: 1 addition & 0 deletions lib/core/engine/command/wait.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const delay = ms => new Promise(res => setTimeout(res, ms));
* Provides functionality to wait for different conditions in the browser.
*
* @class
* @hideconstructor
*/
export class Wait {
constructor(browser, pageCompleteCheck) {
Expand Down

0 comments on commit 8d9ff15

Please sign in to comment.