Increase test timeouts and improve block card handling

Extended timeouts for tests adding many 'Exa' blocks to prevent premature failures. Improved block card selection by waiting for visibility and handling errors with detailed logging in build.page.ts.
This commit is contained in:
Nicholas Tindle
2025-11-04 21:27:00 -06:00
parent 86a2c1020d
commit a746b6dcb0
2 changed files with 8 additions and 3 deletions

View File

@@ -90,10 +90,12 @@ test.describe("Build", () => { //(1)!
});
test("user can add blocks starting with e", async () => {
test.setTimeout(60000); // Increase timeout for many Exa blocks
await addBlocksStartingWithSplit("e", 1, 2);
});
test("user can add blocks starting with e pt 2", async () => {
test.setTimeout(60000); // Increase timeout for many Exa blocks
await addBlocksStartingWithSplit("e", 2, 2);
});

View File

@@ -113,17 +113,20 @@ export class BuildPage extends BasePage {
const displayName = this.getDisplayName(block.name);
await searchInput.clear();
await searchInput.fill(displayName);
await this.page.waitForTimeout(500);
const blockCard = this.page.getByTestId(`block-name-${block.id}`);
if (await blockCard.isVisible()) {
try {
// Wait for the block card to be visible with a reasonable timeout
await blockCard.waitFor({ state: "visible", timeout: 10000 });
await blockCard.click();
const blockInEditor = this.page.getByTestId(block.id).first();
expect(blockInEditor).toBeAttached();
} else {
} catch (error) {
console.log(
`❌ ❌ Block ${block.name} (display: ${displayName}) returned from the API but not found in block list`,
);
console.log(`Error: ${error}`);
}
}