pinafore/tests/spec/014-compose-post-privacy.js

18 lines
722 B
JavaScript
Raw Permalink Normal View History

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