Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

800 B
Raw Blame
import { test } from "~~/test/playwright/utils/test"
import breakpoints from "~~/test/playwright/utils/breakpoints"

// Only used to isolate part of the Storybook frame;
// this shouldn't be used to reference this component in
// other E2E tests. Use a label or other visual property.
const safetyWallLocator = "#safety-wall"

test.describe.configure({ mode: "parallel" })

test.describe("VSafetyWall", () => {
  test.beforeEach(async ({ page }) => {
    await page.goto("/iframe.html?id=components-vsafetywall--default")
  })

  breakpoints.describeEvery(({ expectSnapshot }) => {
    test("Renders the wall correctly for sensitive media", async ({ page }) => {
      await expectSnapshot(
        page,
        `v-safetywall-default`,
        page.locator(safetyWallLocator)
      )
    })
  })
})