mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 00:48:25 -04:00
cleanup
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user