test: cover helpers, job queue and chatgpt.com DOM fixtures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dasemuandClaude Opus 5.5 committed 2026-10-07 17:09:51 +02:00
1 parent 5a6bc4aeb9
commit 981dc3b941
6 files changed
+750

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
<!doctype html>
<html><head><meta charset="utf-8"><title>ChatGPT (conversation)</title></head>
<body>
<nav aria-label="Chat history"></nav>
<button data-testid="profile-button"><img id="avatar" alt="" src="{{SMALL_IMG}}"></button>
<main>
<article data-testid="conversation-turn-1">
<div data-message-author-role="user">
Make it look like this.
<img id="reference" alt="Uploaded image" src="{{SMALL_IMG}}">
</div>
</article>
<article data-testid="conversation-turn-2">
<div data-message-author-role="assistant">
Here is your image.
<img id="generated" alt="Generated image" src="{{BIG_IMG}}">
</div>
</article>
<div id="prompt-textarea" contenteditable="true"></div>
<button data-testid="send-button">Send</button>
</main>
</body></html>
+9
View File
@@ -0,0 +1,9 @@
<!doctype html>
<html><head><meta charset="utf-8"><title>ChatGPT (guest)</title></head>
<body>
<header><button data-testid="login-button">Log in</button><button data-testid="signup-button">Sign up</button></header>
<main>
<div id="prompt-textarea" contenteditable="true"></div>
<button data-testid="send-button">Send</button>
</main>
</body></html>
+32
View File
@@ -0,0 +1,32 @@
<!doctype html>
<html><head><meta charset="utf-8"><title>ChatGPT (new chat)</title></head>
<body>
<nav aria-label="Chat history"></nav>
<button data-testid="profile-button">Me</button>
<main>
<div id="thread"></div>
<div id="prompt-textarea" contenteditable="true"></div>
<button data-testid="send-button" id="send">Send</button>
<input type="file" accept="image/*" multiple style="display:none" id="files">
<div id="previews"></div>
</main>
<script>
document.getElementById("send").addEventListener("click", () => {
const composer = document.getElementById("prompt-textarea");
const turn = document.createElement("div");
turn.setAttribute("data-message-author-role", "user");
turn.className = "user-turn";
turn.textContent = composer.innerText;
document.getElementById("thread").appendChild(turn);
composer.textContent = "";
});
document.getElementById("files").addEventListener("change", (event) => {
for (const file of event.target.files) {
const preview = document.createElement("div");
preview.className = "preview";
preview.textContent = file.name + ":" + file.type + ":" + file.size;
document.getElementById("previews").appendChild(preview);
}
});
</script>
</body></html>