Thank you for updating this. How would you go about testing this component? I have a simple Ionic Text Input component wrapped in a Controller just like the example above.
When I moved the data-testid='input-email' to the Controller component wrapper, now I get an error in the test: TestingLibraryElementError: Unable to find an element by: [data-testid="input-email"]
I'm assuming because it is a custom component.
Thank you for updating this. How would you go about testing this component? I have a simple Ionic Text Input component wrapped in a Controller just like the example above.
I've tried to use the example from this article:
I've also tried this (since ion input components have a
detail
property that specifies the value of the input:None of these methods get me what I need which is the value for these inputs being updated in the test. Any ideas?
You can probably do debug() from testing library after each fired event and see if the thing changed at all to investigate
I did do that, but it didn't change.
put the id on the
Controller
and fire aonChange
event don't use the ionic eventsWhen I moved the
data-testid='input-email'
to the Controller component wrapper, now I get an error in the test:TestingLibraryElementError: Unable to find an element by: [data-testid="input-email"]
I'm assuming because it is a custom component.
can you put a simple project together on stackblitz?
Im curious what came of this - having the same issues :(