- Total Failures: 25 tests
- Dataframe Manager: 3 failures
- UI Tests: 22 failures
The create_analysis_dataframes() function in report_analyst/core/dataframe_manager.py does NOT use format_list_field() for formatting EVIDENCE, GAPS, and SOURCES. Instead, it just converts them to strings with newlines:
"Key Evidence": "\n".join(str(e) for e in result.get("EVIDENCE", [])),
"Gaps": "\n".join(str(gap) for gap in result.get("GAPS", [])),
"Sources": "\n".join(str(source) for source in result.get("SOURCES", [])),But the tests expect formatted output with bullet points:
- Evidence:
"• CO2 emissions data for FY 2024 [Chunk 3]" - Gaps:
"• Missing data point 1\n• Missing data point 2" - Sources:
"• 1\n• 2\n• 3"
test_create_analysis_dataframes_with_evidence- Expects formatted evidence with[Chunk X]but gets raw dict stringtest_create_analysis_dataframes_with_gaps_and_sources- Expects bullet points but gets plain newlinestest_create_analysis_dataframes_with_chunks- Expectsis_evidenceto be boolean True/False but assertion fails (might be pandas boolean)
Option A: Update create_analysis_dataframes() to use format_list_field() for EVIDENCE, GAPS, and SOURCES
- Pros: Matches expected behavior from feature branch
- Cons: Changes current working implementation
Option B: Update tests to match current implementation
- Pros: No code changes needed
- Cons: Loses formatting feature that was in feature branch
Option C: Check if formatting is actually needed/used in UI
- Pros: Makes informed decision
- Cons: Requires investigation
Recommendation: Option A - The format_list_field() function exists and is tested, so we should use it. The feature branch had this formatting, so it was intentional.
Root Cause: We replaced st.tabs() with streamlit-option-menu sidebar navigation
Failed Tests:
test_streamlit_app_tabs.py::test_tabs_exist- Looks forat.tabswith labels ["Previous Reports", "Upload New", "Consolidated Results"]test_streamlit_app_tabs.py::test_previous_reports_tab- Looks for tab with "Previous Reports" labeltest_streamlit_app_tabs.py::test_upload_new_tab- Looks for tab with "Upload New" labeltest_streamlit_app_tabs.py::test_consolidated_results_tab- Looks for tab with "Consolidated Results" labeltest_streamlit_app_tabs.py::test_session_state_initialization- Checkslen(at.tabs) >= 3test_streamlit_app_basic.py::test_app_title_and_layout- Checkslen(at.title) > 0and looks for "Report Analyst" in titletest_streamlit_app_upload.py::test_app_loads_with_upload_capability- Checkslen(at.title) > 0test_streamlit_app_data_display.py::test_app_layout_and_structure- Likely checks for tabs
Fix Path:
- Update tests to look for
streamlit-option-menunavigation instead of tabs - Check for navigation options: ["Upload Report", "Report Analyst", "All Results"]
- Title might be in different location now (check if it's still
st.title()or moved)
Root Cause: Widgets might be in different locations (inside expanders, different pages, etc.)
Failed Tests:
test_streamlit_app_tabs.py::test_configuration_expander- Looks for expander with "Configuration" in labeltest_streamlit_app_tabs.py::test_configuration_widgets- Looks for number inputs and model selectboxtest_streamlit_app_tabs.py::test_question_set_selection- Looks for selectbox with "Question Set" in labeltest_streamlit_app_tabs.py::test_analysis_controls- Looks for checkboxes and buttonstest_streamlit_app_questions.py::test_question_set_selectbox_exists- Looks for "Question Set" selectboxtest_streamlit_app_questions.py::test_question_set_selectbox_has_options- Checks question set selectbox has optionstest_streamlit_app_data_display.py::test_question_display_functionality- Looks for question-related elementstest_streamlit_app_data_display.py::test_model_selection_display- Looks for model selectbox
Investigation Needed:
- Are these widgets still present but in different locations?
- Are they inside the "Analysis Configuration" expander?
- Are they on specific pages (Report Analyst page) that need navigation to access?
- Check if
at.selectboxcan find them when they're inside expanders or conditional blocks
Possible Issues:
- Widgets might be inside
st.expander("Analysis Configuration")which might not be expanded by default in AppTest - Widgets might be on "Report Analyst" page which requires navigation to access
- Widgets might have different keys/labels now
Root Cause: Title might be in different location or not rendered initially
Failed Tests:
test_streamlit_app_basic.py::test_app_title_and_layout-len(at.title) > 0failstest_streamlit_app_upload.py::test_app_loads_with_upload_capability-len(at.title) > 0failstest_streamlit_app_tabs.py::test_session_state_initialization-len(at.title) > 0fails
Investigation Needed:
- Check if
st.title("Report Analyst")is still called in the main function - Check if title is conditional (only shown on certain pages)
- Check if AppTest can see titles that are inside conditional blocks
- Title might be on specific page that requires navigation
Root Cause: File-related UI might be conditional or on different pages
Failed Tests:
test_streamlit_app_upload.py::test_app_has_file_related_ui-len(at.selectbox) > 0failstest_streamlit_app_data_display.py::test_configuration_display- Likely checks for configuration widgetstest_streamlit_app_data_display.py::test_consolidated_results_display- Likely checks for consolidated results UItest_streamlit_app_data_display.py::test_analysis_controls_display- Likely checks for analysis controlstest_streamlit_app_data_display.py::test_dynamic_content_loading- Likely checks for dynamic content
Investigation Needed:
- Are file selectboxes only shown when files exist?
- Are they on specific pages that need navigation?
- Check if AppTest can see widgets inside conditional blocks
Root Cause: Unknown - might be related to backend configuration changes
Failed Tests:
test_streamlit_app_backend_integration.py::test_backend_integration_compatibility- Unknown specific issue
Investigation Needed:
- Check what this test is checking
- Might be related to Settings expander changes
- Might be related to backend config changes
- Dataframe Manager: Update
create_analysis_dataframes()to useformat_list_field()for EVIDENCE, GAPS, and SOURCES - Tab Tests: Update all tab-related tests to check for sidebar navigation instead
- Title Tests: Investigate why
at.titleis empty - check if title is conditional or on specific page
- Run AppTest manually to see what widgets are actually visible
- Check if widgets inside expanders are accessible in AppTest
- Check if navigation to specific pages is needed before widgets are visible
- Verify if conditional rendering affects AppTest visibility
- Clear Path: Update tab tests → navigation tests (straightforward)
- Unknown: Investigate widget visibility → update tests based on findings
- Consider: Some tests might need to navigate to specific pages first before checking for widgets