Pest Test and sending invalid $data to form?

So I have
$data = [
    'name' => fake()->name,
    'email' => fake()->email,
    'phone' => fake()->numberBetween(2000000000, 9999999999),
    'role' => $userToCreateRole,
];

$result = Livewire::test(UsersTable::class)
    ->assertTableActionExists('create_housing_locator')
    ->callTableAction('create_housing_locator', data: $data);

if ($shouldPass) {
    $result->assertHasNoErrors();
    $user = User::where('email', $data['email'])->first();
    expect($user)->not->toBeNull()
        ->and($user->name)->toBe($data['name'])
        ->and($user->role)->toBe($data['role']);
} else {
    $user = User::where('email', $data['email'])->first();
    expect($user)->toBeNull();
}
. right now i get the error ErrorException: Attempt to read property "mountedTableActions" on null if i try to pass a role value that doesnt exist in the Select::make('role') field. This worked fine with livewire 2 and earlier pests as i would just check after the fact if the user exists. Right now it fails with that error. How should i instead test this properly. There isn't a test helper method to see what options are in the Select is there? This is actually multi check test there im testing about 6 different roles variations to make sure certain roles can or cannot create other users with role X, etc.
Was this page helpful?