Options
All
  • Public
  • Public/Protected
  • All
Menu

Class QueuedCodeBuilder

The QueuedCodeBuilder class is destined to build and generate the code of the page-objects. The QueuedCodeBuilder handles the tab depth of the code.

export
class

QueuedCodeBuilder

Hierarchy

  • QueuedCodeBuilder

Index

Constructors

constructor

Properties

Private imports

Private queue

queue: IQueueStep[]

Private tab

tab: string

Defines how tabs should look.

Methods

addConditionalLine

addDynamicConditionalLine

  • Adds a simple Line of code, if the condition is true. The condition gets evaluated, when the QueuedCodeBuilder result is requested.

    queuedCodeBuilder.addLineDynamicCondition(`navigateTo = () => browser.get(this.route);`, () => Boolean(route));
    memberof

    QueuedCodeBuilder

    Parameters

    • content: string
    • condition: function

      a function, which returns the conditions.

        • (): boolean
        • Returns boolean

    Returns QueuedCodeBuilder

addDynamicLine

  • Adds a simple Line of code. The content is evaluated, when the QueuedCodeBuilder result is requested.

    queuedCodeBuilder.addDynamicLine(() => `import { ${protractorImports.join(', ')} } from 'protractor';`);
    memberof

    QueuedCodeBuilder

    Parameters

    • content: function

      a function, which returns the content

        • (): string
        • Returns string

    Returns QueuedCodeBuilder

addImport

  • addImport(element: string, from: string, importAs?: undefined | string): QueuedCodeBuilder

addImportStatements

addLine

decreaseDepth

getResult

  • getResult(): string

increaseDepth

reset

Generated using TypeDoc