const classafFancordion::CommandCtx
sys::Obj afFancordion::CommandCtx
Contains contextual information about a Fancordion command.
- applyVariables
Str applyVariables(Str text := this.cmdPath)
Applies Fancordion variables to the given str. Specifically it replaces portions of the string with:
#TEXT -> cmdText.toCode
#FIXTURE -> "fixture"
The following are replaced in table commands:
#COL -> tableColIdx
#COL[0] -> tableCols[0].toCode
#COL[1] -> tableCols[1].toCode
#COL[n] -> tableCols[n].toCode
#COLS -> tableCols.toCode
#ROW -> tableRowIdx
#ROW[0] -> table[0].toCode
#ROW[1] -> table[1].toCode
#ROW[n] -> table[n].toCode
#ROWS -> table.toCode
- cmdPath
const Str cmdPath
The path portion of the command URI (minus the scheme):
[text]`scheme:path`
- cmdScheme
const Str cmdScheme
The scheme portion of the command URI:
[text]`scheme:path`
- cmdText
const Str cmdText
The text portion of the command:
[text]`scheme:path`
For table column commands this is the column text.
- cmdUri
const Str cmdUri
The command URI.
- executeOnFixture
Void executeOnFixture(Obj fixture, Str code)
Executes the given code against the fixture instance. Example:
executeOnFixture(fixture, "echo()") --> fixture.echo()
- getFromFixture
Obj? getFromFixture(Obj fixture, Str code)
Executes the given code on the fixture instance and returns a value. Example:
getFromFixture(fixture, "toStr()") --> return fixture.toStr()
- ignore
const Bool ignore
Is set to
true
if there has been previous errors in the fixture and this command should be ignored.- table
const Str[][]? table
The table being processed. Only available in table commands.
- tableColIdx
const Int? tableColIdx
The 0-based table col index. Only available in table row commands.
- tableCols
const Str[]? tableCols
The columns that make up the current table row. Only available in table row commands.
- tableRowIdx
const Int? tableRowIdx
The 0-based table row index. Only available in table row commands.