diff --git a/playwright/tests/test_0_TrialTest_HappyPath.py b/playwright/tests/test_0_TrialTest_HappyPath.py index 9a8709e7..489b6567 100644 --- a/playwright/tests/test_0_TrialTest_HappyPath.py +++ b/playwright/tests/test_0_TrialTest_HappyPath.py @@ -3,6 +3,7 @@ # This test is to check that the page loads, labels, scroll bars, dropdowns are all visible and set at the default when page loads + def test_example(page: Page) -> None: # page.goto("http://localhost:57056/") page.goto("http://localhost:4200/") @@ -10,26 +11,28 @@ def test_example(page: Page) -> None: # page.pause() expect(page.get_by_role("heading", name="Carbon Estimator")).to_be_visible() - expect(page.get_by_label("How many employees are in the")).to_have_value("100"); + expect(page.get_by_label("How many employees are in the")).to_have_value("200") expect(page.get_by_text("Desktops 50%")).to_be_visible() page.get_by_text("Laptops 50%").click() expect(page.get_by_role("heading", name="On-Premise Servers")).to_be_visible() - expect(page.get_by_label("Number of Servers:")).to_have_value("10"); - expect(page.get_by_label("Where are they primarily")).to_have_value("WORLD"); + expect(page.get_by_label("Number of Servers:")).to_have_value("10") + expect(page.get_by_label("Where are they primarily")).to_have_value("WORLD") expect(page.get_by_role("heading", name="Cloud Services")).to_be_visible() expect(page.get_by_text("Cloud 50%")).to_be_visible() expect(page.get_by_text("On-premise 50%")).to_be_visible() - expect(page.get_by_label("Where are your cloud servers")).to_have_value("WORLD"); - expect(page.get_by_label("What is your monthly cloud")).to_have_value("0: Object"); + expect(page.get_by_label("Where are your cloud servers")).to_have_value("WORLD") + expect(page.get_by_label("What is your monthly cloud")).to_have_value("0: Object") expect(page.get_by_role("heading", name="Users")).to_be_visible() expect(page.get_by_text("Where are your end-users")).to_be_visible() - expect(page.get_by_label("Where are your end-users")).to_have_value("WORLD"); + expect(page.get_by_label("Where are your end-users")).to_have_value("WORLD") expect(page.get_by_text("How many monthly active users")).to_be_visible() - expect(page.get_by_label("How many monthly active users")).to_have_value("100"); + expect(page.get_by_label("How many monthly active users")).to_have_value("100") expect(page.get_by_text("Mobile 50%")).to_be_visible() expect(page.get_by_text("Computer 50%")).to_be_visible() expect(page.get_by_text("What's the primary purpose of your")).to_be_visible() - expect(page.get_by_label("What's the primary purpose of your")).to_have_value("average"); + expect(page.get_by_label("What's the primary purpose of your")).to_have_value( + "average" + ) page.get_by_role("button", name="Calculate").click() expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 33%") expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 65%")