mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 15:17:59 -05:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user