1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-14 19:38:28 +01:00
Pinafore-Web-Client-Frontend/tests/spec/120-status-aria-label.js
Nolan Lawson 0515133ece
fix(a11y): fix NVDA crash on long aria-label (#702)
* fix(a11y): fix NVDA crash on long aria-label

fixes #694

* use the word truncated instead of ellipsis

* fix test

* really fix tests
2018-12-01 00:10:30 -08:00

17 lines
534 B
JavaScript

import { loginAsFoobar } from '../roles'
import { getNthStatus } from '../utils'
import { postEmptyStatusWithMediaAs } from '../serverActions'
fixture`120-status-aria-label.js`
.page`http://localhost:4002`
test('aria-labels for statuses with no content text', async t => {
await postEmptyStatusWithMediaAs('foobar', 'kitten1.jpg', 'kitteh')
await loginAsFoobar(t)
await t
.hover(getNthStatus(0))
.expect(getNthStatus(0).getAttribute('aria-label')).match(
/foobar, (.+ ago|just now), @foobar, Public/i
)
})