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
Assertion will fail with the following error:
Did not see expected attribute [hidden] within element [body [dusk="image"]]
I'm not sure if it's usefull, but I created a Screen Record of the test being run. What you can see is the blank page (while the image is being loaded), and as soon as it loads, browser closes and the test fails with aforementioned message.
I guess my question would be is there any way around that, e.g. assert that the image has hidden attribute on page load, then when available, assert that the hidden attribute is removed?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It seems that Laravel Dusk is waiting for the image to be fully loaded prior to makign any assertions. Take the following test as an example:
Assertion will fail with the following error:
Did not see expected attribute [hidden] within element [body [dusk="image"]]
I'm not sure if it's usefull, but I created a Screen Record of the test being run. What you can see is the blank page (while the image is being loaded), and as soon as it loads, browser closes and the test fails with aforementioned message.
I guess my question would be is there any way around that, e.g. assert that the image has hidden attribute on page load, then when available, assert that the hidden attribute is removed?
Beta Was this translation helpful? Give feedback.
All reactions