From c9354f611519fd86babe0375dd5dba6be6a5cf4d Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Sat, 21 Mar 2026 18:15:43 +0100 Subject: [PATCH] Update script to fetch fonts --- test.sh | 5 +++++ tests/e2e/integration.spec.js | 4 ++++ tests/e2e/run-e2e.sh | 9 +++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index 0dbe498..41f9f87 100755 --- a/test.sh +++ b/test.sh @@ -26,6 +26,11 @@ if [ ! -f "$SCRIPT_DIR/web/src/koreader/koreader-kobo.zip" ]; then "$SCRIPT_DIR/koreader/setup.sh" fi +# Set up Readerly assets if not present. +if [ ! -f "$SCRIPT_DIR/web/src/readerly/KF_Readerly.zip" ]; then + "$SCRIPT_DIR/readerly/setup.sh" +fi + echo "=== Installing web dependencies ===" cd "$SCRIPT_DIR/web" && npm install diff --git a/tests/e2e/integration.spec.js b/tests/e2e/integration.spec.js index bb7da8b..a7b3a53 100644 --- a/tests/e2e/integration.spec.js +++ b/tests/e2e/integration.spec.js @@ -21,6 +21,7 @@ test.afterEach(() => { test.describe('NickelMenu', () => { test('no device — install with config via manual download', async ({ page }) => { test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot'); + test.skip(!hasReaderlyAssets(), 'Readerly assets not found (run readerly/setup.sh)'); await goToManualMode(page); @@ -97,6 +98,7 @@ test.describe('NickelMenu', () => { test('no device — install with KOReader via manual download', async ({ page }) => { test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot'); + test.skip(!hasReaderlyAssets(), 'Readerly assets not found (run readerly/setup.sh)'); test.skip(!hasKoreaderAssets(), 'KOReader assets not found (run koreader/setup.sh)'); await goToManualMode(page); @@ -143,6 +145,7 @@ test.describe('NickelMenu', () => { test('with device — install with KOReader writes files to device', async ({ page }) => { test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot'); + test.skip(!hasReaderlyAssets(), 'Readerly assets not found (run readerly/setup.sh)'); test.skip(!hasKoreaderAssets(), 'KOReader assets not found (run koreader/setup.sh)'); await connectMockDevice(page, { hasNickelMenu: false }); @@ -226,6 +229,7 @@ test.describe('NickelMenu', () => { test('with device — install with config and write to Kobo', async ({ page }) => { test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot'); + test.skip(!hasReaderlyAssets(), 'Readerly assets not found (run readerly/setup.sh)'); await connectMockDevice(page, { hasNickelMenu: false }); diff --git a/tests/e2e/run-e2e.sh b/tests/e2e/run-e2e.sh index 72f42e6..e6ed278 100755 --- a/tests/e2e/run-e2e.sh +++ b/tests/e2e/run-e2e.sh @@ -52,8 +52,7 @@ if [ ! -f "$DIST_DIR/wasm/kobopatch.wasm" ]; then fi # Set up NickelMenu assets if not present. -NM_DIR="$SRC_DIR/nickelmenu" -if [ ! -f "$NM_DIR/NickelMenu.zip" ] || [ ! -f "$NM_DIR/kobo-config.zip" ]; then +if [ ! -f "$SRC_DIR/nickelmenu/NickelMenu.zip" ]; then echo "Setting up NickelMenu assets..." "$PROJECT_ROOT/nickelmenu/setup.sh" fi @@ -64,6 +63,12 @@ if [ ! -f "$SRC_DIR/koreader/koreader-kobo.zip" ]; then "$PROJECT_ROOT/koreader/setup.sh" fi +# Set up Readerly assets if not present. +if [ ! -f "$SRC_DIR/readerly/KF_Readerly.zip" ]; then + echo "Setting up Readerly assets..." + "$PROJECT_ROOT/readerly/setup.sh" +fi + # Install dependencies and browser. npm install --silent npx playwright install chromium