[Feature] export
the MountResult
interface so that it can be used in Page Object Models
#27509
Labels
export
the MountResult
interface so that it can be used in Page Object Models
#27509
Hello!
I am switching from Vitest to Playwright for component testing and I have an issue when writing a page object model because I cannot correctly type the return of
await mount(Page)
in my page object model.Here is a excerpt from my test:
I try to give the result of
mount
to my page object model, so that it can then abstract the logic for me in the following tests.Here is part of the page object model:
Problem is that I cannot use type
MountResult
as it is not exported. I see two solutions:MountResult
interfacecomponent
as aLocator
but doing so I would be unable to use theunmount
andupdate
and future added features.I think that the
MountResult
interface should be exported, as it is part of the API that we manipulate (out ofmount
) and thus we should be able to type what we would store in a variable if needed.Did I miss something? Is there another solution? If not, then can you please export this interface?
Thanks a lot!
The text was updated successfully, but these errors were encountered: