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

Update failing tests and remove unused #82

Merged
merged 1 commit into from
Jun 17, 2024
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
68 changes: 0 additions & 68 deletions playwright/tests/00_test_50_EstTool_TEMPLATE.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 25%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 72%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - 3%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 32%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 64%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - 5%")



Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/test_11_EstTool_OneMillEmpl_Mix_Inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 28%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 71%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 58%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 40%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - 2%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")


Expand Down
4 changes: 2 additions & 2 deletions playwright/tests/test_12_EstTool_10Empl_Mix_Inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 29%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 71%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 30%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 70%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand Down
11 changes: 6 additions & 5 deletions playwright/tests/test_13_EstTool_500Empl_Mix_Inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 22%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 78%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 25%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 75%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand All @@ -100,10 +100,11 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 22%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 78%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 25%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 75%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")




Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/test_14_EstTool_25KEmpl_Mix_Inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 7%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 16%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 6%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 5%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - 77%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - 89%")



Expand Down
7 changes: 3 additions & 4 deletions playwright/tests/test_15_EstTool_6kEmpl_Mix_Inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 24%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 72%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 3%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 35%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 59%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 6%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand All @@ -82,5 +82,4 @@ def test_example(page: Page) -> None:



##############################################################################

31 changes: 0 additions & 31 deletions playwright/tests/test_16_EstTool_UI_QuestionMarks1.py

This file was deleted.

32 changes: 0 additions & 32 deletions playwright/tests/test_16_EstTool_UI_QuestionMarks2.py

This file was deleted.

33 changes: 0 additions & 33 deletions playwright/tests/test_16_EstTool_UI_QuestionMarks3.py

This file was deleted.

31 changes: 0 additions & 31 deletions playwright/tests/test_16_EstTool_UI_QuestionMarks4.py

This file was deleted.

4 changes: 2 additions & 2 deletions playwright/tests/test_18_EstTool_Cloud1Mil.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def test_example(page: Page) -> None:

page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 11%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 22%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 67%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 9%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 80%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand Down
19 changes: 10 additions & 9 deletions playwright/tests/test_2_EstTool_HappyPath_Default.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def test_example(page: Page) -> None:
page.get_by_label("Where are your cloud servers").select_option("WORLD")
expect(page.get_by_text("We have derived a rough")).to_be_visible()
expect(page.get_by_text("What is your monthly cloud")).to_be_visible()
page.get_by_label("What is your monthly cloud").select_option("5: Object") #$20-$50k
# page.get_by_label("What is your monthly cloud").select_option("5: Object") #$20-$50k
page.get_by_label("What is your monthly cloud").select_option("0: Object")

# Users
expect(page.get_by_role("heading", name="End-Users")).to_be_visible()
Expand All @@ -63,10 +64,11 @@ def test_example(page: Page) -> None:

expect(page.get_by_text("What's the primary purpose of")).to_be_visible()
page.get_by_text("What's the primary purpose of").click()
page.get_by_label("What's the primary purpose of").select_option("socialMedia")
# page.get_by_label("What's the primary purpose of").select_option("socialMedia")
page.get_by_label("What's the primary purpose of").select_option("average")
expect(page.get_by_text("Where are your end-users")).to_be_visible()
page.get_by_label("Where are your end-users").select_option("GBR")
page.get_by_label("Where are your end-users").select_option("WORLD")
page.get_by_label("Where are your end-users").select_option("Globally")
expect(page.get_by_text("How many monthly active users")).to_be_visible()
page.get_by_label("How many monthly active users").click()
page.get_by_label("How many monthly active users").fill("100")
Expand All @@ -76,18 +78,17 @@ def test_example(page: Page) -> None:

# Calculate
# Calculate outcome and make sure it matches spreadsheet

page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 22%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 49%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 34%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 33%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 65%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 1%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")




##############################################################################






Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/test_3_EstTool_HappyPath_Reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def test_example(page: Page) -> None:
# Calculate
# Calculate outcome and make sure it matches spreadsheet
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 25%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 73%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 33%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 65%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 1%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand Down
4 changes: 2 additions & 2 deletions playwright/tests/test_4_EstTool_DesktopZero.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def test_example(page: Page) -> None:
# Calculate outcome and make sure it matches spreadsheet
# page.pause()
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 30%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 68%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 32%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 66%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 1%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")

Expand Down
6 changes: 3 additions & 3 deletions playwright/tests/test_5_EstTool_LaptopZero.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ def test_example(page: Page) -> None:
# Calculate outcome and make sure it matches spreadsheet
# page.pause()
page.get_by_role("button", name="Calculate").click()
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 23%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 76%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - <1%")
expect(page.locator("foreignobject")).to_contain_text("Upstream Emissions - 34%")
expect(page.locator("foreignobject")).to_contain_text("Direct Emissions - 64%")
expect(page.locator("foreignobject")).to_contain_text("Indirect Emissions - 1%")
expect(page.locator("foreignobject")).to_contain_text("Downstream Emissions - <1%")


Expand Down
Loading