diff --git a/.gitignore b/.gitignore index e1824046..41ecb6b7 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,8 @@ pnpm-debug.log* /playwright/.cache/ artifacts/ ortoni-report/ +/playwright-tests/.env.dev +/playwright-tests/.env # Misc coverage/* diff --git a/playwright-tests/.env b/playwright-tests/.env deleted file mode 100644 index 22fc8ecc..00000000 --- a/playwright-tests/.env +++ /dev/null @@ -1,14 +0,0 @@ -# CLIENT_NAME="undefined" # TODO: evaluate necessity of this -# CLIENT_TAG="undefined" -# BASE_URL="https://selfservice.dev.glassclaim.com" - -CCIS_API_AUTH= "" # Input manually - -# DEV -BASE_URL="https://selfservice.test.glassclaim.com" -CCIS_API_URL="https://api.test.belronus.io" # Test API connects to our dev environment for some reason -ADMIN_SERVICE_API_URL="https://issadminapi.dev.sagaws.net/iss-admin/api/v1/" - -# QA -# BASE_URL="https://selfservice.test.glassclaim.com" -# CCIS_API_URL="https://api.test.belronus.io" diff --git a/playwright-tests/.env.dev b/playwright-tests/.env.dev deleted file mode 100644 index 493f0442..00000000 --- a/playwright-tests/.env.dev +++ /dev/null @@ -1,14 +0,0 @@ -# CLIENT_NAME="undefined" # TODO: evaluate necessity of this -# CLIENT_TAG="undefined" -# BASE_URL="https://selfservice.dev.glassclaim.com" - -CCIS_API_AUTH="" # Input manually - -# DEV -BASE_URL="https://selfservice.dev.glassclaim.com" -CCIS_API_URL="https://api.test.belronus.io" # Test API connects to our dev environment for some reason -ADMIN_SERVICE_API_URL="https://issadminapi.dev.sagaws.net/iss-admin/api/v1/" - -# QA -# BASE_URL="https://selfservice.test.glassclaim.com" -# CCIS_API_URL="https://api.test.belronus.io" \ No newline at end of file diff --git a/playwright-tests/.env.example b/playwright-tests/.env.example index 303640d2..e9355c42 100644 --- a/playwright-tests/.env.example +++ b/playwright-tests/.env.example @@ -1,12 +1,15 @@ +# Avoid inline comments in your environment variable files, as they may be interpreted as part of the value +# Set value to API auth token CCIS_API_AUTH= # DEV +# Test API connects to our DEV environments for some reason BASE_URL="https://selfservice.dev.glassclaim.com" -CCIS_API_URL="https://api.test.belronus.io" # Test API connects to our DEV environments for some reason +CCIS_API_URL="https://api.test.belronus.io" ADMIN_SERVICE_API_URL="https://issadminapi.dev.sagaws.net/iss-admin/api/v1/" DIGITAL_API_URL="https://digitalapi.dev.safelite.io" -ENABLE_ACCESSIBILITY_TESTING = true -ENABLE_MOCK_TESTING = false +ENABLE_ACCESSIBILITY_TESTING=true +ENABLE_MOCK_TESTING=false # QA diff --git a/playwright-tests/business-logic/data/MockPolicyData.ts b/playwright-tests/business-logic/data/MockPolicyData.ts index 88063bca..4748cfc9 100644 --- a/playwright-tests/business-logic/data/MockPolicyData.ts +++ b/playwright-tests/business-logic/data/MockPolicyData.ts @@ -31,7 +31,8 @@ const policySoapByScenario: { [x: string]: string } = { '0028a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2024-11-21T18:14:10Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2024-11-21T18:14:10Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>346e69fa-cc7e-4da3-be05-75191f5187c7 <_xml:PolicyInqRs> <_xml:RqUID>346e69fa-cc7e-4da3-be05-75191f5187c7 <_xml:TransactionResponseDt>2024-11-21T18:14:10Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-09-01 <_xml:Requestor id= \"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= \"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= \"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>F <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>secondary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>AL <_xml:ContractTerm> <_xml:EffectiveDt>2023-03-01 <_xml:ExpirationDt>2099-03-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3542759911464 <_xml:Location> <_xml:ItemIdInfo id= \"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>FORD <_xml:Model>ECONOLINE <_xml:ModelYear>2013 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>AL <_xml:VehIdentificationNumber>1FBNE3BL0DDA59035 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>5000.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>6 <_xml:Manufacturer>HOND <_xml:Model>ELEMENT <_xml:ModelYear>2006 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>AL <_xml:VehIdentificationNumber>5J6YH27746L026807 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= \"endorsementId_1\" IdRef= \"PersAutoPolicyID_1\">001 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0029a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2024-11-21T18:14:10Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2024-11-21T18:14:10Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>346e69fa-cc7e-4da3-be05-75191f5187c7 <_xml:PolicyInqRs> <_xml:RqUID>346e69fa-cc7e-4da3-be05-75191f5187c7 <_xml:TransactionResponseDt>2024-11-21T18:14:10Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2023-09-01 <_xml:Requestor id= \"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= \"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= \"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>F <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>secondary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>AL <_xml:ContractTerm> <_xml:EffectiveDt>2023-03-01 <_xml:ExpirationDt>2099-03-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3542759911464 <_xml:Location> <_xml:ItemIdInfo id= \"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>FORD <_xml:Model>ECONOLINE <_xml:ModelYear>2013 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>AL <_xml:VehIdentificationNumber>1FBNE3BL0DDA59035 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>5000.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>6 <_xml:Manufacturer>HOND <_xml:Model>ELEMENT <_xml:ModelYear>2006 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>AL <_xml:VehIdentificationNumber>5J6YH27746L026807 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>500.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= \"endorsementId_1\" IdRef= \"PersAutoPolicyID_1\">001 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', '0030a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-03-05T19:17:16Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-03-05T19:17:16Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>1b99d815-bced-46ac-9eaf-4694f54a270b <_xml:PolicyInqRs> <_xml:RqUID>1b99d815-bced-46ac-9eaf-4694f54a270b <_xml:TransactionResponseDt>2025-03-05T19:17:16Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2022-06-10 <_xml:Requestor id=\"RequestorId_1\" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\" /> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo /> <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-03-01 <_xml:ExpirationDt>2099-03-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3012599166287 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>DODG <_xml:Model>CHARGER <_xml:ModelYear>2012 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>2C3CDXBG6CH260654 <_xml:VehRateGroupInfo> <_xml:RateGroup>037 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>500 <_xml:CoverageCd>parking_guard <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', - + '0031a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id= "RequestorId_1" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= "InsuredOrPrincipalId_1" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= "PersAutoPolicyID_1"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id= "ItemIdInfoId_1" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>FREI <_xml:Model>CASCADIA <_xml:ModelYear>2021 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>3AKJHPDV7MSLJ2958 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>250.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= "endorsementId_1" IdRef= "PersAutoPolicyID_1">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', + '0032a': ' <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2025-01-03T14:13:58Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2025-01-03T14:13:58Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:PolicyInqRs> <_xml:RqUID>cda7f1a9-6a7c-4851-8c75-9eba3f721e26 <_xml:TransactionResponseDt>2025-01-03T14:13:58Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2017-02-06 <_xml:Requestor id= "RequestorId_1" /> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id= "InsuredOrPrincipalId_1" /> <_xml:PolInfo> <_xml:PersAutoPolicy id= "PersAutoPolicyID_1"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${lastName} <_xml:GivenName>${firstName} <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:Communications> <_xml:PhoneInfo> <_xml:PhoneTypeCd>Home <_xml:PhoneNumber>${phoneNumber} <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>STD <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>CA <_xml:ContractTerm> <_xml:EffectiveDt>2023-11-01 <_xml:ExpirationDt>2099-11-01 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>3861415357665 <_xml:Location> <_xml:ItemIdInfo id= "ItemIdInfoId_1" /> <_xml:Addr> <_xml:Addr1>${streetAddress} <_xml:City>${city} <_xml:StateProvCd>${state} <_xml:PostalCode>${postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>ISUZ <_xml:Model>REACH <_xml:ModelYear>2016 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>CA <_xml:VehIdentificationNumber>JALB4T177G7W00847 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:Coverage> <_xml:CoverageCd>GLSS <_xml:CoverageDesc>ACV <_xml:Deductible> <_xml:FormatCurrencyAmt> <_xml:Amt>250.00 <_xml:Option> <_xml:OptionCd>V <_xml:OptionValue>1 <_xml:OptionValueDesc>COVERAGE_LIMIT_IND <_xml:RemarkText id= "endorsementId_1" IdRef= "PersAutoPolicyID_1">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ', } const claimRegistrationValue = "{\"claimNumber\":\"058913992\",\"reportedDate\":\"2023-11-01T18:56:08.264Z\",\"howReported\":\"digital\",\"status\":\"registered\",\"lossCategory\":\"glassOnly\",\"lossCause\":\"glassOnly\",\"lossCauseDetail\":null,\"lossDate\":\"2023-11-01\",\"lossTime\":\"00:00\",\"lossDescription\":\"ROCK FROM ROAD - NO ONE AT FAULT\",\"lossLocation\":{\"primary\":true,\"line1\":null,\"line2\":null,\"city\":\"Columbus\",\"county\":null,\"state\":\"OR\",\"postalCode\":\"\",\"country\":\"US\",\"type\":null,\"locationName\":null,\"subType\":null},\"_links\":{\"reporter\":{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"},\"primaryContact\":null,\"insureds\":[{\"id\":\"65429f485e8cd37072a5bb5d\",\"href\":\"claims/058913992/contacts/65429f485e8cd37072a5bb5d\",\"title\":\"BRANDON JOHNSON\"}],\"pedestrianCyclists\":[],\"contacts\":{\"id\":null,\"href\":\"claims/058913992/contacts\"},\"claimDamage\":{\"id\":null,\"href\":\"claims/058913992/claim-damage\"},\"vehicleIncidents\":[{\"id\":\"65429f4b31209b23b788c38e\",\"href\":\"claims/058913992/vehicle-incidents/65429f4b31209b23b788c38e\",\"vehicle\":\"BMW740\"}],\"propertyIncidents\":{\"dwelling\":null,\"otherStructure\":null,\"personalProperty\":null,\"livingExpense\":null},\"injuryIncidents\":[]}}"; @@ -75,7 +76,7 @@ export default class MockPolicyData { } static getNoCompPolicySoap(customerDetails: ICustomerDetails, policyNumber: string) { - const noCompPolicyValue = `<_xml:ACORD><_xml:SignonRs><_xml:CustId><_xml:SPName>Safelite<_xml:CustPermId>00005<_xml:ClientDt>2024-08-20T13:23:48Z<_xml:CustLangPref>EN<_xml:ClientApp><_xml:Org>Liberty Mutual<_xml:Name>PM CNG<_xml:Version>1.0<_xml:ServerDt>2024-08-20T13:23:48Z<_xml:Language>EN<_xml:InsuranceSvcRs><_xml:RqUID>ce3e4434-4905-4b76-b8b0-d0b1caa516cd<_xml:PolicyInqRs><_xml:RqUID>ce3e4434-4905-4b76-b8b0-d0b1caa516cd<_xml:TransactionResponseDt>2024-08-20T13:23:48Z<_xml:MsgStatus><_xml:MsgStatusCd>Success<_xml:AsOfDt>2019-11-20<_xml:Requestor id=\"RequestorId_1\"/><_xml:PartyInqInfo><_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\"/><_xml:PolInfo><_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"><_xml:InsuredOrPrincipal><_xml:GeneralPartyInfo><_xml:NameInfo><_xml:PersonName><_xml:Surname>${customerDetails.lastName}<_xml:GivenName>${customerDetails.firstName}<_xml:Addr><_xml:Addr1>${customerDetails.address.street}<_xml:City>${customerDetails.address.city}<_xml:StateProvCd>${customerDetails.address.state}<_xml:PostalCode>${customerDetails.address.postalCode}<_xml:Country>US<_xml:Communications/><_xml:InsuredOrPrincipalInfo><_xml:InsuredOrPrincipalRoleCd>primary<_xml:PersonInfo><_xml:GenderCd>M<_xml:PersPolicy><_xml:PolicyNumber>${policyNumber}<_xml:PolicyVersion>GRS<_xml:CompanyProductCd>liberty<_xml:LOBCd>AUTOP<_xml:ControllingStateProvCd>VA<_xml:ContractTerm><_xml:EffectiveDt>2000-09-27<_xml:ExpirationDt>2099-09-27<_xml:GroupId>000<_xml:MiscParty><_xml:ItemIdInfo><_xml:InsurerId>998891142443758<_xml:Location><_xml:ItemIdInfo id=\"ItemIdInfoId_1\"/><_xml:Addr><_xml:Addr1>${customerDetails.address.street}<_xml:City>${customerDetails.address.city}<_xml:StateProvCd>${customerDetails.address.state}<_xml:PostalCode>${customerDetails.address.postalCode}<_xml:Country>US<_xml:PersAutoLineBusiness><_xml:LOBCd>AUTOP<_xml:PersVeh><_xml:ItemIdInfo><_xml:InsurerId>1<_xml:Manufacturer>SBRU<_xml:Model>FORESTER<_xml:ModelYear>2006<_xml:Registration><_xml:RegistrationId>UNKNOWN<_xml:StateProvCd>VA<_xml:VehIdentificationNumber>JF1SG63616B121212<_xml:VehRateGroupInfo><_xml:RateGroup>000<_xml:CoverageCd>service_level_ind<_xml:VehRateGroupInfo><_xml:RateGroup>000<_xml:CoverageCd>parking_guard<_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000<_xml:PolicySummaryInfo><_xml:PolicyStatusCd>ACTIVE` + const noCompPolicyValue = ` <_xml:ACORD> <_xml:SignonRs> <_xml:CustId> <_xml:SPName>Safelite <_xml:CustPermId>00005 <_xml:ClientDt>2024-08-20T13:23:48Z <_xml:CustLangPref>EN <_xml:ClientApp> <_xml:Org>Liberty Mutual <_xml:Name>PM CNG <_xml:Version>1.0 <_xml:ServerDt>2024-08-20T13:23:48Z <_xml:Language>EN <_xml:InsuranceSvcRs> <_xml:RqUID>ce3e4434-4905-4b76-b8b0-d0b1caa516cd <_xml:PolicyInqRs> <_xml:RqUID>ce3e4434-4905-4b76-b8b0-d0b1caa516cd <_xml:TransactionResponseDt>2024-08-20T13:23:48Z <_xml:MsgStatus> <_xml:MsgStatusCd>Success <_xml:AsOfDt>2019-11-20 <_xml:Requestor id=\"RequestorId_1\"/> <_xml:PartyInqInfo> <_xml:InsuredOrPrincipal id=\"InsuredOrPrincipalId_1\"/> <_xml:PolInfo> <_xml:PersAutoPolicy id=\"PersAutoPolicyID_1\"> <_xml:InsuredOrPrincipal> <_xml:GeneralPartyInfo> <_xml:NameInfo> <_xml:PersonName> <_xml:Surname>${customerDetails.lastName} <_xml:GivenName>${customerDetails.firstName} <_xml:Addr> <_xml:Addr1>${customerDetails.address.street} <_xml:City>${customerDetails.address.city} <_xml:StateProvCd>${customerDetails.address.state} <_xml:PostalCode>${customerDetails.address.postalCode} <_xml:Country>US <_xml:Communications/> <_xml:InsuredOrPrincipalInfo> <_xml:InsuredOrPrincipalRoleCd>primary <_xml:PersonInfo> <_xml:GenderCd>M <_xml:PersPolicy> <_xml:PolicyNumber>${policyNumber} <_xml:PolicyVersion>GRS <_xml:CompanyProductCd>liberty <_xml:LOBCd>AUTOP <_xml:ControllingStateProvCd>VA <_xml:ContractTerm> <_xml:EffectiveDt>2000-09-27 <_xml:ExpirationDt>2099-09-27 <_xml:GroupId>000 <_xml:MiscParty> <_xml:ItemIdInfo> <_xml:InsurerId>998891142443758 <_xml:Location> <_xml:ItemIdInfo id=\"ItemIdInfoId_1\"/> <_xml:Addr> <_xml:Addr1>${customerDetails.address.street} <_xml:City>${customerDetails.address.city} <_xml:StateProvCd>${customerDetails.address.state} <_xml:PostalCode>${customerDetails.address.postalCode} <_xml:Country>US <_xml:PersAutoLineBusiness> <_xml:LOBCd>AUTOP <_xml:PersVeh> <_xml:ItemIdInfo> <_xml:InsurerId>1 <_xml:Manufacturer>SBRU <_xml:Model>FORESTER <_xml:ModelYear>2006 <_xml:Registration> <_xml:RegistrationId>UNKNOWN <_xml:StateProvCd>VA <_xml:VehIdentificationNumber>JF1SG63616B121212 <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>service_level_ind <_xml:VehRateGroupInfo> <_xml:RateGroup>000 <_xml:CoverageCd>parking_guard <_xml:RemarkText id=\"endorsementId_1\" IdRef=\"PersAutoPolicyID_1\">000 <_xml:PolicySummaryInfo> <_xml:PolicyStatusCd>ACTIVE ` return noCompPolicyValue; } } \ No newline at end of file diff --git a/playwright-tests/business-logic/types/Enums.ts b/playwright-tests/business-logic/types/Enums.ts index 2c86a60a..13557a92 100644 --- a/playwright-tests/business-logic/types/Enums.ts +++ b/playwright-tests/business-logic/types/Enums.ts @@ -50,6 +50,9 @@ export enum VehicleDamage { WindshieldTwoChips, WindshieldThreeChips, WindshieldCrack, + WindshieldCrackSingleWindshield, + WindshieldCrackDriverSide, + WindshieldCrackPassengerSide, RearWindow, DriverFrontDoor, DriverRearDoor, diff --git a/playwright-tests/business-logic/types/ITestData.ts b/playwright-tests/business-logic/types/ITestData.ts index be4c1e25..01df8990 100644 --- a/playwright-tests/business-logic/types/ITestData.ts +++ b/playwright-tests/business-logic/types/ITestData.ts @@ -1,7 +1,6 @@ import { ServicePackage, VehicleDamage } from "./Enums" import { IAppointmentDetails, IClaimDetails, ICustomerDetails, IEndorsementDetails, IPartQuestion, IPaymentDetails, IVehicleDetails } from "./CustomerDetails" import IBailoutFlags from "./IBailoutFlags" -import { IPart } from "./DigitalApi" export interface ITestData { isMockTesting: boolean, @@ -37,6 +36,8 @@ export interface ITestData { isRecalNotification: boolean, isRecalWarning: boolean, isSeparateApptsWarning: boolean, // IF true, check for the separate appts warning on VehicleDamagePage - isAuthenticationRequired: boolean + isAuthenticationRequired: boolean, isMoldingQuestion: boolean, -} \ No newline at end of file + isNonServiceable: boolean, // For the flow where a a non-serviceable vehicle is selected on lookup + isNonServiceableVin: boolean, // For the flow where a serviceable vehicle is selected on lookup, but then the VIN of a non-serviceable vehicle is entered +} diff --git a/playwright-tests/pages/PolicyVehiclesPage.ts b/playwright-tests/pages/PolicyVehiclesPage.ts index 98b54217..23ba54c7 100644 --- a/playwright-tests/pages/PolicyVehiclesPage.ts +++ b/playwright-tests/pages/PolicyVehiclesPage.ts @@ -24,4 +24,10 @@ export class PolicyVehiclesPage extends BasePage { async selectVehicleNotListed(){ await this.page.getByText('Vehicle not listed').click(); } -} \ No newline at end of file + + async assertNonServiceableAlertBehavior(){ + const nonServiceableWarning = this.page.getByText('Service not available for your vehicle'); + await expect(nonServiceableWarning).toBeVisible(); + await expect(this.continueButton).toBeDisabled(); + } +} diff --git a/playwright-tests/pages/VehicleDamagePage.ts b/playwright-tests/pages/VehicleDamagePage.ts index a8fc147a..004ca3c1 100644 --- a/playwright-tests/pages/VehicleDamagePage.ts +++ b/playwright-tests/pages/VehicleDamagePage.ts @@ -1,12 +1,15 @@ import { expect, type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; -import { SideDoorDamage, VehicleDamage, WindshieldDamage } from '@business-logic/types/Enums'; +import { VehicleDamage } from '@business-logic/types/Enums'; export class VehicleDamagePage extends BasePage { readonly page: Page; readonly windshieldChkBox: Locator; readonly crackButton: Locator; readonly chipButton: Locator; + readonly singleWindshieldButton: Locator; + readonly splitWindshieldDriverSideButton: Locator; + readonly splitWindshieldPassengerSideButton: Locator; readonly sideDoorButton: Locator; readonly driverSideButton: Locator; readonly passengerSideButton: Locator; @@ -30,6 +33,9 @@ export class VehicleDamagePage extends BasePage { this.windshieldChkBox = this.page.locator('[buttonlabel="Windshield"]'); this.crackButton = this.page.locator('[buttonlabel="Crack"]'); this.chipButton = this.page.locator('[buttonlabel="Chip(s)"]'); + this.singleWindshieldButton = this.page.locator('[buttonlabel="Single windshield"]'); + this.splitWindshieldDriverSideButton = this.page.locator('[buttonlabel="Split windshield, driver side"]'); + this.splitWindshieldPassengerSideButton = this.page.locator('[buttonlabel="Split windshield, passenger side"]'); this.sideDoorButton = this.page.locator('[buttonlabel="Side door"]'); this.driverSideButton = this.page.locator('[buttonlabel="Driver side"]'); this.passengerSideButton = this.page.locator('[buttonlabel="Passenger side"]'); @@ -82,6 +88,21 @@ export class VehicleDamagePage extends BasePage { await this.windshieldChkBox.check(); await this.selectCrack(); break; + case VehicleDamage.WindshieldCrackSingleWindshield: + await this.windshieldChkBox.check(); + await this.selectCrack(); + await this.singleWindshieldButton.check(); + break; + case VehicleDamage.WindshieldCrackDriverSide: + await this.windshieldChkBox.check(); + await this.selectCrack(); + await this.splitWindshieldDriverSideButton.check(); + break; + case VehicleDamage.WindshieldCrackPassengerSide: + await this.windshieldChkBox.check(); + await this.selectCrack(); + await this.splitWindshieldPassengerSideButton.check(); + break; case VehicleDamage.DriverFrontDoor: await this.sideDoorButton.check(); await this.driverSideButton.check(); diff --git a/playwright-tests/pages/VehicleSelectionPage.ts b/playwright-tests/pages/VehicleSelectionPage.ts index 383f2aa3..9c61f3de 100644 --- a/playwright-tests/pages/VehicleSelectionPage.ts +++ b/playwright-tests/pages/VehicleSelectionPage.ts @@ -8,6 +8,7 @@ export class VehicleSelectionPage extends BasePage { readonly makeDropdown: Locator; readonly modelDropdown: Locator; readonly styleDropdown: Locator; + readonly nonServiceableWarning: Locator; issPageValue = 'vehicle-selection'; @@ -18,6 +19,7 @@ export class VehicleSelectionPage extends BasePage { this.makeDropdown = this.page.locator('#makeQuestionField'); this.modelDropdown = this.page.locator('#modelQuestionField'); this.styleDropdown = this.page.locator('#styleQuestionField'); + this.nonServiceableWarning = this.page.getByText('Service not available for your vehicle'); // this.validateURL(this.url); } @@ -32,11 +34,13 @@ export class VehicleSelectionPage extends BasePage { await this.modelDropdown.press('Tab'); if (vehicleDetails.style) { await this.styleDropdown.selectOption(vehicleDetails.style); - } else { - if (await this.styleDropdown.inputValue() === 'Select an option') { - await this.styleDropdown.selectOption({ index: 1 }) - } - + } else if (await this.styleDropdown.inputValue() === 'Select an option') { + await this.styleDropdown.selectOption({ index: 1 }) } } -} \ No newline at end of file + + async assertNonServiceableAlertBehavior() { + await expect(this.nonServiceableWarning).toBeVisible(); + await expect(this.continueButton).toBeDisabled(); + } +} diff --git a/playwright-tests/pages/VinLookupPage.ts b/playwright-tests/pages/VinLookupPage.ts index 69c1f846..825b37bd 100644 --- a/playwright-tests/pages/VinLookupPage.ts +++ b/playwright-tests/pages/VinLookupPage.ts @@ -1,4 +1,4 @@ -import test, { expect, type Locator, type Page } from '@playwright/test'; +import { expect, type Locator, type Page } from '@playwright/test'; import { BasePage } from './BasePage'; export class VinLookupPage extends BasePage { @@ -39,4 +39,11 @@ export class VinLookupPage extends BasePage { await this.continueButton.click(); await this.lookupVinForMe.click(); } -} \ No newline at end of file + + async handleNonServiceableVin() { + await this.continueButton.click(); + const nonServiceableWarning = this.page.getByText('Service not available for your vehicle'); + await expect(nonServiceableWarning).toBeVisible(); + await expect(this.continueButton).toBeDisabled(); + } +} diff --git a/playwright-tests/tests/0000__M.test.ts b/playwright-tests/tests/0000__M.test.ts index b5d2831d..9026a21a 100644 --- a/playwright-tests/tests/0000__M.test.ts +++ b/playwright-tests/tests/0000__M.test.ts @@ -10,7 +10,6 @@ import essentialTpaNotEnabledTestCases from "./0003_EssentialTpaNotEnabledBailou import essentialDoNotSeeShopTestCases from "./0011_EssentialDoNotSeeShopBailout"; import essentialVehicleNotFoundTestCases from "./0010_EssentialVehicleNotFoundBailout"; import essentialPartsServiceErrorBailout_0009 from "./0009_EssentialPartsServiceErrorBailout"; -import essentialHeavyVehicleBailoutTestCases from "./0008_EssentialHeavyVehicleBailout"; import essentialRepairMobileTests from "./0014_EssentialRepairMobile"; import essentialReplacePartsQuestionsDropoff_0015 from "./0015_EssentialReplacePartsQuestionsDropoff"; import essentialUniqueGlassTests from "./0012_EssentialUniqueGlass"; @@ -26,6 +25,9 @@ import essentialReplaceDynamicAdasTests from "./0005_EssentialReplaceDynamicAdas import essentialReplaceStaticAdasTests from "./0001_EssentialReplaceStatisAdas"; import essentialVehicleLookupBailoutTests from "./0020_EssentialVehicleLookupBailout"; import essentialPriceServiceErrorBailoutTests from "./0021_EssentialPriceServiceErrorBailout"; +import essentialServiceableBigTruckTestCases from "./0022_EssentialServiceableBigTruck"; +import essentialNonServiceableBigTruckTestCases from "./0023_EssentialNonServiceableBigTruck"; +import essentialNonServiceableBigTruckVinTestCases from "./0024_EssentialNonServiceableBigTruckVin"; import { forceAPIError, mockApiManager } from "@impl/utils/HttpUtils"; import advancedScenario0002TestCases from "./advanced/0002a_ReplaceOemEndorsement"; @@ -57,12 +59,15 @@ import advancedScenario0026aTestCases from "./advanced/0026a_NoDeductibleAdasBai import advancedScenario0028aTestCases from "./advanced/0028a_ItacCancelMyClaim"; import advancedScenario0029aTestCases from "./advanced/0029a_HeavyVehicleBailout"; import advancedScenario0030aTestCases from "./advanced/0030a_PartsServiceBailout"; +import advancedScenario0031aTestCases from "./advanced/0031a_ReplaceServiceableBigTruck"; +import advancedScenario0032aTestCases from "./advanced/0032a_DeclineNonServiceableBigTruck"; test.describe.parallel('ISS QA Automation Regression', () => { const ruleEngine = new RuleEngine(); const options = new ValidationOptions(); + //TODO: Add new tests addSmokeTagToRandomTest(essentialReplaceStaticAdasTests); addSmokeTagToRandomTest(essentialRepairInShopAcuraTests); addSmokeTagToRandomTest(essentialTpaNotEnabledTestCases); @@ -70,7 +75,6 @@ test.describe.parallel('ISS QA Automation Regression', () => { addSmokeTagToRandomTest(essentialReplaceDynamicAdasTests); addSmokeTagToRandomTest(essentialRepairMobileHyundaiTests); addSmokeTagToRandomTest(essentialVehicleNotFoundTestCases); - addSmokeTagToRandomTest(essentialHeavyVehicleBailoutTestCases); addSmokeTagToRandomTest(essentialPartsServiceErrorBailout_0009); addSmokeTagToRandomTest(essentialDoNotSeeShopTestCases); addSmokeTagToRandomTest(essentialUniqueGlassTests); @@ -83,6 +87,9 @@ test.describe.parallel('ISS QA Automation Regression', () => { addSmokeTagToRandomTest(essentialTpaEnabledReplaceRecal_0019); addSmokeTagToRandomTest(essentialVehicleLookupBailoutTests); addSmokeTagToRandomTest(essentialPriceServiceErrorBailoutTests); + addSmokeTagToRandomTest(essentialServiceableBigTruckTestCases); + addSmokeTagToRandomTest(essentialNonServiceableBigTruckTestCases); + addSmokeTagToRandomTest(essentialNonServiceableBigTruckVinTestCases); //Scenario 1 for (const testCase of essentialReplaceStaticAdasTests) { @@ -109,10 +116,6 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of essentialRepairMobileHyundaiTests) { test(...prepareTest(testCase, run, options, ruleEngine)); } - //Scenario 8 - for (const testCase of essentialHeavyVehicleBailoutTestCases) { - test(...prepareTest(testCase, run, options, ruleEngine)); - } //Scenario 9 for (const testCase of essentialPartsServiceErrorBailout_0009) { test(...prepareTest(testCase, run, options, ruleEngine)); @@ -165,6 +168,20 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of essentialPriceServiceErrorBailoutTests) { test(...prepareTest(testCase, run, options, ruleEngine)); } + //Scenario 22 + for (const testCase of essentialServiceableBigTruckTestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } + //Scenario 23 + for (const testCase of essentialNonServiceableBigTruckTestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } + // Scenario 24 + for (const testCase of essentialNonServiceableBigTruckVinTestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } + + // Advanced Scenarios @@ -313,6 +330,16 @@ test.describe.parallel('ISS QA Automation Regression', () => { for (const testCase of advancedScenario0030aTestCases) { test(...prepareTest(testCase, run, options, ruleEngine)); } + + // Scenario 0031a + for (const testCase of advancedScenario0031aTestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } + + // Scenario 0032a + for (const testCase of advancedScenario0032aTestCases) { + test(...prepareTest(testCase, run, options, ruleEngine)); + } }); @@ -358,7 +385,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { partQuestions, paymentDetails, isNoComp, isItac, isRecalNotification, isRecalWarning, servicePackage, hasStateLawPopup, otherVehiclesOnPolicy, isSeparateApptsWarning, vehiclePartQuestions, editVehicleDetails, isAddressLookupValidations, - hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, isVehicleLookupValidations, isMoldingQuestion } = testCase.testData; + hasMilitaryWarning, capabilityQuestions, isUseVehicleOnPolicy, + isVehicleLookupValidations, isMoldingQuestion, isNonServiceable, isNonServiceableVin } = testCase.testData; let { isPolicyFound } = testCase.testData; // Allow isPolicyFound to be re-assigned @@ -374,8 +402,8 @@ async function runWorkflow(page: Page, testCase: TestCase) { // Destructure bailout flags const { isVehicleSelectBailout, isDoNotSeeMyShopBailout, isTpaNotEnabledBailout, - isHeavyTruckVehicleBailout, isPartsServiceErrorBailout, - isVehicleLookupBailout, isPriceServiceErrorBailout, isRequestCallbackBailout } = testCase.testData.bailoutFlags || {}; + isPartsServiceErrorBailout, isVehicleLookupBailout, isPriceServiceErrorBailout, + isRequestCallbackBailout } = testCase.testData.bailoutFlags || {}; const repairTypes: VehicleDamage[] = [ VehicleDamage.WindshieldOneChip, @@ -424,15 +452,15 @@ async function runWorkflow(page: Page, testCase: TestCase) { } else { // Select vehicle await policyVehiclesPage.selectVehicle(vehicleDetails!); + if (isNonServiceable) { + await policyVehiclesPage.assertNonServiceableAlertBehavior(); + return; + } await policyVehiclesPage.nextPage(); } }); - if (isHeavyTruckVehicleBailout) { - await test.step('BailoutPage >> Heavy Vehicle Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.issPageValue); - await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.HeavyTruckVehicle); - }); + if (isNonServiceable) { return; } @@ -460,9 +488,17 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('VehicleDetailsPage >> Select Vehicle', async () => { await vehicleSelectionPage.validateURL(vehicleSelectionPage.issPageValue); await vehicleSelectionPage.selectVehicle(vehicleDetails!); + if (isNonServiceable) { + await vehicleSelectionPage.assertNonServiceableAlertBehavior(); + return; + } await vehicleSelectionPage.nextPage(); }); + if (isNonServiceable) { + return; + } + if (isVehicleLookupBailout) { await test.step('BailoutPage >> Vehicle Lookup Bailout', async () => { await bailoutPage.validateURL(bailoutPage.issPageValue); @@ -470,14 +506,6 @@ async function runWorkflow(page: Page, testCase: TestCase) { }); return; } - - if (isHeavyTruckVehicleBailout) { - await test.step('BailoutPage >> Heavy Vehicle Bailout', async () => { - await bailoutPage.validateURL(bailoutPage.issPageValue); - await bailoutPage.validateBailoutDetails(customerDetails!, BailoutCode.HeavyTruckVehicle); - }); - return; - } } if (editVehicleDetails) { @@ -587,8 +615,15 @@ async function runWorkflow(page: Page, testCase: TestCase) { await test.step('VinLookupPage >> Lookup by VIN: ' + vehicleDetails!.vin!, async () => { await vinLookupPage.validateURL(vinLookupPage.issPageValue); await vinLookupPage.enterVin(vehicleDetails!.vin!, isVehicleLookupValidations); + if (isNonServiceableVin) { + await vinLookupPage.handleNonServiceableVin(); + return; + } await vinLookupPage.nextPage(); }); + if (isNonServiceableVin) { + return; + } break; } } diff --git a/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts new file mode 100644 index 00000000..f50db3cc --- /dev/null +++ b/playwright-tests/tests/0022_EssentialServiceableBigTruck.ts @@ -0,0 +1,79 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; + +const nextWeekday = getNextWeekday(); + +const essentialServiceableBigTruckData: Partial = { + clientTag: 'ALL_ESSENTIAL', + isDuplicateClaim: false, + isPolicyFound: false, + endorsements: [], + isReplace: true, + vehiclePartQuestions: [ + { + partQuestionType: PartQuestionType.WindshieldColor, + isOnPage: true, + optionToSelect: 'Green Tint', + secondaryQuestionOptionToSelect: 'one-piece, w/lane departure warning system', + }, + ], + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: "itqatest@safelite.com", + phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'Dublin', + state: 'Ohio', + postalCode: '43016', + country: 'United States' + } + }, + claimDetails: { + policyNumber: faker.string.alphanumeric(5), + policyDeductible: -1, // Not advanced, so we don't care about deductible. + damageDate: '2024-10-10', + damageCause: DamageType.Other + }, + vehicleDetails: { + year: '2021', + make: 'Freightliner', + model: 'Cascadia', + style: 'conventional cab', + vin: '3AKJHPDV7MSLJ2958', + vehicleLookupType: VehicleLookupType.Vin, + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrackSingleWindshield, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: '6826 Sawmill Rd, Columbus, OH 43235', + appointmentDate: nextWeekday + }, + isUseVehicleOnPolicy: false, +} + +const essentialClients = ClientData.getEssentialClients(); +const essentialServiceableBigTruckTestCases: TestCase[] = []; +for (const client of essentialClients) { + const data = { ...essentialServiceableBigTruckData }; + data.clientTag = client.clientTag; + data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false + const tc = new TestCase({ + name: `0022 Essential Serviceable Big Truck Client: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@BigTruck', '@Essentials'], + testData: data + }, undefined, '0022'); + essentialServiceableBigTruckTestCases.push(tc); +} + +export default essentialServiceableBigTruckTestCases; diff --git a/playwright-tests/tests/0008_EssentialHeavyVehicleBailout.ts b/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts similarity index 62% rename from playwright-tests/tests/0008_EssentialHeavyVehicleBailout.ts rename to playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts index f53c2548..5979bf48 100644 --- a/playwright-tests/tests/0008_EssentialHeavyVehicleBailout.ts +++ b/playwright-tests/tests/0023_EssentialNonServiceableBigTruck.ts @@ -1,29 +1,26 @@ import ClientData from "@business-logic/data/ClientData"; import TestCase from "@business-logic/types/TestCase"; -import { DamageType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; +import { DamageType, ServiceLocation, ServicePackage, VehicleDamage } from "@business-logic/types/Enums"; import { ITestData } from "@business-logic/types/ITestData" import { faker } from "@faker-js/faker"; import { getNextWeekday } from "@impl/utils/DateUtils"; const nextWeekday = getNextWeekday(); -const essentialHeavyVehicleBailoutData: Partial = { +const essentialNonServiceableBigTruckData: Partial = { clientTag: 'ALL_ESSENTIAL', isDuplicateClaim: false, isPolicyFound: false, endorsements: [], - isReplace: false, + isReplace: true, partQuestions: undefined, isSafelite: true, - bailoutFlags: { - isHeavyTruckVehicleBailout: true - }, servicePackage: faker.helpers.enumValue(ServicePackage), customerDetails: { firstName: faker.person.firstName(), lastName: faker.person.lastName(), email: "itqatest@safelite.com", - phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]/), + phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), notes: 'Automated Test', address: { street: faker.location.streetAddress(), @@ -40,42 +37,35 @@ const essentialHeavyVehicleBailoutData: Partial = { damageCause: DamageType.Other }, vehicleDetails: { - year: '2017', - make: 'Freightliner', - model: '114sd', - style: 'conventional cab' // TODO: Check correctness of vehicle style + year: '2016', + make: 'Isuzu', + model: 'Reach', + style: 'step van', }, vehicleDamage: [ - // VehicleDamage.WindshieldThreeChips, VehicleDamage.WindshieldCrack, - // VehicleDamage.DriverFrontDoor, - // VehicleDamage.DriverQuarterPanel, - // VehicleDamage.DriverRearDoor, - // VehicleDamage.PassengerFrontDoor, - // VehicleDamage.PassengerQuarterPanel, - // VehicleDamage.PassengerRearDoor, - // VehicleDamage.RearWindow ], appointmentDetails: { serviceLocation: ServiceLocation.InShop, shopAddress: '6826 Sawmill Rd, Columbus, OH 43235', appointmentDate: nextWeekday - } + }, + isNonServiceable: true, } const essentialClients = ClientData.getEssentialClients(); -const essentialHeavyVehicleBailoutTestCases: TestCase[] = []; +const essentialNonServiceableBigTruckTestCases: TestCase[] = []; for (const client of essentialClients) { - const data = {...essentialHeavyVehicleBailoutData}; + const data = {...essentialNonServiceableBigTruckData}; data.clientTag = client.clientTag; data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false const tc = new TestCase({ - name: `0008 Essential Heavy Vehicle Bailout Client: "${client.accountName}"`, - tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Bailout', '@HeavyVehicle', '@Essentials'], + name: `0023 Essential Non-Serviceable Big Truck Client: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@BigTruck', '@Essentials'], testData: data - }, undefined, '0008'); - essentialHeavyVehicleBailoutTestCases.push(tc); + }, undefined, '0023'); + essentialNonServiceableBigTruckTestCases.push(tc); } -export default essentialHeavyVehicleBailoutTestCases; \ No newline at end of file +export default essentialNonServiceableBigTruckTestCases; diff --git a/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts b/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts new file mode 100644 index 00000000..af0c091f --- /dev/null +++ b/playwright-tests/tests/0024_EssentialNonServiceableBigTruckVin.ts @@ -0,0 +1,79 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, ServiceLocation, ServicePackage, VehicleDamage, VehicleLookupType } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; + +const nextWeekday = getNextWeekday(); + +const essentialNonServiceableBigTruckVinData: Partial = { + clientTag: 'ALL_ESSENTIAL', + isDuplicateClaim: false, + isPolicyFound: false, + endorsements: [], + isReplace: true, + vehiclePartQuestions: [ + { + partQuestionType: PartQuestionType.WindshieldColor, + isOnPage: true, + optionToSelect: 'Green Tint', + secondaryQuestionOptionToSelect: 'one-piece, w/lane departure warning system', + }, + ], + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: "itqatest@safelite.com", + phoneNumber: faker.helpers.fromRegExp(/[2-9][0-9][0-9]-[0-9]{3}-[0-9]{4}/), + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'Dublin', + state: 'Ohio', + postalCode: '43016', + country: 'United States' + } + }, + claimDetails: { + policyNumber: faker.string.alphanumeric(5), + policyDeductible: -1, // Not advanced, so we don't care about deductible. + damageDate: '2024-10-10', + damageCause: DamageType.Other + }, + vehicleDetails: { + year: '2021', + make: 'Freightliner', + model: 'Cascadia', + style: 'conventional cab', + vin: 'JALB4T177G7W00847', + vehicleLookupType: VehicleLookupType.Vin, + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrackSingleWindshield, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: '6826 Sawmill Rd, Columbus, OH 43235', + appointmentDate: nextWeekday + }, + isNonServiceableVin: true, +} + +const essentialClients = ClientData.getEssentialClients(); +const essentialNonServiceableBigTruckVinTestCases: TestCase[] = []; +for (const client of essentialClients) { + const data = { ...essentialNonServiceableBigTruckVinData }; + data.clientTag = client.clientTag; + data.isAuthenticationRequired = client.clientFlags.isAuthenticationEnabled ?? false + const tc = new TestCase({ + name: `0024 Essential Non-Serviceable Big Truck Vin Client: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@BigTruck', '@Essentials'], + testData: data + }, undefined, '0024'); + essentialNonServiceableBigTruckVinTestCases.push(tc); +} + +export default essentialNonServiceableBigTruckVinTestCases; diff --git a/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts b/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts new file mode 100644 index 00000000..da53e68a --- /dev/null +++ b/playwright-tests/tests/advanced/0031a_ReplaceServiceableBigTruck.ts @@ -0,0 +1,93 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, PartQuestionType, ServiceLocation, ServicePackage, VehicleDamage } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; +import MockPolicyData from "@business-logic/data/MockPolicyData"; +import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; + +const nextWeekday = getNextWeekday(); +const customerDetails: ICustomerDetails = { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: 'itqatest@safelite.com', + phoneNumber: '614-531-0031', + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'HOUSTON', + state: 'TX', + postalCode: '77001', + country: 'United States' + } +} + +const policyNumber = `~AutomatedScenario0031a${faker.string.uuid().substring(0, 6)}`; +const policySoap = MockPolicyData.getPolicySoapByScenario('0031a', customerDetails, policyNumber); + +const advancedScenario0031Data: Partial = { + clientTag: '', + isDuplicateClaim: false, + isPolicyFound: true, + isNoComp: false, + hasStateLawPopup: false, + endorsements: undefined, + partQuestions: [ + { + partQuestionType: PartQuestionType.LaneKeepAssist, + isOnPage: true, + optionToSelect: 'Yes', + } + ], + vehiclePartQuestions: [ + { + partQuestionType: PartQuestionType.WindshieldColor, + isOnPage: true, + optionToSelect: 'Green Tint', + secondaryQuestionOptionToSelect: 'one-piece, w/lane departure warning system', + }, + ], + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: customerDetails, + claimDetails: { + policyNumber: policyNumber, + policyDeductible: 250, + damageDate: '2025-09-01', + damageCause: DamageType.Rock, + }, + policySoap: policySoap, + vehicleDetails: { + year: '2021', + make: 'Freightliner', + model: 'Cascadia', + style: 'conventional cab', + vin: '3AKJHPDV7MSLJ2958', + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrackSingleWindshield, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: undefined, + appointmentDate: nextWeekday + }, + paymentDetails: ClientData.getDefaultPaypalDetails()//ClientData.getDefaultCreditCardDetails() +} + +// TODO: Add validation for deductible/covered amount +const advancedClients = ClientData.getAdvancedClients(); +const advancedScenario0031TestCases: TestCase[] = []; +for (const client of advancedClients) { + const data = { ...advancedScenario0031Data }; + data.clientTag = client.clientTag; + const tc = new TestCase({ + name: `0031a Advanced Replace Serviceable Big Truck: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + testData: data + }, undefined, '0031a'); + advancedScenario0031TestCases.push(tc); +} + +export default advancedScenario0031TestCases; diff --git a/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts b/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts new file mode 100644 index 00000000..da064309 --- /dev/null +++ b/playwright-tests/tests/advanced/0032a_DeclineNonServiceableBigTruck.ts @@ -0,0 +1,81 @@ +import ClientData from "@business-logic/data/ClientData"; +import TestCase from "@business-logic/types/TestCase"; +import { DamageType, ServiceLocation, ServicePackage, VehicleDamage } from "@business-logic/types/Enums"; +import { ITestData } from "@business-logic/types/ITestData" +import { faker } from "@faker-js/faker"; +import { getNextWeekday } from "@impl/utils/DateUtils"; +import MockPolicyData from "@business-logic/data/MockPolicyData"; +import { ICustomerDetails } from "@business-logic/types/CustomerDetails"; + +const nextWeekday = getNextWeekday(); +const customerDetails: ICustomerDetails = { + firstName: faker.person.firstName(), + lastName: faker.person.lastName(), + email: 'itqatest@safelite.com', + phoneNumber: '614-531-0031', + notes: 'Automated Test', + address: { + street: faker.location.streetAddress(), + city: 'HOUSTON', + state: 'TX', + postalCode: '77001', + country: 'United States' + } +} + +const policyNumber = `~AutomatedScenario0032a${faker.string.uuid().substring(0, 6)}`; +const policySoap = MockPolicyData.getPolicySoapByScenario('0032a', customerDetails, policyNumber); + +const advancedScenario0032Data: Partial = { + clientTag: '', + isDuplicateClaim: false, + isPolicyFound: true, + isNoComp: false, + hasStateLawPopup: false, + endorsements: undefined, + vehiclePartQuestions: [ + + ], + isSafelite: true, + servicePackage: faker.helpers.enumValue(ServicePackage), + customerDetails: customerDetails, + claimDetails: { + policyNumber: policyNumber, + policyDeductible: 250, + damageDate: '2025-09-01', + damageCause: DamageType.Rock, + }, + policySoap: policySoap, + vehicleDetails: { + year: '2016', + make: 'Isuzu', + model: 'Reach', + style: 'step van', + }, + vehicleDamage: [ + VehicleDamage.WindshieldCrack, + ], + appointmentDetails: { + serviceLocation: ServiceLocation.InShop, + shopAddress: undefined, + appointmentDate: nextWeekday + }, + paymentDetails: ClientData.getDefaultPaypalDetails(),//ClientData.getDefaultCreditCardDetails() + isNonServiceable: true, +} + +// TODO: Add validation for deductible/covered amount +const advancedClients = ClientData.getAdvancedClients(); +const advancedScenario0032TestCases: TestCase[] = []; +for (const client of advancedClients) { + const data = { ...advancedScenario0032Data }; + data.clientTag = client.clientTag; + const tc = new TestCase({ + name: `0032a Advanced Decline Non-Serviceable Big Truck: "${client.accountName}"`, + tags: [`@${client.clientTag}`, `@${client.accountName}`, '@Advanced'], + testData: data + }, undefined, '0032a'); + advancedScenario0032TestCases.push(tc); +} + +export default advancedScenario0032TestCases; diff --git a/src/layouts/address-vehicles/address-vehicles.spec.js b/src/layouts/address-vehicles/address-vehicles.spec.js index faea9e87..1235b376 100644 --- a/src/layouts/address-vehicles/address-vehicles.spec.js +++ b/src/layouts/address-vehicles/address-vehicles.spec.js @@ -264,7 +264,7 @@ describe('address-vehicles.vue', () => { make: 'Isuzu', model: 'Reach', style: 'Step Van', - year: 2015, + year: 2016, isBigTruck: true, canSafeliteService: false }, @@ -286,8 +286,8 @@ describe('address-vehicles.vue', () => { isBigTruck: true, canSafeliteService: false } - } - + }; + // Act await wrapper.vm.$nextTick(); @@ -331,8 +331,8 @@ describe('address-vehicles.vue', () => { isBigTruck: true, canSafeliteService: true } - } - + }; + // Act await wrapper.vm.$nextTick();