Files
doczyai-pipelines/archive/Doczy.AI_Automation/tests/test_interface_2.py
T
Katon Minhas afb6d5185d Merged in feature/lesser-table-caching-refactor-hybrid (pull request #847)
Feature/lesser table caching refactor hybrid

* chore: Remove unused duplicate main.py from shared pipeline

* fix: Correct crosswalk paths in aarete_derived.py

* chore: Remove unused documentation files from fieldExtraction

* docs: Add documentation files to documentation folder

* docs: Update README with uv setup, expanded project structure, and branching conventions

* docs: Add uv installation steps with Ubuntu/WSL emphasis

* Enable prompt caching for all remaining LLM calls

- Add _INSTRUCTION() functions for: EXHIBIT_HEADER, EXHIBIT_LINKAGE,
  EXHIBIT_TITLE_MATCH, DATE_FIX, DERIVED_TERM_DATE, CHECK_PROVIDER_NAME_MATCH,
  SPECIAL_CASE_ASSIGNMENT
- Update all invoke_claude() calls in saas and clover pipelines to use
  cache=True with corresponding _INSTRUCTION() functions
- Add new instructions to get_cacheable_instructions() for cache warming
- Update tests for new instruction functions

Functions now using caching:
- prompt_exhibit_level
- prompt_exhibit_lesser (EXHIBIT_LEVEL_LESSER_OF)
- prompt_fee_schedule_breakout
- prompt_grouper_breakout
- prompt_special_case_assignment
- prompt_exhibit_linkage
- prompt_exhibit_header
- prompt_smart_chunked (ONE_TO_ONE templates)
- prompt_date_fix
- prompt_derived_term_date
- prompt_exhibit_title_match
- provider_name_match_check

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Reorder

* feat: Add bcbs_promise client pipeline with OFFSET_TERM extraction

- Add new bcbs_promise client with HSC-based OFFSET_TERM field extraction
- Extract full paragraph text of offset/recoupment provisions from contracts
- Derive OFFSET_INDICATOR (Y/N) from OFFSET_TERM presence
- Fix reorder_columns to preserve extra columns not in COLUMN_ORDER
- Update QC/QA output path to outputs/qc_qa/

* fix: Update dev deps and test assertions for QC/QA output path

- Add pytest/pytest-mock to dev dependencies for mypy type checking
- Update test assertions to expect outputs/qc_qa instead of qa_qc_output

* style: Apply black formatting to prompt_templates.py

* Merge main, move scripts

* Archive some scripts

* update py version

* remove .py version file

* Remove ASCII characters

* Restore testbed code

* restore tracking

* Update testbed metrics

* Enable prompt caching for CODE_LAST_CHECK, FILL_BILL_TYPE, DUAL_LOB_CHECK, and GROUPER_BREAKOUT

- Add CODE_LAST_CHECK_INSTRUCTION() for service specificity classification
- Add FILL_BILL_TYPE_INSTRUCTION() for bill type code determination
- Add DUAL_LOB_CHECK_INSTRUCTION() for Medicare/Medicaid classification
- Update code_funcs.py to use caching for CODE_LAST_CHECK, FILL_BILL_TYPE, GROUPER_BREAKOUT
- Update postprocessing_funcs.py to use caching for DUAL_LOB_CHECK
- Add new instructions to get_cacheable_instructions() for cache warming
- Add unit tests for new instruction functions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Fix postprocessing_funcs to remove invalid columns

* Merge branch 'main' into feature/lesser-table-caching-refactor-hybrid

* Revert prompt caching changes from aed1b73c

* update formatting

* Update imports


Approved-by: Sha Brown
Approved-by: Praneel Panchigar
2026-01-26 16:52:55 +00:00

187 lines
13 KiB
Python

import allure
import pytest
from pages.interface_2_page_objects import Interface_2
from utils.common_methods import sign_in
from utils.element_related_methods import get_title
from utils.logger import get_logger
class Test_interface_2:
logger = get_logger()
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Navigation")
@allure.title("Verifying designated Interface 2 Page opens successfully")
@allure.feature("Interface 2")
@allure.story("Verifying designated Interface 2 Page opens successfully")
@allure.severity(allure.severity_level.CRITICAL)
def test_validate_navigation(self, driver, config):
self.logger.info("Verifying designated Interface 2 Page opens successfully")
driver.get(config["url_interface_2"])
get_title(driver, config, "interface_2 · Streamlit")
if driver.title == "interface_2 · Streamlit":
self.logger.info("Designated Interface 2 Page opened successfully")
assert True
else:
self.logger.info("Designated Interface 2 Page not opened successfully")
assert False
# @pytest.mark.skip("Due to bug ")
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Authentication")
@allure.title("Verifying Single Sign-On (SSO) Login for Interface 2")
@allure.feature("Interface 2")
@allure.story("Verifying Single Sign-On (SSO) Login for Interface 2")
@allure.severity(allure.severity_level.CRITICAL)
def test_verify_sign_in(self, driver, config):
self.logger.info("Verifying Single Sign-On (SSO) Login for Interface 2")
driver.get(
config["url_interface_2"]
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P91FtoYFvR20dqHG0dEKQhDe1BftWl3mQWsfh9s8UJttZdIVkp4cYIkmKKhTtdGruEzTbeZjcCH6mii-K8QH5QDmQ9chVv-P5lGlTOPig_9AZ_6ZZEty4XWPFPJzseHk4JsvCk36kgebUZvfT2X2MfMEsRi-TnOC2CWhhlurm0a8mCR7WzDWHLzPHpFAwcd-GS7V3N8NUri6LDskw8E1HiOtMSs0SwwZCGw2A7GZV59MrYvNxi8YyousqNRLhdOg56PrzlhLk5l-hgm9ZX9NrKYmlNmb3LYFrxd8zgWQ5fdulyColwquQHTGZ4kRwM49xCdTEsCDprDYqopmMoPXcwvjFz69f_a9S-qT8jNhFGN_WmdoUlq02J0BSLnD-IfKNAQe5w2D6SKCYH4LLZnSSKpQrJUFosqYmxOsk34Z80enm-f4kiJhzqYt9Qwa6n70J3bF-6vXCjZdu3l5iI5CLc7QcaicPmfiOQBGu_EyFploqsW7fmqfNhJ92_W0jL_yQvgZaBtMeZH23BmVpYQGdNeBhRauBj4qaHpTkPHSUPBw26atNtq5yWOs0j6gIL_hhHljLqqvMmI3vw0B3deVxqy2MvgU40wkYYfETwaBaIVTH5OtO60EBULwN7PBCYDVOT2ZskBZnQCp29IZqam1GwZHDBHEVbw9djRXl9ZwKOUHa9mv_dKHJAB_cMtpAzOF0H6fnyzLr1kZEd-hfHUY-ZF1mrEPgUBKC5swYTfgYpBpgWjnlxMKva9tC1iHAwKSyRcsRc7BnSzBJv9ZU8UhzrhIlJ1ILGjjJQcUwicfVIokN9X79fxllkkqQ&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
)
# sign_in(driver, config)
self.logger.info("Signed in successful")
get_title(driver, config, "interface_2 · Streamlit")
if driver.title == "interface_2 · Streamlit":
self.logger.info("Interface 2 page opened successfully")
assert True
else:
self.logger.info("Interface 2 page not opened successfully")
assert False
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Show Result button")
@allure.title("Verify the 'show result' button functionality")
@allure.feature("Interface 2")
@allure.story("Verify the 'show result' button functionality")
@allure.severity(allure.severity_level.CRITICAL)
@allure.testcase("TC-008")
def test_verify_show_results_button(self, driver, config):
self.logger.info("Verify the 'show result' button functionality")
driver.get(
config["url_interface_2"]
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P91FtoYFvR20dqHG0dEKQhDe1BftWl3mQWsfh9s8UJttZdIVkp4cYIkmKKhTtdGruEzTbeZjcCH6mii-K8QH5QDmQ9chVv-P5lGlTOPig_9AZ_6ZZEty4XWPFPJzseHk4JsvCk36kgebUZvfT2X2MfMEsRi-TnOC2CWhhlurm0a8mCR7WzDWHLzPHpFAwcd-GS7V3N8NUri6LDskw8E1HiOtMSs0SwwZCGw2A7GZV59MrYvNxi8YyousqNRLhdOg56PrzlhLk5l-hgm9ZX9NrKYmlNmb3LYFrxd8zgWQ5fdulyColwquQHTGZ4kRwM49xCdTEsCDprDYqopmMoPXcwvjFz69f_a9S-qT8jNhFGN_WmdoUlq02J0BSLnD-IfKNAQe5w2D6SKCYH4LLZnSSKpQrJUFosqYmxOsk34Z80enm-f4kiJhzqYt9Qwa6n70J3bF-6vXCjZdu3l5iI5CLc7QcaicPmfiOQBGu_EyFploqsW7fmqfNhJ92_W0jL_yQvgZaBtMeZH23BmVpYQGdNeBhRauBj4qaHpTkPHSUPBw26atNtq5yWOs0j6gIL_hhHljLqqvMmI3vw0B3deVxqy2MvgU40wkYYfETwaBaIVTH5OtO60EBULwN7PBCYDVOT2ZskBZnQCp29IZqam1GwZHDBHEVbw9djRXl9ZwKOUHa9mv_dKHJAB_cMtpAzOF0H6fnyzLr1kZEd-hfHUY-ZF1mrEPgUBKC5swYTfgYpBpgWjnlxMKva9tC1iHAwKSyRcsRc7BnSzBJv9ZU8UhzrhIlJ1ILGjjJQcUwicfVIokN9X79fxllkkqQ&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
)
with allure.step("Signing in"):
# sign_in(driver, config)
self.logger.info("Signed in successful")
get_title(driver, config, "interface_2 · Streamlit")
with allure.step("Selecting Client"):
interface_2 = Interface_2(driver, config)
interface_2.select_client("Centene")
with allure.step("Selecting Batch"):
interface_2.select_batch()
with allure.step("Selecting Contract"):
interface_2.select_contract()
with allure.step("Selecting field Group"):
interface_2.select_field_group()
with allure.step("Click on 'Show Result' Button"):
interface_2.click_show_results()
interface_2.check_table_contain()
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Show Result button without Contract")
@allure.title(
"Verify the 'show result' button functionality without selecting contracts"
)
@allure.feature("Interface 2")
@allure.story(
"Verify the 'show result' button functionality without selecting contracts"
)
@allure.severity(allure.severity_level.CRITICAL)
def test_verify_show_results_button_without_contract(self, driver, config):
self.logger.info(
"Verify the 'show result' button functionality without selecting contracts"
)
driver.get(
config["url_interface_2"]
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P91FtoYFvR20dqHG0dEKQhDe1BftWl3mQWsfh9s8UJttZdIVkp4cYIkmKKhTtdGruEzTbeZjcCH6mii-K8QH5QDmQ9chVv-P5lGlTOPig_9AZ_6ZZEty4XWPFPJzseHk4JsvCk36kgebUZvfT2X2MfMEsRi-TnOC2CWhhlurm0a8mCR7WzDWHLzPHpFAwcd-GS7V3N8NUri6LDskw8E1HiOtMSs0SwwZCGw2A7GZV59MrYvNxi8YyousqNRLhdOg56PrzlhLk5l-hgm9ZX9NrKYmlNmb3LYFrxd8zgWQ5fdulyColwquQHTGZ4kRwM49xCdTEsCDprDYqopmMoPXcwvjFz69f_a9S-qT8jNhFGN_WmdoUlq02J0BSLnD-IfKNAQe5w2D6SKCYH4LLZnSSKpQrJUFosqYmxOsk34Z80enm-f4kiJhzqYt9Qwa6n70J3bF-6vXCjZdu3l5iI5CLc7QcaicPmfiOQBGu_EyFploqsW7fmqfNhJ92_W0jL_yQvgZaBtMeZH23BmVpYQGdNeBhRauBj4qaHpTkPHSUPBw26atNtq5yWOs0j6gIL_hhHljLqqvMmI3vw0B3deVxqy2MvgU40wkYYfETwaBaIVTH5OtO60EBULwN7PBCYDVOT2ZskBZnQCp29IZqam1GwZHDBHEVbw9djRXl9ZwKOUHa9mv_dKHJAB_cMtpAzOF0H6fnyzLr1kZEd-hfHUY-ZF1mrEPgUBKC5swYTfgYpBpgWjnlxMKva9tC1iHAwKSyRcsRc7BnSzBJv9ZU8UhzrhIlJ1ILGjjJQcUwicfVIokN9X79fxllkkqQ&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
)
with allure.step("Signing in"):
# sign_in(driver, config)
self.logger.info("Signed in successful")
get_title(driver, config, "interface_2 · Streamlit")
with allure.step("Selecting Client"):
interface_2 = Interface_2(driver, config)
interface_2.select_client("Centene")
with allure.step("Selecting Batch"):
interface_2.select_batch()
with allure.step("Selecting field Group"):
interface_2.select_field_group()
with allure.step("Click on 'Show Result' Button"):
interface_2.click_show_results()
assert interface_2.check_error_message() == "Please select Contract"
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Show Result button without Field Groups")
@allure.title(
"Verify the 'show result' button functionality without selecting field groups"
)
@allure.feature("Interface 2")
@allure.story(
"Verify the 'show result' button functionality without selecting field groups"
)
@allure.severity(allure.severity_level.CRITICAL)
def test_verify_show_results_button_without_field_group(self, driver, config):
self.logger.info(
"Verify the 'show result' button functionality without selecting field groups"
)
driver.get(
config["url_interface_2"]
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P91FtoYFvR20dqHG0dEKQhDe1BftWl3mQWsfh9s8UJttZdIVkp4cYIkmKKhTtdGruEzTbeZjcCH6mii-K8QH5QDmQ9chVv-P5lGlTOPig_9AZ_6ZZEty4XWPFPJzseHk4JsvCk36kgebUZvfT2X2MfMEsRi-TnOC2CWhhlurm0a8mCR7WzDWHLzPHpFAwcd-GS7V3N8NUri6LDskw8E1HiOtMSs0SwwZCGw2A7GZV59MrYvNxi8YyousqNRLhdOg56PrzlhLk5l-hgm9ZX9NrKYmlNmb3LYFrxd8zgWQ5fdulyColwquQHTGZ4kRwM49xCdTEsCDprDYqopmMoPXcwvjFz69f_a9S-qT8jNhFGN_WmdoUlq02J0BSLnD-IfKNAQe5w2D6SKCYH4LLZnSSKpQrJUFosqYmxOsk34Z80enm-f4kiJhzqYt9Qwa6n70J3bF-6vXCjZdu3l5iI5CLc7QcaicPmfiOQBGu_EyFploqsW7fmqfNhJ92_W0jL_yQvgZaBtMeZH23BmVpYQGdNeBhRauBj4qaHpTkPHSUPBw26atNtq5yWOs0j6gIL_hhHljLqqvMmI3vw0B3deVxqy2MvgU40wkYYfETwaBaIVTH5OtO60EBULwN7PBCYDVOT2ZskBZnQCp29IZqam1GwZHDBHEVbw9djRXl9ZwKOUHa9mv_dKHJAB_cMtpAzOF0H6fnyzLr1kZEd-hfHUY-ZF1mrEPgUBKC5swYTfgYpBpgWjnlxMKva9tC1iHAwKSyRcsRc7BnSzBJv9ZU8UhzrhIlJ1ILGjjJQcUwicfVIokN9X79fxllkkqQ&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
)
with allure.step("Signing in"):
# sign_in(driver, config)
self.logger.info("Signed in successful")
get_title(driver, config, "interface_2 · Streamlit")
with allure.step("Selecting Client"):
interface_2 = Interface_2(driver, config)
interface_2.select_client("Centene")
with allure.step("Selecting Batch"):
interface_2.select_batch()
with allure.step("Selecting Contract"):
interface_2.select_contract()
with allure.step("Click on 'Show Result' Button"):
interface_2.click_show_results()
assert interface_2.check_error_message() == "Please select a Field Group"
@allure.parent_suite("Tests for web interface")
@allure.suite("Tests for Interface 2")
@allure.sub_suite("Tests for Kickoff Database Integration")
@allure.title("Verifying Kickoff Database Integration Functionality")
@allure.feature("Interface 2")
@allure.story("Verifying Kickoff Database Integration Functionality")
@allure.severity(allure.severity_level.CRITICAL)
def test_verify_Kickoff_Database_Integration(self, driver, config):
self.logger.info("Verifying Kickoff Database Integration Functionality")
driver.get(
config["url_interface_2"]
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P91FtoYFvR20dqHG0dEKQhDe1BftWl3mQWsfh9s8UJttZdIVkp4cYIkmKKhTtdGruEzTbeZjcCH6mii-K8QH5QDmQ9chVv-P5lGlTOPig_9AZ_6ZZEty4XWPFPJzseHk4JsvCk36kgebUZvfT2X2MfMEsRi-TnOC2CWhhlurm0a8mCR7WzDWHLzPHpFAwcd-GS7V3N8NUri6LDskw8E1HiOtMSs0SwwZCGw2A7GZV59MrYvNxi8YyousqNRLhdOg56PrzlhLk5l-hgm9ZX9NrKYmlNmb3LYFrxd8zgWQ5fdulyColwquQHTGZ4kRwM49xCdTEsCDprDYqopmMoPXcwvjFz69f_a9S-qT8jNhFGN_WmdoUlq02J0BSLnD-IfKNAQe5w2D6SKCYH4LLZnSSKpQrJUFosqYmxOsk34Z80enm-f4kiJhzqYt9Qwa6n70J3bF-6vXCjZdu3l5iI5CLc7QcaicPmfiOQBGu_EyFploqsW7fmqfNhJ92_W0jL_yQvgZaBtMeZH23BmVpYQGdNeBhRauBj4qaHpTkPHSUPBw26atNtq5yWOs0j6gIL_hhHljLqqvMmI3vw0B3deVxqy2MvgU40wkYYfETwaBaIVTH5OtO60EBULwN7PBCYDVOT2ZskBZnQCp29IZqam1GwZHDBHEVbw9djRXl9ZwKOUHa9mv_dKHJAB_cMtpAzOF0H6fnyzLr1kZEd-hfHUY-ZF1mrEPgUBKC5swYTfgYpBpgWjnlxMKva9tC1iHAwKSyRcsRc7BnSzBJv9ZU8UhzrhIlJ1ILGjjJQcUwicfVIokN9X79fxllkkqQ&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
)
with allure.step("Selecting Client"):
# sign_in(driver, config)
self.logger.info("Signed in successful")
get_title(driver, config, "interface_2 · Streamlit")
with allure.step("Selecting Client"):
interface_2 = Interface_2(driver, config)
interface_2.select_client("Centene")
with allure.step("Selecting Batch"):
interface_2.select_batch()
with allure.step("Selecting Contract"):
interface_2.select_contract()
with allure.step("Selecting field Group"):
interface_2.select_field_group()
with allure.step("Click on 'Show Result' Button"):
interface_2.click_show_results()
interface_2.check_table_contain()
with allure.step("Click on 'Kickoff Database Integration' Button"):
# interface_2.click_kickoff_database_integration_btn()
pass
###Verify with database###