fedilove-ui/tests/spec/014-compose-post-privacy.js

17 lines
703 B
JavaScript
Raw Normal View History

2018-03-03 21:23:26 +00:00
import { postPrivacyButton } from '../utils'
import { foobarRole } from '../roles'
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 => {
await t.useRole(foobarRole)
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
.click(postPrivacyButton)
2018-03-12 02:40:32 +00:00
.click('.generic-dialog-list li:nth-child(2) button')
2018-03-03 21:23:26 +00:00
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
.click(postPrivacyButton)
2018-03-12 02:40:32 +00:00
.click('.generic-dialog-list li:nth-child(1) button')
2018-03-03 21:23:26 +00:00
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
})