2ND
This commit is contained in:
39
test_store_fix.html
Normal file
39
test_store_fix.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Store Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Store Test Page</h1>
|
||||
<div id="test-output"></div>
|
||||
|
||||
<script>
|
||||
// 模擬測試 jobsStore 的 subscribeToJobUpdates 方法
|
||||
const mockJobsStore = {
|
||||
subscribeToJobUpdates: function(jobUuid) {
|
||||
console.log(`[TEST] subscribeToJobUpdates called with: ${jobUuid}`)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
// 測試方法是否存在
|
||||
const testOutput = document.getElementById('test-output')
|
||||
|
||||
if (typeof mockJobsStore.subscribeToJobUpdates === 'function') {
|
||||
testOutput.innerHTML = '<p style="color: green;">✅ subscribeToJobUpdates 方法存在且為函數</p>'
|
||||
|
||||
// 測試調用
|
||||
try {
|
||||
mockJobsStore.subscribeToJobUpdates('test-uuid-123')
|
||||
testOutput.innerHTML += '<p style="color: green;">✅ 方法調用成功</p>'
|
||||
} catch (error) {
|
||||
testOutput.innerHTML += `<p style="color: red;">❌ 方法調用失敗: ${error.message}</p>`
|
||||
}
|
||||
} else {
|
||||
testOutput.innerHTML = '<p style="color: red;">❌ subscribeToJobUpdates 不是一個函數</p>'
|
||||
}
|
||||
|
||||
console.log('[TEST] Store test completed')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user