DojiSum's picture
Publish the current 141-task UXInteract release
ef987bb verified
Raw History Blame Contribute Delete
1.23 kB
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>Fast Chat Fixture</title>
<style>body { font-family: Arial, sans-serif; padding: 24px; } input { width: 420px; padding: 8px; } output { display: block; margin-top: 12px; }</style>
<script src="config.js"></script>
</head>
<body>
<main>
<input data-testid="chat-input" placeholder="Ask">
<button data-testid="send-button">Send</button>
<h1 data-testid="title">好的,这里有几个不同风格的标题</h1>
<output data-testid="response">AI is generating response...</output>
<p data-testid="status">idle</p>
</main>
<script>
function send() {
const prompt = document.querySelector('[data-testid="chat-input"]').value;
setTimeout(() => {
document.querySelector('[data-testid="title"]').textContent = '好的,这里有几个不同风格的标题';
document.querySelector('[data-testid="response"]').textContent = 'unrelated fake answer';
document.querySelector('[data-testid="status"]').textContent = 'complete';
}, 1800);
}
document.querySelector('[data-testid="send-button"]').addEventListener('click', send);
</script>
</body>
</html>