Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions resources/default-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1126,8 +1126,8 @@
await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
}),
new BenchmarkTestStep("ScrollToChatAndSendMessages", async (page) => {
const cvWorkComplete = new Promise((resolve) => {

Check failure on line 1129 in resources/default-tests.mjs

View workflow job for this annotation

GitHub Actions / Linters

'cvWorkComplete' is assigned a value but never used
page.addEventListener("video-grid-content-visibility-complete", resolve, { once: true });
page.addEventListener("video-grid-content-visibility-complete", resolve);
});

const nextItemBtn = page.querySelector("#next-item-carousel-btn", ["cooking-app", "main-content", "recipe-carousel"]);
Expand All @@ -1145,19 +1145,19 @@
page.layout();
}

const chatWindow = page.querySelector("#chat-window", ["cooking-app", "chat-window"]);
chatWindow.scrollIntoView({ behavior: "instant" });
// Use focus on the actual textarea to bring the chat into view to avoid Safari overscroll from scrollIntoView
page.querySelector("textarea#chat-input", ["cooking-app", "chat-window"]).focus();
page.layout();

const messagesToBeSent = ["Please generate an image of Tomato Soup.", "Try again, but make the soup look thicker.", "Try again, but make the soup served in a rustic bowl and include a sprinkle of fresh herbs on top."];
const chatInput = page.querySelector("#chat-input", ["cooking-app", "chat-window"]);
const chatInput = page.querySelector("textarea#chat-input", ["cooking-app", "chat-window"]);
for (const message of messagesToBeSent) {
chatInput.setValue(message);
chatInput.dispatchEvent("input");
chatInput.enter("keydown");
page.layout();
}
await cvWorkComplete;
// await cvWorkComplete;
}),
new BenchmarkTestStep("IncreaseWidthIn5Steps", async (page) => {
const widths = [560, 640, 704, 768, 800];
Expand Down
Loading