mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
cleanup
This commit is contained in:
@@ -34,5 +34,4 @@ def check_axe_report(page):
|
|||||||
for violation in results["violations"]:
|
for violation in results["violations"]:
|
||||||
assert violation["impact"] in [
|
assert violation["impact"] in [
|
||||||
"minor",
|
"minor",
|
||||||
"moderate",
|
|
||||||
], f"Accessibility violation: {violation}"
|
], f"Accessibility violation: {violation}"
|
||||||
|
|||||||
@@ -87,21 +87,18 @@ def test_add_new_service_workflow(authenticated_page, end_to_end_context):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
page.click("text='Delete this service'")
|
page.click("text='Delete this service'")
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
page.click("text='Yes, delete'")
|
page.click("text='Yes, delete'")
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
expect(page).to_have_title(re.compile("Choose service"))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import re
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from playwright.sync_api import expect
|
from playwright.sync_api import expect
|
||||||
|
|
||||||
from tests.end_to_end.conftest import check_axe_report
|
from tests.end_to_end.conftest import check_axe_report
|
||||||
|
|
||||||
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
|
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
|
||||||
@@ -19,7 +20,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
send_messages_button = page.get_by_role("link", name="Send messages")
|
send_messages_button = page.get_by_role("link", name="Send messages")
|
||||||
expect(send_messages_button).to_be_visible()
|
expect(send_messages_button).to_be_visible()
|
||||||
send_messages_button.click()
|
send_messages_button.click()
|
||||||
@@ -28,7 +28,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
create_template_button = page.get_by_role("button", name="New template")
|
create_template_button = page.get_by_role("button", name="New template")
|
||||||
expect(create_template_button).to_be_visible()
|
expect(create_template_button).to_be_visible()
|
||||||
create_template_button.click()
|
create_template_button.click()
|
||||||
@@ -37,7 +36,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
start_with_a_blank_template_radio = page.get_by_text("Start with a blank template")
|
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()
|
expect(start_with_a_blank_template_radio).to_be_visible()
|
||||||
start_with_a_blank_template_radio.click()
|
start_with_a_blank_template_radio.click()
|
||||||
@@ -52,7 +50,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
template_name_input = page.get_by_text("Template name")
|
template_name_input = page.get_by_text("Template name")
|
||||||
expect(template_name_input).to_be_visible()
|
expect(template_name_input).to_be_visible()
|
||||||
template_name = str(uuid.uuid4())
|
template_name = str(uuid.uuid4())
|
||||||
@@ -70,7 +67,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
use_this_template_button = page.get_by_text("Use this template")
|
use_this_template_button = page.get_by_text("Use this template")
|
||||||
expect(use_this_template_button).to_be_visible()
|
expect(use_this_template_button).to_be_visible()
|
||||||
use_this_template_button.click()
|
use_this_template_button.click()
|
||||||
@@ -93,7 +89,6 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# We are not going to send the message for this test, we just want to confirm
|
# 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
|
# that the template has been created and we are now seeing the message from the
|
||||||
# template in the preview.
|
# template in the preview.
|
||||||
@@ -107,7 +102,6 @@ def test_create_new_template(end_to_end_context):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
current_date_time = datetime.datetime.now()
|
current_date_time = datetime.datetime.now()
|
||||||
new_service_name = "E2E Federal Test Service {now} - {browser_type}".format(
|
new_service_name = "E2E Federal Test Service {now} - {browser_type}".format(
|
||||||
now=current_date_time.strftime("%m/%d/%Y %H:%M:%S"),
|
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")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
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")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check for the sign in heading.
|
# Check for the sign in heading.
|
||||||
about_heading = page.get_by_role("heading", name="About your service")
|
about_heading = page.get_by_role("heading", name="About your service")
|
||||||
expect(about_heading).to_be_visible()
|
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")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
||||||
# Check for the service name title and heading.
|
# Check for the service name title and heading.
|
||||||
# service_heading = page.get_by_text(new_service_name, exact=True)
|
# service_heading = page.get_by_text(new_service_name, exact=True)
|
||||||
@@ -191,21 +182,18 @@ def _teardown(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
page.click("text='Delete this service'")
|
page.click("text='Delete this service'")
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
page.click("text='Yes, delete'")
|
page.click("text='Yes, delete'")
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
expect(page).to_have_title(re.compile("Choose service"))
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ def _setup(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
expect(page).to_have_title(re.compile("Choose service"))
|
||||||
@@ -53,7 +52,6 @@ def _setup(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check for the sign in heading.
|
# Check for the sign in heading.
|
||||||
about_heading = page.get_by_role("heading", name="About your service")
|
about_heading = page.get_by_role("heading", name="About your service")
|
||||||
expect(about_heading).to_be_visible()
|
expect(about_heading).to_be_visible()
|
||||||
@@ -75,7 +73,6 @@ def _setup(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
||||||
# Check for the service name title and heading.
|
# Check for the service name title and heading.
|
||||||
# service_heading = page.get_by_text(new_service_name, exact=True)
|
# 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")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check for invite a team member button
|
# Check for invite a team member button
|
||||||
invite_team_member_button = page.get_by_role("button", name="Invite a team member")
|
invite_team_member_button = page.get_by_role("button", name="Invite a team member")
|
||||||
expect(invite_team_member_button).to_be_visible()
|
expect(invite_team_member_button).to_be_visible()
|
||||||
@@ -182,7 +178,6 @@ def _teardown(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
expect(page).to_have_title(re.compile("Choose service"))
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ def _setup(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
# Check the page title exists and matches what we expect.
|
# Check the page title exists and matches what we expect.
|
||||||
expect(page).to_have_title(re.compile("Choose service"))
|
expect(page).to_have_title(re.compile("Choose service"))
|
||||||
@@ -76,7 +75,6 @@ def _setup(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
# TODO this fails on staging due to duplicate results on 'get_by_text'
|
||||||
# Check for the service name title and heading.
|
# Check for the service name title and heading.
|
||||||
# service_heading = page.get_by_text(new_service_name, exact=True)
|
# service_heading = page.get_by_text(new_service_name, exact=True)
|
||||||
@@ -358,7 +356,6 @@ def _teardown(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
check_axe_report(page)
|
check_axe_report(page)
|
||||||
|
|
||||||
|
|
||||||
page.click("text='Yes, delete'")
|
page.click("text='Yes, delete'")
|
||||||
|
|
||||||
# Check to make sure that we've arrived at the next page.
|
# Check to make sure that we've arrived at the next page.
|
||||||
|
|||||||
Reference in New Issue
Block a user