Raixa

Author:
  • Gabe Abrams
Raixa commands

Methods

assertAbsent(selectorOrItem)

Author:
  • Gabe Abrams
Assert that an element is absent
Parameters:
Name Type Description
selectorOrItem string | Item the item to check

assertAbsentWithContents(selector, contents)

Author:
  • Gabe Abrams
Assert that an element is absent (find by its contents). Contents must be an exact match for text inside the element (not inside its children).
Parameters:
Name Type Description
selector string of the item
contents string of the item

assertDoesNotHaveClass(selectorOrItem, className)

Author:
  • Gabe Abrams
Assert that an element does not have a certain class
Parameters:
Name Type Description
selectorOrItem string | Item the item to check
className string the class name to expect will be absent

assertEqual(a, b, message)

Author:
  • Gabe Abrams
Assert that two items are shallow equal
Parameters:
Name Type Description
a the first item to compare
b the second item to compare
message error message to display if the items are not shallow equal

assertExists(selectorOrItem)

Author:
  • Gabe Abrams
Assert that an element exists
Parameters:
Name Type Description
selectorOrItem string | Item the item to check

assertExistsWithContents(selector, contents, messageopt)

Author:
  • Gabe Abrams
Assert that an element exists (find by its contents). Contents must be an exact match for text inside the element (not inside its children).
Parameters:
Name Type Attributes Default Description
selector string css selector of the item
contents string contents of the item
message string <optional>
generated message the error message to display if the item cannot be found

assertFalse(item, message)

Author:
  • Gabe Abrams
Assert that an item is false (falsy also acceptable)
Parameters:
Name Type Description
item the item to test
message error message to display if the item is falsy

assertHasClass(selectorOrItem, className)

Author:
  • Gabe Abrams
Assert that an element has a certain class
Parameters:
Name Type Description
selectorOrItem string | Item the item to check
className the class name to expect in the list

assertNumElements(selector, numItems)

Author:
  • Gabe Abrams
Assert that an element appears a certain number of times
Parameters:
Name Type Description
selector string the selector for the item to check for
numItems number expected number of items to find

assertTrue(item, message)

Author:
  • Gabe Abrams
Assert that an item is true (truthy also acceptable)
Parameters:
Name Type Description
item the item to test
message error message to display if the item is not truthy

click(selectorOrItem)

Author:
  • Gabe Abrams
Click an element
Parameters:
Name Type Description
selectorOrItem string | Item the item to click

clickByContents(selector, contents)

Author:
  • Gabe Abrams
Click an element (find it by its contents). Contents must be an exact match for text inside the element (not inside its children).
Parameters:
Name Type Description
selector string the item to click
contents string contents for the item to click

render(element)

Author:
  • Gabe Abrams
Render an element
Parameters:
Name Type Description
element JSX jsx to render

rerender(element)

Author:
  • Gabe Abrams
Re-render to update props
Parameters:
Name Type Description
element JSX jsx to render

typeInto(selectorOrItem, text)

Author:
  • Gabe Abrams
Type into a text field
Parameters:
Name Type Description
selectorOrItem string | Item the item to interact with
text string the text to type

uniquify(text) → {string}

Author:
  • Gabe Abrams
Add a unique tag to a name
Parameters:
Name Type Description
text string the text to make unique
Returns:
unique text
Type
string

(async) waitFor(ms)

Author:
  • Gabe Abrams
Wait for a set amount of time
Parameters:
Name Type Description
ms number number of ms to wait

(async) waitForElementAbsent(selectorOrItem, timeoutSecopt)

Author:
  • Gabe Abrams
Wait until an element is absent
Parameters:
Name Type Attributes Default Description
selectorOrItem string | Item the item to check
timeoutSec number <optional>
10 number of seconds to wait before timing out

(async) waitForElementPresent(selectorOrItem, timeoutSecopt)

Author:
  • Gabe Abrams
Wait until an element is present
Parameters:
Name Type Attributes Default Description
selectorOrItem string | Item the item to check
timeoutSec number <optional>
10 number of seconds to wait before timing out

(async) waitForElementWithContentsAbsent(selector, contents, timeoutSecopt)

Author:
  • Gabe Abrams
Wait until an element is absent (find by contents). Contents must be an exact match for text inside the element (not inside its children).
Parameters:
Name Type Attributes Default Description
selector string the css selector of the item
contents string text contents to search for
timeoutSec number <optional>
10 number of seconds to wait before timing out

(async) waitForElementWithContentsPresent(selector, contents, timeoutSecopt)

Author:
  • Gabe Abrams
Wait until an element is present (find by contents). Contents must be an exact match for text inside the element (not inside its children).
Parameters:
Name Type Attributes Default Description
selector string the css selector of the item
contents string text contents to search for
timeoutSec number <optional>
10 number of seconds to wait before timing out