-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
big update : moved to typescript and modulariaztion, added some tests…
… (not all work) rergessions : menus, UI..
- Loading branch information
Showing
28 changed files
with
1,904 additions
and
401 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('Simulate localStorage entry in PWA', async ({ page }) => { | ||
await page.evaluate(() => { | ||
localStorage.setItem('audioCache', JSON.stringify({ | ||
'https://example.com/audio': { | ||
audioUrl: 'https://example.com/audio.mp3', | ||
transcription: 'Test transcription', | ||
lastPosition: 0 | ||
} | ||
})); | ||
}); | ||
|
||
await page.goto('http://localhost:5173/listen-UI/'); | ||
|
||
const audioCache = await page.evaluate(() => localStorage.getItem('audioCache')); | ||
expect(audioCache).toBeTruthy(); | ||
|
||
const historyList = await page.locator('#historyList'); | ||
const historyItems = await historyList.locator('li').count(); | ||
expect(historyItems).toBe(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.