1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-15 03:44:02 +01:00
Pinafore-Web-Client-Frontend/tests/spec/014-compose-post-privacy.js
2018-04-08 13:42:31 -07:00

17 lines
714 B
JavaScript

import { getNthPostPrivacyOptionInDialog, postPrivacyButton } from '../utils'
import { foobarRole } from '../roles'
fixture`014-compose-post-privacy.js`
.page`http://localhost:4002`
test('Changes post privacy', async t => {
await t.useRole(foobarRole)
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
.click(postPrivacyButton)
.click(getNthPostPrivacyOptionInDialog(2))
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
.click(postPrivacyButton)
.click(getNthPostPrivacyOptionInDialog(1))
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
})