mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-11 01:38:08 +01:00
0022286b46
* first attempt * progress * working * working * test timeago * rm * get timeago working * reduce size * fix whitespace * more intl stuff * more effort * more work * more progress * more work * more intl * set lang=LOCALE * flatten * more work * add ltr/rtl * more work * add comments * yet more work * still more work * more work * fix tests * more test and string fixes * fix test * fix test * fix test * fix some more strings, add test * fix snackbar * fix } * fix typo * fix english * measure perf * start on french * more work on french * more french * more french * finish french * fix some missing translations * update readme * fix test
39 lines
1.4 KiB
JavaScript
39 lines
1.4 KiB
JavaScript
import {
|
|
composeButton,
|
|
composeModalPostPrivacyButton,
|
|
getNthPostPrivacyOptionInDialog,
|
|
postPrivacyButton, postPrivacyDialogButtonUnlisted,
|
|
scrollToStatus,
|
|
sleep
|
|
} 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 sleep(2000)
|
|
await t
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
|
|
.click(postPrivacyButton)
|
|
.expect(getNthPostPrivacyOptionInDialog(2).exists).ok({ timeout: 30000 })
|
|
.click(getNthPostPrivacyOptionInDialog(2))
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
|
|
.click(postPrivacyButton)
|
|
.expect(getNthPostPrivacyOptionInDialog(1).exists).ok({ timeout: 30000 })
|
|
.click(getNthPostPrivacyOptionInDialog(1))
|
|
.expect(postPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Public)')
|
|
})
|
|
|
|
test('can use privacy dialog within compose dialog', async t => {
|
|
await loginAsFoobar(t)
|
|
await scrollToStatus(t, 16)
|
|
await t.expect(composeButton.getAttribute('aria-label')).eql('Compose toot')
|
|
await sleep(2000)
|
|
await t.click(composeButton)
|
|
.click(composeModalPostPrivacyButton)
|
|
.click(postPrivacyDialogButtonUnlisted)
|
|
.expect(composeModalPostPrivacyButton.getAttribute('aria-label')).eql('Adjust privacy (currently Unlisted)')
|
|
})
|