1
0
mirror of https://github.com/nolanlawson/pinafore synced 2024-12-14 19:38:28 +01:00
Pinafore-Web-Client-Frontend/tests/spec/014-compose-post-privacy.js
Nolan Lawson efdb0bc534
Remove testcafe roles and run in parallel x4 (#334)
* more attempts to fix test flakiness

* remove testcafe roles entirely

* really remove testcafe roles

* run testcafe in parallel x2

* run testcafe in parallel x4

* fix online/offline forcing in tests

* fix pin test
2018-05-26 13:51:41 -07:00

18 lines
722 B
JavaScript

import { getNthPostPrivacyOptionInDialog, postPrivacyButton } from '../utils'
import { loginAsFoobar } from '../roles'
fixture`014-compose-post-privacy.js`
.page`http://localhost:4002`
test('Changes post privacy', async t => {
await loginAsFoobar(t)
await t
.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)')
})