BugBug

Assertions

Element style

The runner compares the computed value. Colors in any format are translated to the computed one for "equals" and "does not equal".

Named color
Named color
color: red → rgb(255, 0, 0)
Hex color
Hex color
color: #1d7afc → rgb(29, 122, 252)
Color with alpha
Color with alpha
background-color: rgba(0, 0, 0, 0.5)
Modern color format
Modern color format
color: oklch(62% 0.2 260)
Border color
Border color
border-color: green → rgb(0, 128, 0)
Font size
Font size
font-size: 1.5rem → 24px
Font weight
Font weight
font-weight: bold → 700
Text align
Text align
text-align: center
Display flex
Display flex
display: flex
Display inline-block
Display inline-block
display: inline-block
Visibility hidden
visibility: hidden (element is invisible)
Opacity
Opacity
opacity: 0.5
Width and height
Width and height
width: 200px, height: 40px
z-index auto
z-index auto
z-index: auto (not positioned)
z-index number
z-index number
position: relative, z-index: 10
Style changed after 2s
Red
color: red → green, 2s after the click

Element class

Class names here are plain (not CSS modules), so they are stable.

Several classesclass="btn btn-primary is-active"
One classclass="btn"
No classesfails for any has class, message shows no classes
Similar namesclass="btn-primary-outline": has "btn-primary" fails
Class toggled after 2s"is-active" added 2s after the click

Media loaded

Assert that an image, picture, video or audio element finished loading.

Loaded imageLoadedpasses
Broken imageBrokenfails: 404
Image without srcEmptyfails: nothing to load
Image loaded after 2sDelayedpasses once the image appears
PicturePicturechecks the inner img
Videopasses
Broken videofails: 404
Audiopasses
Not a media element
Plain div
fails: reports the tag name (div)

Meta tags

The head of this page has these tags.

TagValue
titleAssertions playground | BugBug
descriptionFixtures for the new BugBug assertions.
canonicalhttps://playground.bugbug.io/others/assertions
robotsnoindex, nofollow
h1Assertions
langen-US (set by Next.js)
og:titleAssertions playground
og:descriptionOpen Graph description
og:imagehttps://playground.bugbug.io/images/bugbug-recording.png
og:urlhttps://playground.bugbug.io/others/assertions
twitter:cardsummary_large_image
twitter:titleAssertions playground on X
custom-tagCustom value (custom name)
twitter:descriptionNot set: only negative operators pass

URL query parameters

Current query: (none)

Request response

Each button sends a fetch to /api/status/<code>. Use a URL pattern such as /api/status/404 or /api/status/*. Redirects record the 3xx status too.