chore: Bump frontend package version and enhance test reliability (#7049)

* chore: bump frontend package version from 0.1.2 to 1.2.0 in package-lock.json

* test: enhance error message wait condition in generalBugs-shard-6.spec.ts

Updated the test to wait for the error message to appear with a minimum length of 20 characters, improving reliability in detecting error states. This change replaces the previous fixed timeout with a dynamic check, enhancing the robustness of the test.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-03-12 17:53:46 -03:00 committed by GitHub
commit e26915a032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 3 deletions

View file

@ -6,7 +6,7 @@
"packages": {
"": {
"name": "langflow",
"version": "0.1.2",
"version": "1.2.0",
"dependencies": {
"@chakra-ui/number-input": "^2.1.2",
"@headlessui/react": "^2.0.4",

View file

@ -61,8 +61,20 @@ class CustomComponent(Component):
await page.getByText("Check & Save").last().click();
//wait for the animation to propagate
await page.waitForTimeout(1000);
// Wait for the error message to appear and have sufficient length
await page.waitForFunction(
() => {
const errorElement = document.querySelector(
'[data-testid="title_error_code_modal"]',
);
return (
errorElement &&
errorElement.textContent &&
errorElement.textContent.length > 20
);
},
{ timeout: 10000 }, // 5 second timeout
);
const error = await page
.getByTestId("title_error_code_modal")