Skip to content

Commit 7d4480a

Browse files
test(e2e): delete missing-tracks.spec.js existence-check tests (task-340.4)
Remove 4 Playwright tests that only assert store methods/properties exist via typeof checks. These are contract checks belonging in Vitest, not E2E. Deleted tests: - "should have UI store with missingTrackPopover methods" - "should have library store with missing track support" - "should have UI store with missingTrackModal property" - "should have closeMissingTrackModal method on UI store" Also removes the now-empty "Missing Track API Integration" describe block. Remaining 19 missing-tracks tests (popover, modal, playback interception) pass.
1 parent e45bce7 commit 7d4480a

2 files changed

Lines changed: 5 additions & 54 deletions

File tree

app/frontend/tests/missing-tracks.spec.js

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -252,20 +252,6 @@ test.describe('Missing Track Popover', () => {
252252
await expect(popover).toBeVisible({ timeout: 5000 });
253253
await expect(popover).toContainText('Last seen');
254254
});
255-
256-
test('should have UI store with missingTrackPopover methods', async ({ page }) => {
257-
const hasMethods = await page.evaluate(() => {
258-
const ui = window.Alpine?.store('ui');
259-
return (
260-
'missingTrackPopover' in ui &&
261-
typeof ui.openMissingTrackPopover === 'function' &&
262-
typeof ui.closeMissingTrackPopover === 'function' &&
263-
typeof ui.handlePopoverLocate === 'function' &&
264-
typeof ui.handlePopoverIgnore === 'function'
265-
);
266-
});
267-
expect(hasMethods).toBe(true);
268-
});
269255
});
270256

271257
test.describe('Missing Track Modal', () => {
@@ -395,41 +381,6 @@ test.describe('Missing Track Modal', () => {
395381
});
396382
});
397383

398-
test.describe('Missing Track API Integration', () => {
399-
// API is imported as an ES module in the app, not exposed on window.
400-
// These tests verify the methods exist via the library store which uses the API.
401-
test.beforeEach(async ({ page }) => {
402-
const libraryState = createLibraryState();
403-
await setupLibraryMocks(page, libraryState);
404-
await page.goto('/');
405-
await waitForAlpine(page);
406-
});
407-
408-
test('should have library store with missing track support', async ({ page }) => {
409-
const hasLibraryStore = await page.evaluate(() => {
410-
const library = window.Alpine?.store('library');
411-
return library !== undefined;
412-
});
413-
expect(hasLibraryStore).toBe(true);
414-
});
415-
416-
test('should have UI store with missingTrackModal property', async ({ page }) => {
417-
const hasModalProperty = await page.evaluate(() => {
418-
const ui = window.Alpine?.store('ui');
419-
return 'missingTrackModal' in ui;
420-
});
421-
expect(hasModalProperty).toBe(true);
422-
});
423-
424-
test('should have closeMissingTrackModal method on UI store', async ({ page }) => {
425-
const hasMethod = await page.evaluate(() => {
426-
const ui = window.Alpine?.store('ui');
427-
return typeof ui.closeMissingTrackModal === 'function';
428-
});
429-
expect(hasMethod).toBe(true);
430-
});
431-
});
432-
433384
test.describe('Missing Track Playback Interception', () => {
434385
test.beforeEach(async ({ page }) => {
435386
const libraryState = createLibraryState();

backlog/tasks/task-340.4 - Delete-missing-tracks.spec.js-existence-check-tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
id: TASK-340.4
33
title: Delete missing-tracks.spec.js existence-check tests
4-
status: In Progress
4+
status: Done
55
assignee: []
66
created_date: '2026-04-30 19:29'
7-
updated_date: '2026-04-30 19:30'
7+
updated_date: '2026-05-01 00:06'
88
labels:
99
- testing
1010
- e2e
@@ -33,7 +33,7 @@ Critical file:
3333

3434
## Acceptance Criteria
3535
<!-- AC:BEGIN -->
36-
- [ ] #1 4 existence-check tests deleted
37-
- [ ] #2 Remaining missing-tracks tests (popover, modal, playback interception) still green
38-
- [ ] #3 task test:e2e green
36+
- [x] #1 4 existence-check tests deleted
37+
- [x] #2 Remaining missing-tracks tests (popover, modal, playback interception) still green
38+
- [x] #3 task test:e2e green
3939
<!-- AC:END -->

0 commit comments

Comments
 (0)