fix(test): DownloadEventRow row shows platform, not artist name
The row template renders status + platform (PlatformChip) + time + counts; the artist isn't displayed there. Assert on 'Completed'/'Patreon' instead. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import DownloadEventRow from '../../src/components/downloads/DownloadEventRow.vu
|
|||||||
import { freshPinia, mountComponent } from '../support/mountComponent.js'
|
import { freshPinia, mountComponent } from '../support/mountComponent.js'
|
||||||
|
|
||||||
describe('DownloadEventRow', () => {
|
describe('DownloadEventRow', () => {
|
||||||
it('renders the artist and the mapped status label', () => {
|
it('renders the mapped status label and platform', () => {
|
||||||
const pinia = freshPinia()
|
const pinia = freshPinia()
|
||||||
const now = new Date().toISOString()
|
const now = new Date().toISOString()
|
||||||
const event = {
|
const event = {
|
||||||
@@ -15,7 +15,7 @@ describe('DownloadEventRow', () => {
|
|||||||
}
|
}
|
||||||
const w = mountComponent(DownloadEventRow, { props: { event }, pinia })
|
const w = mountComponent(DownloadEventRow, { props: { event }, pinia })
|
||||||
const t = w.text()
|
const t = w.text()
|
||||||
expect(t).toContain('Alice')
|
|
||||||
expect(t).toContain('Completed') // downloadStatusLabel('ok')
|
expect(t).toContain('Completed') // downloadStatusLabel('ok')
|
||||||
|
expect(t).toContain('Patreon') // platformLabel via PlatformChip
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user