diff --git a/lib/webchat.yaml b/lib/webchat.yaml index ab9a96c65..3275dc323 100644 --- a/lib/webchat.yaml +++ b/lib/webchat.yaml @@ -1,43 +1,3 @@ -- base_path: /government/organisations/hm-revenue-customs/contact/child-benefit - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/child-benefit - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006859&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/income-tax-enquiries-for-individuals-pensioners-and-employees - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/income-tax-enquiries-for-individuals-pensioners-and-employees - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006852&siteID=10006719&businessUnitID=19001235&q-thresh=1 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/vat-online-services-helpdesk - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/vat-online-services-helpdesk - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006860&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/national-insurance-numbers - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/national-insurance-numbers - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006855&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/self-assessment - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/self-assessment - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006851&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/tax-credits-enquiries - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/tax-credits-enquiries - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006858&siteID=10006719&businessUnitID=19001235&q-thresh=1 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/vat-enquiries - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/vat-enquiries - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006860&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/customs-international-trade-and-excise-enquiries - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/customs-international-trade-and-excise-enquiries - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006861&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/employer-enquiries - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/employer-enquiries - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006854&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true -- base_path: /government/organisations/hm-revenue-customs/contact/online-services-helpdesk - open_url: https://tax.service.gov.uk/ask-hmrc/webchat/online-services-helpdesk - availability_url: https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006856&siteID=10006719&businessUnitID=19001235&q-thresh=1.2 - open_url_redirect: true - base_path: /government/organisations/hm-passport-office/contact/passport-advice-and-complaints open_url: https://hmpowebchat.klick2contact.com/v03/launcherV3.php?p=HMPO&d=717&ch=CH&psk=chat_a1&iid=STC&srbp=0&fcl=0&r=Chat&s=https://hmpowebchat.klick2contact.com/v03&u=&wo=&uh=&pid=2&iif=0 availability_url: https://hmpowebchat.klick2contact.com/v03/providers/HMPO2/api/availability.php diff --git a/test/presenters/contact_presenter_test.rb b/test/presenters/contact_presenter_test.rb index 571c99c78..7259df2fe 100644 --- a/test/presenters/contact_presenter_test.rb +++ b/test/presenters/contact_presenter_test.rb @@ -85,11 +85,19 @@ def schema_name end test "presents webchat" do + chats = Webchat.load_all + return if chats.empty? + + base_path = chats.first.base_path + availability_url = chats.first.availability_url + open_url = chats.first.open_url + schema = schema_item("contact_with_webchat") + schema["base_path"] = base_path presented = present_example(schema) assert_equal true, presented.show_webchat? - assert_equal presented.webchat.availability_url, "https://hmrc-uk.digital.nuance.com/tagserver/launch/agentAvailability?agentGroupID=10006852&siteID=10006719&businessUnitID=19001235&q-thresh=1" - assert_equal presented.webchat.open_url, "https://tax.service.gov.uk/ask-hmrc/webchat/income-tax-enquiries-for-individuals-pensioners-and-employees" + assert_equal presented.webchat.availability_url, availability_url + assert_equal presented.webchat.open_url, open_url end end end