test(ci): add exporter heading levels and a11y typography smoke; update MAIN_PLAN
CI / test (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { test, expect } from '@playwright/test'
|
||||
|
||||
const builderUrl = '/en/builder'
|
||||
|
||||
test('dnd keyboard fallback: Up/Down buttons reorder sections', async ({ page }) => {
|
||||
await page.goto(builderUrl)
|
||||
|
||||
// add specific sections in order: hero, faq, cta
|
||||
await page.getByTestId('card-hero').click()
|
||||
await page.getByTestId('card-faq').click()
|
||||
await page.getByTestId('card-cta').click()
|
||||
|
||||
const list = page.getByTestId('section-canvas')
|
||||
const items = () => list.getByTestId(/sec-item-/)
|
||||
|
||||
// initial order
|
||||
await expect(items().nth(0)).toContainText('hero')
|
||||
await expect(items().nth(1)).toContainText('faq')
|
||||
await expect(items().nth(2)).toContainText('cta')
|
||||
|
||||
// move first item down
|
||||
await items().nth(0).getByLabel('Down 0').click()
|
||||
await expect(items().nth(0)).toContainText('faq')
|
||||
await expect(items().nth(1)).toContainText('hero')
|
||||
await expect(items().nth(2)).toContainText('cta')
|
||||
|
||||
// move last item up
|
||||
await items().nth(2).getByLabel('Up 2').click()
|
||||
await expect(items().nth(0)).toContainText('faq')
|
||||
await expect(items().nth(1)).toContainText('cta')
|
||||
await expect(items().nth(2)).toContainText('hero')
|
||||
})
|
||||
Reference in New Issue
Block a user