1.3 KiB, 1 run
created by r2519314175:31, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | // What happens when a chat is started? |
| 2 | import { open, shot } from './harness.mjs'; |
| 3 | |
| 4 | const s = await open({ name: 'probe2' }); |
| 5 | await shot(s, 'q0-connected'); |
| 6 | |
| 7 | await s.page.click('#new-session-btn'); |
| 8 | await s.page.waitForTimeout(1500); |
| 9 | await shot(s, 'q1-after-newchat'); |
| 10 | |
| 11 | const st = await s.page.evaluate(() => { |
| 12 | const vis = (el) => { |
| 13 | if (!el) return 'absent'; |
| 14 | const r = el.getBoundingClientRect(); const c = getComputedStyle(el); |
| 15 | return (r.width > 0 && r.height > 0 && c.display !== 'none' && c.visibility !== 'hidden') |
| 16 | ? 'visible' : 'hidden'; |
| 17 | }; |
| 18 | const ai = document.querySelector('[data-panel="ai"][data-zone="stage"]'); |
| 19 | return { |
| 20 | chatInput: vis(document.getElementById('chat-input')), |
| 21 | chatSend: vis(document.getElementById('chat-send')), |
| 22 | composer: vis(document.querySelector('.composer, .chat-composer, #chat-composer')), |
| 23 | aiPanel: vis(ai), |
| 24 | aiHTML: ai ? ai.innerText.slice(0, 400) : '(no ai panel)', |
| 25 | modal: vis(document.querySelector('.modal:not([style*="display:none"])')), |
| 26 | openModals: [...document.querySelectorAll('.modal')] |
| 27 | .filter(m => getComputedStyle(m).display !== 'none').map(m => m.id), |
| 28 | chatList: (document.querySelector('#session-list, .chat-list') || {}).innerText || '(none)', |
| 29 | }; |
| 30 | }); |
| 31 | console.log(JSON.stringify(st, null, 2)); |
| 32 | console.log('ERRORS:', s.errs); |
| 33 | await s.close(); |