Revert "fix(navigation): eliminate VLM hallucination on bottom navigation tabs via structural guard"
This reverts commit b9c29a5a2d.
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import pytest
|
||||
from GramAddict.core.perception.screen_identity import ScreenIdentity, ScreenType
|
||||
|
||||
def test_identify_explore_grid_without_selected_tab():
|
||||
"""
|
||||
TDD Proof: Ensure ScreenIdentity classifies EXPLORE_GRID correctly
|
||||
even if the tab bar fails to report selected="true".
|
||||
"""
|
||||
# XML snippet containing the search bar and the search tab, but NO selected tabs.
|
||||
xml_dump = """<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
|
||||
<hierarchy rotation="0">
|
||||
<node index="0" text="Search" resource-id="com.instagram.android:id/action_bar_search_edit_text" class="android.widget.EditText" package="com.instagram.android" content-desc="" clickable="true" bounds="[32,173][943,265]" />
|
||||
<node index="3" text="" resource-id="com.instagram.android:id/search_tab" class="android.widget.FrameLayout" package="com.instagram.android" content-desc="Search and explore" clickable="true" selected="false" bounds="[648,2235][864,2361]" />
|
||||
<!-- Some image grid content -->
|
||||
<node index="1" text="" resource-id="com.instagram.android:id/image_button" class="android.widget.ImageView" package="com.instagram.android" content-desc="Photo by User" clickable="true" bounds="[0,300][350,650]" />
|
||||
</hierarchy>
|
||||
"""
|
||||
|
||||
identity = ScreenIdentity("testbot")
|
||||
result = identity.identify(xml_dump)
|
||||
|
||||
assert result["screen_type"] == ScreenType.EXPLORE_GRID, (
|
||||
f"Expected EXPLORE_GRID, but got {result['screen_type']}. "
|
||||
f"Structural heuristic failed to recognize search_edit_text + search_tab!"
|
||||
)
|
||||
Reference in New Issue
Block a user