Fix tests
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 1m44s
All checks were successful
Build & Test WASM / build-and-test (push) Successful in 1m44s
This commit is contained in:
@@ -5,8 +5,12 @@ module.exports = defineConfig({
|
|||||||
testMatch: '*.spec.js',
|
testMatch: '*.spec.js',
|
||||||
timeout: 300_000,
|
timeout: 300_000,
|
||||||
retries: 0,
|
retries: 0,
|
||||||
|
expect: {
|
||||||
|
timeout: 10_000,
|
||||||
|
},
|
||||||
use: {
|
use: {
|
||||||
baseURL: 'http://localhost:8889',
|
baseURL: 'http://localhost:8889',
|
||||||
|
actionTimeout: 10_000,
|
||||||
launchOptions: {
|
launchOptions: {
|
||||||
args: ['--disable-dev-shm-usage'],
|
args: ['--disable-dev-shm-usage'],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
let selectedPrefix = null;
|
let selectedPrefix = null;
|
||||||
let patchesLoaded = false;
|
let patchesLoaded = false;
|
||||||
let isRestore = false;
|
let isRestore = false;
|
||||||
|
let availablePatches = null;
|
||||||
|
|
||||||
|
// Fetch patch index immediately so it's ready when needed.
|
||||||
|
const availablePatchesReady = scanAvailablePatches().then(p => { availablePatches = p; });
|
||||||
|
|
||||||
// DOM elements
|
// DOM elements
|
||||||
const stepNav = document.getElementById('step-nav');
|
const stepNav = document.getElementById('step-nav');
|
||||||
@@ -108,9 +112,9 @@
|
|||||||
manualMode = true;
|
manualMode = true;
|
||||||
manualChromeHint.hidden = false;
|
manualChromeHint.hidden = false;
|
||||||
|
|
||||||
const available = await scanAvailablePatches();
|
await availablePatchesReady;
|
||||||
manualVersion.innerHTML = '<option value="">-- Select software version --</option>';
|
manualVersion.innerHTML = '<option value="">-- Select software version --</option>';
|
||||||
for (const p of available) {
|
for (const p of availablePatches) {
|
||||||
const opt = document.createElement('option');
|
const opt = document.createElement('option');
|
||||||
opt.value = p.version;
|
opt.value = p.version;
|
||||||
opt.textContent = p.version;
|
opt.textContent = p.version;
|
||||||
@@ -166,8 +170,7 @@
|
|||||||
if (!version || !selectedPrefix) return;
|
if (!version || !selectedPrefix) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const available = await scanAvailablePatches();
|
const loaded = await loadPatchesForVersion(version, availablePatches);
|
||||||
const loaded = await loadPatchesForVersion(version, available);
|
|
||||||
if (!loaded) {
|
if (!loaded) {
|
||||||
showError('Could not load patches for software version ' + version);
|
showError('Could not load patches for software version ' + version);
|
||||||
return;
|
return;
|
||||||
@@ -196,8 +199,8 @@
|
|||||||
|
|
||||||
selectedPrefix = info.serialPrefix;
|
selectedPrefix = info.serialPrefix;
|
||||||
|
|
||||||
const available = await scanAvailablePatches();
|
await availablePatchesReady;
|
||||||
const match = available.find(p => p.version === info.firmware);
|
const match = availablePatches.find(p => p.version === info.firmware);
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
deviceStatus.className = '';
|
deviceStatus.className = '';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap">
|
||||||
<link rel="stylesheet" href="style.css?ts=1773672116">
|
<link rel="stylesheet" href="style.css?ts=1773690621">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/jszip@3/dist/jszip.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -246,9 +246,9 @@
|
|||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
<!-- wasm_exec.js loaded by patch-worker.js inside the Web Worker -->
|
<!-- wasm_exec.js loaded by patch-worker.js inside the Web Worker -->
|
||||||
<script src="kobo-device.js?ts=1773672116"></script>
|
<script src="kobo-device.js?ts=1773690621"></script>
|
||||||
<script src="kobopatch.js?ts=1773672116"></script>
|
<script src="kobopatch.js?ts=1773690621"></script>
|
||||||
<script src="patch-ui.js?ts=1773672116"></script>
|
<script src="patch-ui.js?ts=1773690621"></script>
|
||||||
<script src="app.js?ts=1773672116"></script>
|
<script src="app.js?ts=1773690621"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const KOBO_MODELS = {
|
|||||||
* The date path segment (e.g. Mar2026) changes per release.
|
* The date path segment (e.g. Mar2026) changes per release.
|
||||||
* help.kobo.com may lag behind; verify URLs when adding new versions.
|
* help.kobo.com may lag behind; verify URLs when adding new versions.
|
||||||
*/
|
*/
|
||||||
const FIRMWARE_DOWNLOADS = {
|
var FIRMWARE_DOWNLOADS = {
|
||||||
'4.45.23646': {
|
'4.45.23646': {
|
||||||
'N428': 'https://ereaderfiles.kobo.com/firmwares/kobo13/Mar2026/kobo-update-4.45.23646.zip',
|
'N428': 'https://ereaderfiles.kobo.com/firmwares/kobo13/Mar2026/kobo-update-4.45.23646.zip',
|
||||||
'N365': 'https://ereaderfiles.kobo.com/firmwares/kobo12/Mar2026/kobo-update-4.45.23646.zip',
|
'N365': 'https://ereaderfiles.kobo.com/firmwares/kobo12/Mar2026/kobo-update-4.45.23646.zip',
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ async function loadWasm() {
|
|||||||
|
|
||||||
const go = new Go();
|
const go = new Go();
|
||||||
const result = await WebAssembly.instantiateStreaming(
|
const result = await WebAssembly.instantiateStreaming(
|
||||||
fetch('kobopatch.wasm?ts=1773672116'),
|
fetch('kobopatch.wasm?ts=1773690621'),
|
||||||
go.importObject
|
go.importObject
|
||||||
);
|
);
|
||||||
go.run(result.instance);
|
go.run(result.instance);
|
||||||
|
|||||||
@@ -3,5 +3,5 @@
|
|||||||
"filename": "patches_4.45.23646.zip",
|
"filename": "patches_4.45.23646.zip",
|
||||||
"versions": ["4.45.23646"],
|
"versions": ["4.45.23646"],
|
||||||
"date": "03-2026"
|
"date": "03-2026"
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user