2018-04-08 21:42:31 +01:00
|
|
|
import { getNthPostPrivacyOptionInDialog, postPrivacyButton } from '../utils'
|
2018-05-26 21:51:41 +01:00
|
|
|
import { loginAsFoobar } from '../roles'
|
2018-03-03 21:23:26 +00:00
|
|
|
|
2018-03-07 05:32:51 +00:00
|
|
|
fixture`014-compose-post-privacy.js`
|
2018-03-03 21:23:26 +00:00
|
|
|
.page`http://localhost:4002`
|
|
|
|
|
|
|
|
test('Changes post privacy', async t => {
|
2018-05-26 21:51:41 +01:00
|
|
|
await loginAsFoobar(t)
|
|
|
|
await t
|
2018-03-03 21:23:26 +00:00
|
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
|
|
|
|
.click(postPrivacyButton)
|
2018-04-08 21:42:31 +01:00
|
|
|
.click(getNthPostPrivacyOptionInDialog(2))
|
2018-03-03 21:23:26 +00:00
|
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
|
|
|
|
.click(postPrivacyButton)
|
2018-04-08 21:42:31 +01:00
|
|
|
.click(getNthPostPrivacyOptionInDialog(1))
|
2018-03-03 21:23:26 +00:00
|
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
|
|
|
|
})
|