mirror of
https://github.com/koel/koel
synced 2024-11-14 00:17:13 +00:00
fix: options to mark songs as private/public shown in Community edition (#1870)
This commit is contained in:
parent
5d9d75111a
commit
a86c2ab654
2 changed files with 10 additions and 0 deletions
|
@ -305,6 +305,12 @@ new class extends UnitTestCase {
|
|||
expect(emitMock).toHaveBeenCalledWith('MODAL_SHOW_CREATE_PLAYLIST_FORM', null, playables)
|
||||
})
|
||||
|
||||
it('does not have the options to mark song as private or public in Community edition', async () => {
|
||||
await this.renderComponent(factory('song'))
|
||||
expect(screen.queryByText('Mark as Private')).toBeNull()
|
||||
expect(screen.queryByText('Unmark as Private')).toBeNull()
|
||||
})
|
||||
|
||||
it('makes songs private', async () => {
|
||||
this.enablePlusEdition()
|
||||
|
||||
|
|
|
@ -167,6 +167,10 @@ const visibilityActions = computed(() => {
|
|||
return []
|
||||
}
|
||||
|
||||
if (!isPlus.value) {
|
||||
return []
|
||||
}
|
||||
|
||||
const visibilities = Array.from(new Set((playables.value as Song[]).map(song => song.is_public
|
||||
? 'public'
|
||||
: 'private',
|
||||
|
|
Loading…
Reference in a new issue