mirror of
https://github.com/koel/koel
synced 2024-11-24 05:03:05 +00:00
feat: better tooltips for list play buttons
This commit is contained in:
parent
7fcffa3854
commit
bcc71ea1d9
2 changed files with 12 additions and 8 deletions
|
@ -30,7 +30,7 @@ new class extends UnitTestCase {
|
|||
it.each([[0], [1]])('shuffles all if %s songs are selected', async (selectedCount: number) => {
|
||||
const { emitted } = this.renderComponent(selectedCount)
|
||||
|
||||
await this.user.click(screen.getByTitle('Shuffle all songs'))
|
||||
await this.user.click(screen.getByTitle('Shuffle all. Press Alt/⌥ to change mode.'))
|
||||
|
||||
expect(emitted().playAll[0]).toEqual([true])
|
||||
})
|
||||
|
@ -39,7 +39,7 @@ new class extends UnitTestCase {
|
|||
const { emitted } = this.renderComponent(selectedCount)
|
||||
|
||||
await this.user.keyboard('{Alt>}')
|
||||
await this.user.click(screen.getByTitle('Play all songs'))
|
||||
await this.user.click(screen.getByTitle('Play all. Press Alt/⌥ to change mode.'))
|
||||
await this.user.keyboard('{/Alt}')
|
||||
|
||||
expect(emitted().playAll[0]).toEqual([false])
|
||||
|
@ -48,7 +48,7 @@ new class extends UnitTestCase {
|
|||
it('shuffles selected if more than one song are selected', async () => {
|
||||
const { emitted } = this.renderComponent(2)
|
||||
|
||||
await this.user.click(screen.getByTitle('Shuffle selected songs'))
|
||||
await this.user.click(screen.getByTitle('Shuffle selected. Press Alt/⌥ to change mode.'))
|
||||
|
||||
expect(emitted().playSelected[0]).toEqual([true])
|
||||
})
|
||||
|
@ -57,7 +57,7 @@ new class extends UnitTestCase {
|
|||
const { emitted } = this.renderComponent(2)
|
||||
|
||||
await this.user.keyboard('{Alt>}')
|
||||
await this.user.click(screen.getByTitle('Play selected songs'))
|
||||
await this.user.click(screen.getByTitle('Play selected. Press Alt/⌥ to change mode.'))
|
||||
await this.user.keyboard('{/Alt}')
|
||||
|
||||
expect(emitted().playSelected[0]).toEqual([false])
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
v-if="selectedSongs.length < 2 && songs.length"
|
||||
class="btn-play-all"
|
||||
orange
|
||||
title="Play all songs"
|
||||
title="Play all. Press Alt/⌥ to change mode."
|
||||
v-koel-tooltip.bottom
|
||||
@click.prevent="playAll"
|
||||
>
|
||||
<Icon :icon="faPlay" fixed-width />
|
||||
|
@ -18,7 +19,8 @@
|
|||
v-if="selectedSongs.length > 1"
|
||||
class="btn-play-selected"
|
||||
orange
|
||||
title="Play selected songs"
|
||||
title="Play selected. Press Alt/⌥ to change mode."
|
||||
v-koel-tooltip.bottom
|
||||
@click.prevent="playSelected"
|
||||
>
|
||||
<Icon :icon="faPlay" fixed-width />
|
||||
|
@ -32,7 +34,8 @@
|
|||
class="btn-shuffle-all"
|
||||
data-testid="btn-shuffle-all"
|
||||
orange
|
||||
title="Shuffle all songs"
|
||||
title="Shuffle all. Press Alt/⌥ to change mode."
|
||||
v-koel-tooltip.bottom
|
||||
@click.prevent="shuffle"
|
||||
>
|
||||
<Icon :icon="faRandom" fixed-width />
|
||||
|
@ -44,7 +47,8 @@
|
|||
class="btn-shuffle-selected"
|
||||
data-testid="btn-shuffle-selected"
|
||||
orange
|
||||
title="Shuffle selected songs"
|
||||
title="Shuffle selected. Press Alt/⌥ to change mode."
|
||||
v-koel-tooltip.bottom
|
||||
@click.prevent="shuffleSelected"
|
||||
>
|
||||
<Icon :icon="faRandom" fixed-width />
|
||||
|
|
Loading…
Reference in a new issue