Creates an instance of QueuedCodeBuilder.
Defines how tabs should look.
Defines how tabs should look.
Adds a simple Line of code, if the condition/ the boolean is true.
queuedCodeBuilder.addLineCondition(`navigateTo = () => browser.get(this.route);`, Boolean(route));
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));
a function, which returns the conditions.
Adds a simple Line of code. The content is evaluated, when the QueuedCodeBuilder result is requested.
queuedCodeBuilder.addDynamicLine(() => `import { ${protractorImports.join(', ')} } from 'protractor';`);
a function, which returns the content
add an import to the CodeBuilder Instance.
which element should be imported. import {<Element>} from '...'
which library should imported. import {...} from '<From>'
determines the location where all imports from the CodeBuilder instance should be placed.
Adds a simple Line of code.
queuedCodeBuilder.addLine('some code');
The content
decreases the tab depth
queuedCodeBuilder
.addLine('function foo() {')
.increaseDepth()
.addLine('bar()')
.decreaseDepth()
.addLine('function foo() }')
Evaluates all Steps in the Queue.
increases the tab depth
queuedCodeBuilder
.addLine('function foo() {')
.increaseDepth()
.addLine('bar()')
.decreaseDepth()
.addLine('function foo() }')
resets the QueuedCodeBuilder queue
Generated using TypeDoc
The QueuedCodeBuilder class is destined to build and generate the code of the page-objects. The QueuedCodeBuilder handles the tab depth of the code.
QueuedCodeBuilder