cypress-example-recipes icon indicating copy to clipboard operation
cypress-example-recipes copied to clipboard

Add recipe showing common HTML / style assertions

Open bahmutov opened this issue 7 years ago • 1 comments

  • 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)

bahmutov avatar Jan 10 '18 15:01 bahmutov

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

gabbersepp avatar Oct 18 '19 16:10 gabbersepp