afb6d5185d
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
135 lines
9.6 KiB
Python
135 lines
9.6 KiB
Python
import allure
|
|
|
|
from config.aws_conn import get_s3_client
|
|
from pages.Pre_sign_in_page import Pre_sign_in_page
|
|
from pages.interface_0_page_objects import Interface_0
|
|
from utils.element_related_methods import get_title
|
|
from utils.common_methods import sign_in
|
|
from utils.logger import get_logger
|
|
import boto3
|
|
|
|
|
|
class Test_interface_0:
|
|
|
|
logger = get_logger()
|
|
|
|
# @allure.label("type", 'smoke')
|
|
@allure.parent_suite("Tests for web interface")
|
|
@allure.suite("Tests for Interface 0")
|
|
@allure.sub_suite("Tests for Navigation")
|
|
@allure.title("Verifying designated Interface 0 Page opens successfully")
|
|
@allure.feature("Interface 0")
|
|
@allure.story("Verifying designated Interface 0 Page opens successfully")
|
|
@allure.severity(allure.severity_level.CRITICAL)
|
|
def test_validate_navigation(self, driver, config):
|
|
self.logger.info("Verifying designated Interface 0 Page opens successfully")
|
|
driver.get(config["url_interface_0"])
|
|
get_title(driver, config, "interface_0 · Streamlit")
|
|
if driver.title == "interface_0 · Streamlit":
|
|
self.logger.info("Designated Interface 0 Page opened successfully")
|
|
assert True
|
|
else:
|
|
self.logger.info("Designated Interface 0 Page not opened successfully")
|
|
assert False
|
|
|
|
# @allure.label('type', 'regression', 'smoke')
|
|
@allure.parent_suite("Tests for web interface")
|
|
@allure.suite("Tests for Interface 0")
|
|
@allure.sub_suite("Tests for Authentication")
|
|
@allure.title("Verifying Single Sign-On (SSO) Login for Interface 0")
|
|
@allure.feature("Interface 0")
|
|
@allure.story("Verifying Single Sign-On (SSO) Login for Interface 0")
|
|
@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 0")
|
|
driver.get(
|
|
config["url_interface_0"]
|
|
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P-Xu65_k1cptZUCoWDROksYjcCYq_DvUcJbXG9MczlC6LlsO80A1Y4mYcEajsGirxfVgaxYazfwYb5sXUbARKILzxaoqtvPuW3nJDMPcIjjOCG5bNQo2tu67oUGeIWJEQIMWH0jVXB4D8N1j3m3Rd1lPkV-d_Wr6LNfieAK1ralDynQXV8zd5y5TNJTkplLjazIKbhjMr9SrhfCs4m-_IrWIPcGIteLt4oly-XzxAxgX6mhs0WTgcXqUfuyTuYkPJrZs70exEdNQi48Ml_vZRXux7NXn_yuyRu51qZ34sG89Wj8nkIdmPyoOi-CTwl0QFSUzNKixWczhQssq0WyRfKgw4-afANx2mkHozy9gwL1JbGm6Je29H00ntHrQX0YvSWtEvTT4kdXRh2F6zaS12LZJ31-GUAOUNdZcz09FitSbdEVSF-Z9e4VPNEZVPoUhj3cbFAf02N5Wv3K4vapE24Aof18CHav9gvg5-BcZUzfPhq-zAva2WoC-DANUSPHOjCQlUBRt2WjnJ-9qqAWNV8A9MIf3-tF5kES48HpIVwnt05uCs0t6M6bDJIK6eml4lV9YfVtlmO9LOxhtoMO69Sj5RExcol8Yz_-5T1u0xlbdKlWetUXQTFNwfjcz1u_HYjXVy_fpLFG1M2MdhjtvQ85hxGBv32d8BDYuGeXpjoc-fYEOnm1tOlESrqbZBzFLRv1MmRlkxiAg3uW0Myb32wKjS2iTFp3pkQ-D8Yxv1h0_HRd9ZeCQE-JfLJ2HALswI9wxLFidsCvZ4xaOXpqLZX0o8U7SwHvLw9BRvPvPol5b7mHQ9_OS&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
|
|
)
|
|
# sign_in(driver, config)
|
|
self.logger.info("Signed in successful")
|
|
get_title(driver, config, "interface_0 · Streamlit")
|
|
if driver.title == "interface_0 · Streamlit":
|
|
self.logger.info("Interface 0 page opened successfully")
|
|
assert True
|
|
else:
|
|
self.logger.info("Interface 0 page not opened successfully")
|
|
assert False
|
|
|
|
# @allure.label('type', 'regression', 'smoke')
|
|
@allure.parent_suite("Tests for web interface")
|
|
@allure.suite("Tests for Interface 0")
|
|
@allure.sub_suite("Tests for Batch Creation")
|
|
@allure.title("Verifying S3 bucket is created with batch ID")
|
|
@allure.feature("Interface 0")
|
|
@allure.story("Verifying S3 bucket is created with batch ID")
|
|
@allure.severity(allure.severity_level.CRITICAL)
|
|
@allure.testcase("TC-003")
|
|
def test_verify_batch_creation(self, driver, config):
|
|
self.logger.info("Verifying S3 bucket is created with batch ID")
|
|
driver.get(
|
|
config["url_interface_0"]
|
|
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P-Xu65_k1cptZUCoWDROksYjcCYq_DvUcJbXG9MczlC6LlsO80A1Y4mYcEajsGirxfVgaxYazfwYb5sXUbARKILzxaoqtvPuW3nJDMPcIjjOCG5bNQo2tu67oUGeIWJEQIMWH0jVXB4D8N1j3m3Rd1lPkV-d_Wr6LNfieAK1ralDynQXV8zd5y5TNJTkplLjazIKbhjMr9SrhfCs4m-_IrWIPcGIteLt4oly-XzxAxgX6mhs0WTgcXqUfuyTuYkPJrZs70exEdNQi48Ml_vZRXux7NXn_yuyRu51qZ34sG89Wj8nkIdmPyoOi-CTwl0QFSUzNKixWczhQssq0WyRfKgw4-afANx2mkHozy9gwL1JbGm6Je29H00ntHrQX0YvSWtEvTT4kdXRh2F6zaS12LZJ31-GUAOUNdZcz09FitSbdEVSF-Z9e4VPNEZVPoUhj3cbFAf02N5Wv3K4vapE24Aof18CHav9gvg5-BcZUzfPhq-zAva2WoC-DANUSPHOjCQlUBRt2WjnJ-9qqAWNV8A9MIf3-tF5kES48HpIVwnt05uCs0t6M6bDJIK6eml4lV9YfVtlmO9LOxhtoMO69Sj5RExcol8Yz_-5T1u0xlbdKlWetUXQTFNwfjcz1u_HYjXVy_fpLFG1M2MdhjtvQ85hxGBv32d8BDYuGeXpjoc-fYEOnm1tOlESrqbZBzFLRv1MmRlkxiAg3uW0Myb32wKjS2iTFp3pkQ-D8Yxv1h0_HRd9ZeCQE-JfLJ2HALswI9wxLFidsCvZ4xaOXpqLZX0o8U7SwHvLw9BRvPvPol5b7mHQ9_OS&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
|
|
)
|
|
# sign_in(driver, config)
|
|
with allure.step("Signing in"):
|
|
self.logger.info("Signed in successful")
|
|
interface_0_page = Interface_0(driver, config)
|
|
|
|
with allure.step("Selecting Client"):
|
|
client_name = interface_0_page.select_client("Centene")
|
|
with allure.step("Uploading files"):
|
|
interface_0_page.upload_files(client_name)
|
|
with allure.step("Creating Batch"):
|
|
interface_0_page.create_batch()
|
|
# self.logger.info(f"Created batch with Batch ID: {interface_0_page.p_element.text}")
|
|
with allure.step("Asserting Batch Creating"):
|
|
assert interface_0_page.verify_message("POS").startswith("batch_")
|
|
|
|
@allure.parent_suite("Tests for web interface")
|
|
@allure.suite("Tests for Interface 0")
|
|
@allure.sub_suite("Tests for Batch Creation without client")
|
|
@allure.title("Verifying S3 bucket is created without selecting client")
|
|
@allure.feature("Interface 0")
|
|
@allure.story("Verifying S3 bucket is created without selecting client")
|
|
@allure.severity(allure.severity_level.CRITICAL)
|
|
def test_verify_batch_creation_without_client(self, driver, config):
|
|
self.logger.info("Verifying S3 bucket is created without selecting client")
|
|
driver.get(
|
|
config["url_interface_0"]
|
|
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P-Xu65_k1cptZUCoWDROksYjcCYq_DvUcJbXG9MczlC6LlsO80A1Y4mYcEajsGirxfVgaxYazfwYb5sXUbARKILzxaoqtvPuW3nJDMPcIjjOCG5bNQo2tu67oUGeIWJEQIMWH0jVXB4D8N1j3m3Rd1lPkV-d_Wr6LNfieAK1ralDynQXV8zd5y5TNJTkplLjazIKbhjMr9SrhfCs4m-_IrWIPcGIteLt4oly-XzxAxgX6mhs0WTgcXqUfuyTuYkPJrZs70exEdNQi48Ml_vZRXux7NXn_yuyRu51qZ34sG89Wj8nkIdmPyoOi-CTwl0QFSUzNKixWczhQssq0WyRfKgw4-afANx2mkHozy9gwL1JbGm6Je29H00ntHrQX0YvSWtEvTT4kdXRh2F6zaS12LZJ31-GUAOUNdZcz09FitSbdEVSF-Z9e4VPNEZVPoUhj3cbFAf02N5Wv3K4vapE24Aof18CHav9gvg5-BcZUzfPhq-zAva2WoC-DANUSPHOjCQlUBRt2WjnJ-9qqAWNV8A9MIf3-tF5kES48HpIVwnt05uCs0t6M6bDJIK6eml4lV9YfVtlmO9LOxhtoMO69Sj5RExcol8Yz_-5T1u0xlbdKlWetUXQTFNwfjcz1u_HYjXVy_fpLFG1M2MdhjtvQ85hxGBv32d8BDYuGeXpjoc-fYEOnm1tOlESrqbZBzFLRv1MmRlkxiAg3uW0Myb32wKjS2iTFp3pkQ-D8Yxv1h0_HRd9ZeCQE-JfLJ2HALswI9wxLFidsCvZ4xaOXpqLZX0o8U7SwHvLw9BRvPvPol5b7mHQ9_OS&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
|
|
)
|
|
# sign_in(driver, config)
|
|
self.logger.info("Signed in successful")
|
|
interface_0_page = Interface_0(driver, config)
|
|
interface_0_page.create_batch()
|
|
assert (
|
|
interface_0_page.verify_message("NEG") == "No Client Name Selected."
|
|
), "Batch ID is created instead of message"
|
|
|
|
# @allure.label("type", 'regression')
|
|
@allure.parent_suite("Tests for web interface")
|
|
@allure.suite("Tests for Interface 0")
|
|
@allure.sub_suite("Tests for Batch Creation without files")
|
|
@allure.title("Verifying S3 bucket is created with no files are uploaded")
|
|
@allure.feature("Interface 0")
|
|
@allure.story("Verifying S3 bucket is created with no files are uploaded")
|
|
@allure.severity(allure.severity_level.CRITICAL)
|
|
def test_verify_no_files_uploaded(self, driver, config):
|
|
self.logger.info("Verifying S3 bucket is created with no files are uploaded")
|
|
driver.get(
|
|
config["url_interface_0"]
|
|
+ "?code=0.AVsA57e_zrnCv0-sKQYbnoaPz5D--u_XfqNDqwMZoL4vF1hbAN8.AgABBAIAAAApTwJmzXqdR4BN2miheQMYAgDs_wUA9P9LX84t_sXygReogqiCvr7kFfaCaIcCEnNTGHigLFFW27KaCXXvBZ4b6UzF9L92ozdGa9JxHLXSNERV8wUc7DZRC5U_FC1U-hcSZjGFGA_rteC6-iOnqSqzp58hTnxJw5gBPxwqO0ZIBZy3zbjfe2piABPrTTvvftQ_ccdzbZoSoBfVbvpnWNpesYapFyc8zCnUdfKAS3sz65mtBouZqqgRQ6C31NhaoUMl5qFmqLs01vM50k3VrnRA_AqkzMTne0nNgt53FsdQ2WbubuIIZnwNFbDO8WwskHT2r_jVjnSXXs7pgufPMgV0DOlu2BRZKnabLSqiYa0OGsUepnB7dTV9QlduQw-_TYyXdiReapwXxkz9RtfgM8EUgt1ldTGB5Qd4GOtXDwACNcas53RxUoKJeI2vLVLSXKAtvhROs8NqvF222T1IWWDjjari6-M661OZd2kEmx9JeRilSlmIylonz8qhmL40dRWsDppiSeoPiCgIQsoIqZJiCD8TTMyUSo23qxDcQZamIR8LlteELMQdZHUpSfQG8vKCF02I7Bxc8zD8aksP-27O7g7JTCwWQ3OOFbTGH2hy9_JZFzWCj6W8vYbb9yjGJrAccevXg6T-FBa6LBqWZBmTP9q6Ic8XQOUFZaYMkceMuDg6-ARDxyLXWE60ajN3fQA0xkFrWXOyaCJY3fYnxpHwRk_jyC_yEAaZCciUHFyDPK_Uiudh4L4jbpy7wKM_GPR0faJE0OPJbTc32SId6-LC9e2ECaFYtyUNTkLw-DVhZ2MnFbUEj-Y0SAoRYchAroTF7EfByMFLqSXAKeGj&session_state=7515cdc9-6fd7-4e93-b526-f0a3c23401fd#"
|
|
)
|
|
# sign_in(driver, config)
|
|
with allure.step("Sign In"):
|
|
self.logger.info("Signed in successful")
|
|
interface_0_page = Interface_0(driver, config)
|
|
with allure.step("Selecting Client"):
|
|
interface_0_page.select_client("Centene")
|
|
with allure.step("Creating Batch"):
|
|
interface_0_page.create_batch()
|
|
assert (
|
|
interface_0_page.verify_message("NEG") == "No Files Selected."
|
|
), "Batch ID is created instead of message"
|