1
0
mirror of https://github.com/nolanlawson/pinafore synced 2025-01-20 16:58:47 +01:00

add test for sensitive media

This commit is contained in:
Nolan Lawson 2018-02-20 09:05:53 -08:00
parent 09504794c6
commit e952c7fcb2

View File

@ -0,0 +1,15 @@
import { getNthVirtualArticle } from '../utils'
import { foobarRole } from '../roles'
fixture`08-status-media.js`
.page`http://localhost:4002`
test('shows sensitive images', async t => {
await t.useRole(foobarRole)
.hover(getNthVirtualArticle(3))
.hover(getNthVirtualArticle(6))
.hover(getNthVirtualArticle(7))
.click(getNthVirtualArticle(7).find('.status-sensitive-media-button'))
.expect(getNthVirtualArticle(7).find('.status-media img').getAttribute('alt')).eql('kitten')
.expect(getNthVirtualArticle(7).find('.status-media img').hasAttribute('src')).ok()
})