This commit is contained in:
Kenneth Kehl
2024-10-07 11:02:04 -07:00
parent b4b15bc209
commit b133def7fc
5 changed files with 1 additions and 25 deletions

View File

@@ -34,5 +34,4 @@ def check_axe_report(page):
for violation in results["violations"]:
assert violation["impact"] in [
"minor",
"moderate",
], f"Accessibility violation: {violation}"

View File

@@ -87,21 +87,18 @@ def test_add_new_service_workflow(authenticated_page, end_to_end_context):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
page.click("text='Delete this service'")
# Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
page.click("text='Yes, delete'")
# Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))

View File

@@ -4,6 +4,7 @@ import re
import uuid
from playwright.sync_api import expect
from tests.end_to_end.conftest import check_axe_report
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
@@ -19,7 +20,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
send_messages_button = page.get_by_role("link", name="Send messages")
expect(send_messages_button).to_be_visible()
send_messages_button.click()
@@ -28,7 +28,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
create_template_button = page.get_by_role("button", name="New template")
expect(create_template_button).to_be_visible()
create_template_button.click()
@@ -37,7 +36,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
start_with_a_blank_template_radio = page.get_by_text("Start with a blank template")
expect(start_with_a_blank_template_radio).to_be_visible()
start_with_a_blank_template_radio.click()
@@ -52,7 +50,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
template_name_input = page.get_by_text("Template name")
expect(template_name_input).to_be_visible()
template_name = str(uuid.uuid4())
@@ -70,7 +67,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
use_this_template_button = page.get_by_text("Use this template")
expect(use_this_template_button).to_be_visible()
use_this_template_button.click()
@@ -93,7 +89,6 @@ def create_new_template(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# We are not going to send the message for this test, we just want to confirm
# that the template has been created and we are now seeing the message from the
# template in the preview.
@@ -107,7 +102,6 @@ def test_create_new_template(end_to_end_context):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
current_date_time = datetime.datetime.now()
new_service_name = "E2E Federal Test Service {now} - {browser_type}".format(
now=current_date_time.strftime("%m/%d/%Y %H:%M:%S"),
@@ -119,7 +113,6 @@ def test_create_new_template(end_to_end_context):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))
@@ -149,7 +142,6 @@ def test_create_new_template(end_to_end_context):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check for the sign in heading.
about_heading = page.get_by_role("heading", name="About your service")
expect(about_heading).to_be_visible()
@@ -171,7 +163,6 @@ def test_create_new_template(end_to_end_context):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# TODO this fails on staging due to duplicate results on 'get_by_text'
# Check for the service name title and heading.
# service_heading = page.get_by_text(new_service_name, exact=True)
@@ -191,21 +182,18 @@ def _teardown(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
page.click("text='Delete this service'")
# Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
page.click("text='Yes, delete'")
# Check to make sure that we've arrived at the next page.
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))

View File

@@ -23,7 +23,6 @@ def _setup(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))
@@ -53,7 +52,6 @@ def _setup(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check for the sign in heading.
about_heading = page.get_by_role("heading", name="About your service")
expect(about_heading).to_be_visible()
@@ -75,7 +73,6 @@ def _setup(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# TODO this fails on staging due to duplicate results on 'get_by_text'
# Check for the service name title and heading.
# service_heading = page.get_by_text(new_service_name, exact=True)
@@ -106,7 +103,6 @@ def test_invite_team_member_to_service(authenticated_page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check for invite a team member button
invite_team_member_button = page.get_by_role("button", name="Invite a team member")
expect(invite_team_member_button).to_be_visible()
@@ -182,7 +178,6 @@ def _teardown(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))

View File

@@ -25,7 +25,6 @@ def _setup(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# Check to make sure that we've arrived at the next page.
# Check the page title exists and matches what we expect.
expect(page).to_have_title(re.compile("Choose service"))
@@ -76,7 +75,6 @@ def _setup(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
# TODO this fails on staging due to duplicate results on 'get_by_text'
# Check for the service name title and heading.
# service_heading = page.get_by_text(new_service_name, exact=True)
@@ -358,7 +356,6 @@ def _teardown(page):
page.wait_for_load_state("domcontentloaded")
check_axe_report(page)
page.click("text='Yes, delete'")
# Check to make sure that we've arrived at the next page.