Update script to fetch fonts
All checks were successful
Build and test project / build-and-test (push) Successful in 1m34s
All checks were successful
Build and test project / build-and-test (push) Successful in 1m34s
This commit is contained in:
5
test.sh
5
test.sh
@@ -26,6 +26,11 @@ if [ ! -f "$SCRIPT_DIR/web/src/koreader/koreader-kobo.zip" ]; then
|
|||||||
"$SCRIPT_DIR/koreader/setup.sh"
|
"$SCRIPT_DIR/koreader/setup.sh"
|
||||||
fi
|
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 ==="
|
echo "=== Installing web dependencies ==="
|
||||||
cd "$SCRIPT_DIR/web" && npm install
|
cd "$SCRIPT_DIR/web" && npm install
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ test.afterEach(() => {
|
|||||||
test.describe('NickelMenu', () => {
|
test.describe('NickelMenu', () => {
|
||||||
test('no device — install with config via manual download', async ({ page }) => {
|
test('no device — install with config via manual download', async ({ page }) => {
|
||||||
test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot');
|
test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot');
|
||||||
|
test.skip(!hasReaderlyAssets(), 'Readerly assets not found (run readerly/setup.sh)');
|
||||||
|
|
||||||
await goToManualMode(page);
|
await goToManualMode(page);
|
||||||
|
|
||||||
@@ -97,6 +98,7 @@ test.describe('NickelMenu', () => {
|
|||||||
|
|
||||||
test('no device — install with KOReader via manual download', async ({ page }) => {
|
test('no device — install with KOReader via manual download', async ({ page }) => {
|
||||||
test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot');
|
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)');
|
test.skip(!hasKoreaderAssets(), 'KOReader assets not found (run koreader/setup.sh)');
|
||||||
|
|
||||||
await goToManualMode(page);
|
await goToManualMode(page);
|
||||||
@@ -143,6 +145,7 @@ test.describe('NickelMenu', () => {
|
|||||||
|
|
||||||
test('with device — install with KOReader writes files to device', async ({ page }) => {
|
test('with device — install with KOReader writes files to device', async ({ page }) => {
|
||||||
test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot');
|
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)');
|
test.skip(!hasKoreaderAssets(), 'KOReader assets not found (run koreader/setup.sh)');
|
||||||
|
|
||||||
await connectMockDevice(page, { hasNickelMenu: false });
|
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('with device — install with config and write to Kobo', async ({ page }) => {
|
||||||
test.skip(!hasNickelMenuAssets(), 'NickelMenu assets not found in webroot');
|
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 });
|
await connectMockDevice(page, { hasNickelMenu: false });
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,7 @@ if [ ! -f "$DIST_DIR/wasm/kobopatch.wasm" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Set up NickelMenu assets if not present.
|
# Set up NickelMenu assets if not present.
|
||||||
NM_DIR="$SRC_DIR/nickelmenu"
|
if [ ! -f "$SRC_DIR/nickelmenu/NickelMenu.zip" ]; then
|
||||||
if [ ! -f "$NM_DIR/NickelMenu.zip" ] || [ ! -f "$NM_DIR/kobo-config.zip" ]; then
|
|
||||||
echo "Setting up NickelMenu assets..."
|
echo "Setting up NickelMenu assets..."
|
||||||
"$PROJECT_ROOT/nickelmenu/setup.sh"
|
"$PROJECT_ROOT/nickelmenu/setup.sh"
|
||||||
fi
|
fi
|
||||||
@@ -64,6 +63,12 @@ if [ ! -f "$SRC_DIR/koreader/koreader-kobo.zip" ]; then
|
|||||||
"$PROJECT_ROOT/koreader/setup.sh"
|
"$PROJECT_ROOT/koreader/setup.sh"
|
||||||
fi
|
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.
|
# Install dependencies and browser.
|
||||||
npm install --silent
|
npm install --silent
|
||||||
npx playwright install chromium
|
npx playwright install chromium
|
||||||
|
|||||||
Reference in New Issue
Block a user