const classafFancordion::CommandCtx

sys::Obj
  afFancordion::CommandCtx

Contains contextual information about a Fancordion command.

applyVariables

Source

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

Source

const Str cmdPath

The path portion of the command URI (minus the scheme):

[text]`scheme:path`
cmdScheme

Source

const Str cmdScheme

The scheme portion of the command URI:

[text]`scheme:path`
cmdText

Source

const Str cmdText

The text portion of the command:

[text]`scheme:path`

For table column commands this is the column text.

cmdUri

Source

const Str cmdUri

The command URI.

executeOnFixture

Source

Void executeOnFixture(Obj fixture, Str code)

Executes the given code against the fixture instance. Example:

executeOnFixture(fixture, "echo()") --> fixture.echo()
getFromFixture

Source

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

Source

const Bool ignore

Is set to true if there has been previous errors in the fixture and this command should be ignored.

table

Source

const Str[][]? table

The table being processed. Only available in table commands.

tableColIdx

Source

const Int? tableColIdx

The 0-based table col index. Only available in table row commands.

tableCols

Source

const Str[]? tableCols

The columns that make up the current table row. Only available in table row commands.

tableRowIdx

Source

const Int? tableRowIdx

The 0-based table row index. Only available in table row commands.