fix: Enhance JSON filtering with special cases, update CI workflows, and improve frontend components and tests (nightly fix) (#7110)

*  (index.tsx): Update inputComponent styles to improve UI design and user experience
🐛 (new-api-modal.tsx): Add data-testid attribute to tweaks button for testing purposes
🔧 (publish-flow.spec.ts): Update test cases to improve reliability and readability
📝 (tweaksTest.spec.ts): Refactor test cases to enhance maintainability and clarity
🔧 (nestedComponent.spec.ts): Update test description for clarity and consistency
🐛 (general-bugs-shard-3909.spec.ts): Fix waitForSelector calls to match correct text for improved test accuracy

* 🔧 (use-get-builds-polling-mutation.ts, use-get-builds.ts, use-post-retrieve-vertex-order.tsx): add retry and retryDelay options to improve error handling and resiliency in API queries
🗑️ (generalBugs-shard-2.spec.ts): delete outdated test file for general bugs related to shards in the frontend tests folder

* Revert "ci: fix false positive on ci sucess status (#6868)"

This reverts commit e18b248591.

*  (jsonEditor/index.tsx): add support for dynamically setting width and height of the editor container to improve responsiveness
🔧 (dictAreaModal/index.tsx): set width to 100% and adjust height class to improve layout responsiveness

* fix backend tests

* [autofix.ci] apply automated fixes

---------

Co-authored-by: italojohnny <italojohnnydosanjos@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Cristhian Zanforlin Lousa 2025-03-17 17:06:03 -03:00 committed by GitHub
commit 4e6c2da0d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 1545 additions and 256 deletions

View file

@ -1,5 +1,5 @@
import pytest
from hypothesis import given
from hypothesis import given, assume
from hypothesis import strategies as st
from langflow.schema.data import Data
from langflow.template.utils import apply_json_filter
@ -17,6 +17,9 @@ def dict_strategy():
# Test basic dictionary access
@given(data=st.dictionaries(st.text(), st.integers()), key=st.text())
def test_basic_dict_access(data, key):
# Skip empty key tests which have special handling
assume(key != "")
if key in data:
result = apply_json_filter(data, key)
assert result == data[key]
@ -39,6 +42,9 @@ def test_array_access(data, index):
# Test nested object access
@given(nested_data=dict_strategy())
def test_nested_object_access(nested_data):
# Skip non-dictionary inputs that would cause Data validation errors
assume(isinstance(nested_data, dict))
# Wrap in Data object to test both raw and Data object inputs
data_obj = Data(data=nested_data)
result = apply_json_filter(data_obj, "")
@ -78,6 +84,8 @@ def test_complex_nested_access(data):
def test_array_object_operations(data):
if data and all(data):
key = next(iter(data[0]))
# Skip empty key tests which have special handling
assume(key != "")
result = apply_json_filter(data, key)
expected = [item[key] for item in data if key in item]
assert result == expected