I’m having trouble attempting to test a component. The test (excerpt)
Livewire::test(StudentEvaluationList::class, ['student' => $student])
->set('term', 'spring')
->call('create');
errors out on the ->set() line with Undefined index: fingerprint . I followed it through (thank you, xDebug) to TestableLivewire.php #161
public function pretendWereSendingAComponentUpdateRequest($message, $payload)
{
return $this->callEndpoint('POST', '/livewire/message/'.$this->componentName, [
'fingerprint' => $this->payload['fingerprint'],
'serverMemo' => $this->payload['serverMemo'],
'updates' => [['type' => $message, 'payload' => $payload]],
]);
}
The $payload passed is just my state change ['name' => 'term', 'value' => 'spring'] , but it seems to expect a fingerprint and serverMemo keys as well. I didn’t see anything in the docs about those, so do I need to be adding those myself? Did I miss a setup step?