Maxi
Maxi
Explore posts from servers
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
No :(
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
Bump
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
If I change the test to: ->assertSee('My modalaction'); then it passes.
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
But when I run my test as described I get a Failed asserting that an action with name [mymodalaction] exists on ... error.
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
No description
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
Sorry, maybe I explained my problem wrong but I don't want to pass any data into the modal action or in general do anything, I just want to test if the action exists (->assertActionExists()). I had to remove some stuff from the action since it's work related, but here's how the modal action is created and how I display it inside of the modal:
<?php

class ImportAction extends Action
{

protected function setUp(): void
{
parent::setUp();


$this->modalDescription(): Htmlable => $action->getModalAction('mymodalaction'));


// ...

$this->registerModalActions([
Action::make('mymodalaction')
->label('My modalaction')
->disabled(),
]);

// ...
}
}
<?php

class ImportAction extends Action
{

protected function setUp(): void
{
parent::setUp();


$this->modalDescription(): Htmlable => $action->getModalAction('mymodalaction'));


// ...

$this->registerModalActions([
Action::make('mymodalaction')
->label('My modalaction')
->disabled(),
]);

// ...
}
}
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
Okay so if I register an action in a modal, I should be able to access it if I mount the action that opens my modal, right?
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
And if they're treated like normal actions then I think I found a bug.
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
I already checked out the docs but I can't find anything on modal actions specifically.
15 replies
FFilament
Created by Maxi on 10/23/2024 in #❓┊help
How to test modal actions?
Bump
15 replies