Testing
Front-end testing of your UI Wires using a beautiful test API.
You can easily test your Wires by extending cbwire.models.BaseWireTest
and using our fluent testing API in your TestBox specs.
Test Example
You can invoke your Wires for testing by using wire()
.
Test Methods
data
Set a Data Property to the specified value.
computed
Set a Computed Property to the specified closure.
toggle
Toggles a Data Property between true and false.
call
Calls an Action. Optional array of parameters can be provided.
emit
Emits an Event and fires any Listeners that are defined on the Wire. Optional array of parameters can be provided, which will be passed on to listeners.
see
Verifies a value can be found in the current Template rendering. Otherwise, test fails.
dontSee
Verifies a value is not found in the current Template rendering. Otherwise, test fails.
seeData
Verifies a Data Property matches a specified value. Otherwise, test fails.
dontSeeData
Verifies a Data Property does not match a specified value. Otherwise, test fails.
Last updated