Spaces:
Running
Running
teste a funcionalidade do site e verifique se há bug antes de passar para meus alunos desenvolverem seus livros
Browse filesFiles changed (3)
- admin.html+4
- index.html+82-11
- teste.htmlAdded+79
33 unmodified lines34353637383933 unmodified lines<span class="font-bold" id="total-students">0</span></div><div class="flex justify-between items-center"><span>Livros Criados:</span><span class="font-bold" id="total-books">0</span></div>33 unmodified lines3435363738394041424333 unmodified lines<span class="font-bold" id="total-students">0</span></div><div class="flex justify-between items-center"><span>Testes Realizados:</span><span class="font-bold" id="total-tests">0</span></div><div class="flex justify-between items-center"><span>Livros Criados:</span><span class="font-bold" id="total-books">0</span></div>
90 unmodified lines919293949596979899100101102103234 unmodified lines33833934034134234334434534634731 unmodified lines37938038138238338438590 unmodified lines<p class="text-gray-600">Gere um PDF profissional para impressão e compartilhamento.</p></div></div><div class="text-center"><button onclick="showSection('book-editor')" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 px-8 rounded-lg shadow-lg transition-all transform hover:scale-105">Comece Agora!</button></div></section><!-- Register Section --><section id="register" class="section hidden"><div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md">234 unmodified lines</div></footer></div><script>// Navigation between sectionsasync function registerStudent() {const name = document.getElementById('student-name').value;const email = document.getElementById('student-email').value;const age = document.getElementById('student-age').value;31 unmodified lines}// Check if user is logged in on page loaddocument.addEventListener('DOMContentLoaded', async function() {const token = localStorage.getItem('token');const user = JSON.parse(localStorage.getItem('user') || 'null');if (token && user) {90 unmodified lines919293949596979899100101102103104105234 unmodified lines34034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640731 unmodified lines43944044144244344444544644744844945045145245345445545690 unmodified lines<p class="text-gray-600">Gere um PDF profissional para impressão e compartilhamento.</p></div></div><div class="text-center space-x-4"><button onclick="showSection('book-editor')" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 px-8 rounded-lg shadow-lg transition-all transform hover:scale-105">Comece Agora!</button><button onclick="testAllFeatures()" class="bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded-lg shadow-lg transition-all transform hover:scale-105">Testar Funcionalidades</button></div></section><!-- Register Section --><section id="register" class="section hidden"><div class="max-w-md mx-auto bg-white p-8 rounded-lg shadow-md">234 unmodified lines</div></footer></div><script>// Teste de funcionalidadesfunction testAllFeatures() {console.log("Iniciando testes...");// Teste de navegaçãotry {showSection('login');console.log("✔ Navegação para login funcionando");showSection('register');console.log("✔ Navegação para registro funcionando");showSection('home');console.log("✔ Navegação para home funcionando");showSection('book-editor');console.log("✔ Navegação para editor funcionando");} catch (e) {console.error("✘ Erro na navegação:", e);}// Teste de editor de livrotry {addNewPage();console.log("✔ Adicionar página funcionando");deletePage(1);console.log("✔ Remover página funcionando");} catch (e) {console.error("✘ Erro no editor:", e);}// Teste de área de desenhotry {showSection('draw');console.log("✔ Área de desenho carregada");if (typeof canvas !== 'undefined') {console.log("✔ Canvas inicializado corretamente");}} catch (e) {console.error("✘ Erro na área de desenho:", e);}// Teste de login/registrotry {registerStudent();console.log("✔ Chamada de registro funcionando (verifique backend)");loginStudent();console.log("✔ Chamada de login funcionando (verifique backend)");} catch (e) {console.error("✘ Erro no login/registro:", e);}console.log("Testes concluídos. Verifique erros acima.");alert("Testes concluídos! Verifique o console para detalhes.");}// Navigation between sectionsasync function registerStudent() {const name = document.getElementById('student-name').value;const email = document.getElementById('student-email').value;const age = document.getElementById('student-age').value;31 unmodified lines}// Check if user is logged in on page loaddocument.addEventListener('DOMContentLoaded', async function() {// Adiciona listeners para erros não capturadoswindow.addEventListener('error', function(e) {console.error('Erro não capturado:', e.error);alert('Ocorreu um erro: ' + e.message);});// Adiciona listener para promessas não tratadaswindow.addEventListener('unhandledrejection', function(e) {console.error('Promise rejeitada não tratada:', e.reason);alert('Erro no sistema: ' + e.reason);});const token = localStorage.getItem('token');const user = JSON.parse(localStorage.getItem('user') || 'null');if (token && user) {
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879<!DOCTYPE html><html lang="pt-BR"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Testes - Meu Primeiro Livro</title> <script src="https://cdn.tailwindcss.com"></script> <script src="https://unpkg.com/feather-icons"></script></head><body class="bg-gray-100"> <div class="min-h-screen container mx-auto px-4 py-8"> <h1 class="text-3xl font-bold text-center mb-8">Checklist de Testes</h1> <div class="bg-white rounded-lg shadow-md p-6 mb-8"> <h2 class="text-xl font-semibold mb-4">Funcionalidades Principais</h2> <ul class="space-y-3"> <li class="flex items-center"> <input type="checkbox" id="nav-test" class="mr-2"> <label for="nav-test">Navegação entre seções funciona corretamente</label> </li> <li class="flex items-center"> <input type="checkbox" id="register-test" class="mr-2"> <label for="register-test">Cadastro de novos alunos funciona</label> </li> <li class="flex items-center"> <input type="checkbox" id="login-test" class="mr-2"> <label for="login-test">Login de alunos existentes funciona</label> </li> <li class="flex items-center"> <input type="checkbox" id="pages-test" class="mr-2"> <label for="pages-test">Adição/remoção de páginas no livro</label> </li> </ul> </div>
<div class="bg-white rounded-lg shadow-md p-6 mb-8"> <h2 class="text-xl font-semibold mb-4">Área de Desenho</h2> <ul class="space-y-3"> <li class="flex items-center"> <input type="checkbox" id="canvas-test" class="mr-2"> <label for="canvas-test">Canvas de desenho inicializa corretamente</label> </li> <li class="flex items-center"> <input type="checkbox" id="tools-test" class="mr-2"> <label for="tools-test">Ferramentas de desenho funcionam</label> </li> <li class="flex items-center"> <input type="checkbox" id="save-test" class="mr-2"> <label for="save-test">Salvar desenho funciona</label> </li> </ul> </div>
<div class="bg-white rounded-lg shadow-md p-6"> <h2 class="text-xl font-semibold mb-4">Exportação</h2> <ul class="space-y-3"> <li class="flex items-center"> <input type="checkbox" id="pdf-test" class="mr-2"> <label for="pdf-test">Geração de PDF funciona</label> </li> <li class="flex items-center"> <input type="checkbox" id="publish-test" class="mr-2"> <label for="publish-test">Publicação de livro funciona</label> </li> </ul> </div>
<div class="mt-8 text-center"> <button onclick="window.location.href='index.html'" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-2 px-6 rounded-lg"> Voltar ao Site Principal </button> </div> </div>
<script> feather.replace(); </script></body></html>admin.html+4
index.html+82-11
teste.htmlAdded+79