jantimon / inp-tests

Cypress Tests to verify INP assumptions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This is a simple project to test the impact of different actions on the Input to Next paint metric.

Fast INPs

  • non interactive elements have a good INP πŸƒβ€β™€οΈ
  • button without side effects has a good INP πŸƒβ€β™€οΈ
  • button with artificial main thread delay inside requestIdleCallback has a good INP πŸƒβ€β™€οΈ
  • button with artificial main thread delay inside 2 requestAnimationFrame has a good INP πŸƒβ€β™€οΈ
  • fetching data has a good INP πŸƒβ€β™€οΈ

Slow INPs

  • button with artificial main thread delay inside requestAnimationFrame has a bad INP 🐌
  • button with artificial main thread delay inside setTimeout has a bad INP 🐌
  • button with artificial main thread delay has a bad INP 🐌
  • :active does not improve a bad INP 🐌

Full test suite

Cypress Tests

About

Cypress Tests to verify INP assumptions


Languages

Language:TypeScript 91.6%Language:CSS 6.1%Language:JavaScript 2.3%