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:
parent
eedef1efae
commit
e26915a032
2 changed files with 15 additions and 3 deletions
2
src/frontend/package-lock.json
generated
2
src/frontend/package-lock.json
generated
|
|
@ -6,7 +6,7 @@
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "langflow",
|
"name": "langflow",
|
||||||
"version": "0.1.2",
|
"version": "1.2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@chakra-ui/number-input": "^2.1.2",
|
"@chakra-ui/number-input": "^2.1.2",
|
||||||
"@headlessui/react": "^2.0.4",
|
"@headlessui/react": "^2.0.4",
|
||||||
|
|
|
||||||
|
|
@ -61,8 +61,20 @@ class CustomComponent(Component):
|
||||||
|
|
||||||
await page.getByText("Check & Save").last().click();
|
await page.getByText("Check & Save").last().click();
|
||||||
|
|
||||||
//wait for the animation to propagate
|
// Wait for the error message to appear and have sufficient length
|
||||||
await page.waitForTimeout(1000);
|
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
|
const error = await page
|
||||||
.getByTestId("title_error_code_modal")
|
.getByTestId("title_error_code_modal")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue