cypress-example-recipes
cypress-example-recipes copied to clipboard
Add recipe showing common HTML / style assertions
- find all elements with inline styles (good to make sure there are none for more secure pages). use
*[style]
selector. - images that failed to load (use
naturalWidth
property) - checking computed style property like is the element's background red, or color is black
- element is overlapping with other elements
- maybe any images that took longer than N ms to load (using performance metric)
Can you give me a hint on how to measure image load time? As far as I know I can not spy on requests that are no xhr requests. I already found out how I can measure page load time B using window.performance
// Edit: OK, found out how this is working. I took a deeper look at window.performance