Feb 10, 2024
0
Level 5
Dusk: How to test root vue component?
I'm trying out Dusk's vue component assertions but from the docs I can't figure out how to reference the root component.
Say I have this method in my controller:
public function show(User $user) : Response
{
return Inertia::render('User/Profile', [
'user' => $user,
]);
}
And therefore in my User/Profile.vue something like:
<script setup>
const props = defineProps({
user: {
type: Object,
required: true
},
});
///
</script>
In my Test say I want to test the correct data
->assertVue('user.name', 'Taylor', 'What goes here?');
How do I specify the selector for this 'root' component? Profile.vue in this case
Please or to participate in this conversation.