You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, this approach means that myhttpservice is null in componentWillLoad and componentWillRender after await page.setContent('<to-do-list></to-do-list>');, as expected, since the properties are not set.
Setting the property via page.$eval triggers a rerender, but componentWillLoad is not triggered, as expected.
In order to test that the httpservice sets the color, i want to trigger the method componentWillLoad.
Setting the property in setContent means that the property color is set in componentWillLoad, but the property myhttpservice is still null.
Hey there, thank you for the patience getting back to you. The new team is getting started and we're working through the backlog now.
I think what you bring up would be a great avenue to cover in the E2E test docs. In my experience, I would set your mock up in a spec test, which would speed up the execution, and let you work with an instance of the class directly, so you can use the lifecycle hooks like componentWillLoad.
Stencil version:
I'm submitting a:
[ x ] bug report
[ ] feature request
As set out on the doc page for the Prop decorator, one can have a service as a Prop:
As explained in section E2E Testing Recipes on the doc page for End-to-end testing, i set the properties as follows:
However, this approach means that myhttpservice is null in
componentWillLoad
andcomponentWillRender
afterawait page.setContent('<to-do-list></to-do-list>');
, as expected, since the properties are not set.Setting the property via
page.$eval
triggers a rerender, butcomponentWillLoad
is not triggered, as expected.In order to test that the httpservice sets the color, i want to trigger the method
componentWillLoad
.Setting the property in
setContent
means that the propertycolor
is set incomponentWillLoad
, but the propertymyhttpservice
is still null.Expected behavior:
Object set as Properties in
setContent
are not null incomponentWillLoad
.Steps to reproduce:
E2E-Test-Snippet:
This will print:
while expected
The text was updated successfully, but these errors were encountered: