1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-15 11:48:35 +01:00
Pinafore-Web-Client-Frontend/tests/spec/08-status-media.js
2018-02-20 09:05:53 -08:00

16 lines
592 B
JavaScript

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()
})