Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge staging into main #248

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions help_to_heat/frontdoor/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

# to be updated when we get full list of excluded suppliers
converted_suppliers = ["Bulb, now part of Octopus Energy", "Utility Warehouse"]
unavailable_suppliers = ["British Gas"]
unavailable_suppliers = []


def unavailable_supplier_redirect(session_id):
Expand Down Expand Up @@ -624,7 +624,7 @@ def handle_post(self, request, session_id, page_name, data, is_change_page):
request_supplier = request_data.get("supplier")
# to be updated when we get full list of excluded suppliers
converted_suppliers = ["Bulb, now part of Octopus Energy", "Utility Warehouse"]
unavailable_suppliers = ["British Gas"]
unavailable_suppliers = []
if request_supplier == "Bulb, now part of Octopus Energy":
next_page_name = "bulb-warning-page"
if request_supplier == "Utility Warehouse":
Expand Down
24 changes: 0 additions & 24 deletions tests/test_frontdoor.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,6 @@ def test_flow_errors():
assert page.has_text("Select where the property is located")


def test_british_gas_unavailable():
client = utils.get_client()
page = client.get("/start")
assert page.status_code == 302
page = page.follow()

assert page.status_code == 200
session_id = page.path.split("/")[1]
assert uuid.UUID(session_id)

form = page.get_form()
form["country"] = "England"
page = form.submit().follow()

form = page.get_form()
form["supplier"] = "British Gas"
page = form.submit().follow()

assert page.has_text("British Gas are not taking referrals right now but they will be shortly")

page = page.click(contains="Back")
assert page.has_one("h1:contains('Select your home energy supplier from the list below')")


@unittest.mock.patch("help_to_heat.frontdoor.interface.OSApi", MockOSApi)
def _answer_house_questions(page, session_id, benefits_answer, epc_rating="D", supplier="Utilita"):
"""Answer main flow with set answers"""
Expand Down
Loading