parent
1d61a737da
commit
980fec15ec
|
@ -8,7 +8,7 @@
|
|||
</ExternalLink>
|
||||
<a class="status-favs-reblogs"
|
||||
href="/statuses/{{originalStatusId}}/reblogs"
|
||||
aria-label="{{favoritesLabel}}">
|
||||
aria-label="{{reblogsLabel}}">
|
||||
<svg class="status-favs-reblogs-svg">
|
||||
<use xlink:href="#fa-retweet"/>
|
||||
</svg>
|
||||
|
@ -16,7 +16,7 @@
|
|||
</a>
|
||||
<a class="status-favs-reblogs"
|
||||
href="/statuses/{{originalStatusId}}/favorites"
|
||||
aria-label="{{reblogsLabel}}">
|
||||
aria-label="{{favoritesLabel}}">
|
||||
<svg class="status-favs-reblogs-svg">
|
||||
<use xlink:href="#fa-star" />
|
||||
</svg>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
import { Selector as $ } from 'testcafe'
|
||||
import { getFavoritesCount, getNthStatus, getReblogsCount, getUrl } from '../utils'
|
||||
import {
|
||||
favoritesCountElement, getFavoritesCount, getNthStatus, getReblogsCount, getUrl,
|
||||
reblogsCountElement
|
||||
} from '../utils'
|
||||
import { foobarRole } from '../roles'
|
||||
|
||||
fixture`011-reblog-favorites-count.js`
|
||||
|
@ -10,6 +13,7 @@ test('shows favorites', async t => {
|
|||
.click(getNthStatus(0))
|
||||
.expect(getUrl()).contains('/statuses/')
|
||||
.expect(getFavoritesCount()).eql(2)
|
||||
.expect(favoritesCountElement.getAttribute('aria-label')).eql('Favorited 2 times')
|
||||
.expect($('.icon-button[aria-label="Favorite"]').getAttribute('aria-pressed')).eql('true')
|
||||
.click($('.status-favs-reblogs').nth(1))
|
||||
.expect(getUrl()).match(/\/statuses\/[^/]+\/favorites/)
|
||||
|
@ -24,6 +28,7 @@ test('shows boosts', async t => {
|
|||
.click(getNthStatus(0))
|
||||
.expect(getUrl()).contains('/statuses/')
|
||||
.expect(getReblogsCount()).eql(1)
|
||||
.expect(reblogsCountElement.getAttribute('aria-label')).eql('Boosted 1 time')
|
||||
.expect($('.icon-button[aria-label="Boost"]').getAttribute('aria-pressed')).eql('false')
|
||||
.click($('.status-favs-reblogs').nth(0))
|
||||
.expect(getUrl()).match(/\/statuses\/[^/]+\/reblogs/)
|
||||
|
|
Loading…
Reference in New Issue