test: add test for #2263 (#2317)

This commit is contained in:
Nolan Lawson 2022-12-11 12:46:59 -08:00 committed by GitHub
parent b1dc43a9c9
commit f61054a3d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,16 @@ import { loginAsLockedAccount } from '../roles'
import { followAs, unfollowAs } from '../serverActions'
import {
avatarInComposeBox,
communityNavButton, followersButton, getNthSearchResult, getSearchResultByHref, getUrl, goBack,
homeNavButton, sleep
communityNavButton,
followersButton,
getNthSearchResult,
getNthStatus,
getSearchResultByHref,
getUrl,
goBack,
homeNavButton,
notificationsNavButton,
sleep
} from '../utils'
import { users } from '../users'
import { Selector as $ } from 'testcafe'
@ -93,6 +101,9 @@ test('Shows unresolved follow requests', async t => {
await t
.expect(communityNavButton.getAttribute('aria-label')).eql('Community (2 follow requests)')
.click(notificationsNavButton)
.expect(getUrl()).contains('/notifications')
.expect(getNthStatus(1).innerText).contains('requested to follow you')
.click(communityNavButton)
.expect(requestsButton.innerText).contains('Follow requests (2)')
.click(requestsButton)