add jest-free testing framework: comprehensive integration, modal, and simple test suites with improved error handling
This commit is contained in:
parent
ca9c994bfe
commit
133daabd77
5 changed files with 604 additions and 89 deletions
|
|
@ -87,4 +87,7 @@ async function main() {
|
|||
console.log('\n🎉 Finished adding keys to all languages!');
|
||||
}
|
||||
|
||||
// Export for testing
|
||||
export default main;
|
||||
|
||||
main().catch(console.error);
|
||||
|
|
@ -150,8 +150,9 @@ function refreshModalUI() {
|
|||
}
|
||||
|
||||
async function openUncloseaiEmbeddedModalNew() {
|
||||
// Detect if PicoCSS is actually present on the page
|
||||
const hasPicoCSS = document.querySelector('link[href*="pico"]') !== null;
|
||||
try {
|
||||
// Detect if PicoCSS is actually present on the page
|
||||
const hasPicoCSS = document.querySelector('link[href*="pico"]') !== null;
|
||||
|
||||
// Load appropriate CSS based on actual PicoCSS presence
|
||||
const cssFile = hasPicoCSS ? 'uncloseai-modal-pico.css' : 'uncloseai-modal-builtin.css';
|
||||
|
|
@ -2034,6 +2035,14 @@ You have complete knowledge of this page content and can reference any details,
|
|||
};
|
||||
|
||||
await loadHistory();
|
||||
} catch (error) {
|
||||
console.error('Failed to open modal:', error);
|
||||
// Fallback: ensure some basic modal is available
|
||||
const fallbackModal = document.createElement('dialog');
|
||||
fallbackModal.innerHTML = '<p>Error loading modal. Please refresh the page.</p>';
|
||||
document.body.appendChild(fallbackModal);
|
||||
fallbackModal.showModal();
|
||||
}
|
||||
}
|
||||
|
||||
// Function to toggle Hermes modal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue