fix: Fix the browser tests. (#8735)

This commit is contained in:
Aaron Dodson
2025-01-16 10:37:24 -08:00
committed by GitHub
parent 640410752d
commit a86ba15154
6 changed files with 19 additions and 12 deletions

View File

@@ -254,9 +254,9 @@ export async function getCategory(browser, categoryName) {
export async function getNthBlockOfCategory(browser, categoryName, n) {
const category = await getCategory(browser, categoryName);
await category.click();
const block = await browser.$(
`.blocklyFlyout .blocklyBlockCanvas > g:nth-child(${3 + n * 2})`,
);
const block = (
await browser.$$(`.blocklyFlyout .blocklyBlockCanvas > .blocklyDraggable`)
)[n];
return block;
}