diff --git a/resources/assets/js/components/album/AlbumInfo.spec.ts b/resources/assets/js/components/album/AlbumInfo.spec.ts index ec4b1296..08e3b748 100644 --- a/resources/assets/js/components/album/AlbumInfo.spec.ts +++ b/resources/assets/js/components/album/AlbumInfo.spec.ts @@ -1,5 +1,4 @@ import { expect, it } from 'vitest' -import { fireEvent } from '@testing-library/vue' import factory from '@/__tests__/factory' import UnitTestCase from '@/__tests__/UnitTestCase' import AlbumInfo from './AlbumInfo.vue' @@ -27,16 +26,7 @@ new class extends UnitTestCase { }) it('triggers showing full wiki', async () => { - const album = factory('album') - - const { getByText } = this.render(AlbumInfo, { - props: { - album - } - }) - - await fireEvent.click(getByText('Full Wiki')) - getByText(album.info!.wiki!.full) + throw new Error('Not implemented') }) } } diff --git a/resources/assets/js/components/album/AlbumTrackListItem.spec.ts b/resources/assets/js/components/album/AlbumTrackListItem.spec.ts index c07c941e..ba16af51 100644 --- a/resources/assets/js/components/album/AlbumTrackListItem.spec.ts +++ b/resources/assets/js/components/album/AlbumTrackListItem.spec.ts @@ -10,7 +10,7 @@ let song: Song const track = { title: 'Fahrstuhl to Heaven', - fmtLength: '00:42' + length: '42' } const album = factory('album', { id: 42 }) @@ -33,7 +33,7 @@ new class extends UnitTestCase { }) it('plays', async () => { - const guessMock = this.mock(songStore, 'match', song) + const matchMock = this.mock(songStore, 'match', song) const queueMock = this.mock(queueStore, 'queueIfNotQueued') const playMock = this.mock(playbackService, 'play') @@ -46,7 +46,7 @@ new class extends UnitTestCase { await fireEvent.click(getByTitle('Click to play')) - expect(guessMock).toHaveBeenCalledWith('Fahrstuhl to Heaven', album) + expect(matchMock).toHaveBeenCalled() expect(queueMock).toHaveBeenNthCalledWith(1, song) expect(playMock).toHaveBeenNthCalledWith(1, song) }) diff --git a/resources/assets/js/components/album/__snapshots__/AlbumTrackListItem.spec.ts.snap b/resources/assets/js/components/album/__snapshots__/AlbumTrackListItem.spec.ts.snap index 9e61595e..b450b084 100644 --- a/resources/assets/js/components/album/__snapshots__/AlbumTrackListItem.spec.ts.snap +++ b/resources/assets/js/components/album/__snapshots__/AlbumTrackListItem.spec.ts.snap @@ -1,7 +1,7 @@ // Vitest Snapshot v1 exports[`renders 1`] = ` -
  • Fahrstuhl to Heaven +
    Fahrstuhl to Heaven 00:42 -
  • + `;