F
Filament9mo ago
Hugo

Testing - how can i test if a from from a suffix action has a certain field?

Hello, im making tests on a form which has fields that have suffix actions. Im struggling trying to check whether a certain field is present in the form after I go into the suffix action. it asserts Successfully that the "open-modal" event was dispatched and It also asserts successfully that the label of my field is being shown. From this I know that im indeed in the modal. The problem im facing now is that I can't assert if a certain field exists because it says the form does not exist. This is what I have:
->assertFormComponentActionExists('identifier', 'changeIdentifier')
->mountFormComponentAction('identifier', 'changeIdentifier')
->assertDispatched("open-modal")
->assertSeeText("Identificador no ERP")
->assertFormFieldExists('notes','mountedFormComponentAction');
->assertFormComponentActionExists('identifier', 'changeIdentifier')
->mountFormComponentAction('identifier', 'changeIdentifier')
->assertDispatched("open-modal")
->assertSeeText("Identificador no ERP")
->assertFormFieldExists('notes','mountedFormComponentAction');
This last line is what is giving me errors, it says that the mountedFormComponentAction does not exist. Any help?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server