mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
make this branch exactly like the pre-upgrade branch
This commit is contained in:
@@ -44,7 +44,6 @@ applications:
|
|||||||
|
|
||||||
NOTIFY_BILLING_DETAILS: '[]'
|
NOTIFY_BILLING_DETAILS: '[]'
|
||||||
|
|
||||||
SSL_CERT_FILE: '/etc/ssl/certs/ca-certificates.crt'
|
|
||||||
REQUESTS_CA_BUNDLE: '/etc/ssl/certs/ca-certificates.crt'
|
REQUESTS_CA_BUNDLE: '/etc/ssl/certs/ca-certificates.crt'
|
||||||
NEW_RELIC_CA_BUNDLE_PATH: '/etc/ssl/certs/ca-certificates.crt'
|
NEW_RELIC_CA_BUNDLE_PATH: '/etc/ssl/certs/ca-certificates.crt'
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ python = "^3.12.2"
|
|||||||
ago = "~=0.1.0"
|
ago = "~=0.1.0"
|
||||||
beautifulsoup4 = "^4.13.3"
|
beautifulsoup4 = "^4.13.3"
|
||||||
blinker = "~=1.8"
|
blinker = "~=1.8"
|
||||||
eventlet = "==0.40.0"
|
|
||||||
exceptiongroup = "==1.3.0"
|
exceptiongroup = "==1.3.0"
|
||||||
flask = "~=3.1"
|
flask = "~=3.1"
|
||||||
flask-basicauth = "~=0.2"
|
flask-basicauth = "~=0.2"
|
||||||
@@ -89,7 +88,7 @@ jinja2-cli = {version = "==0.8.2", extras = ["yaml"]}
|
|||||||
moto = "*"
|
moto = "*"
|
||||||
pip-audit = "*"
|
pip-audit = "*"
|
||||||
pre-commit = "^4.2.0"
|
pre-commit = "^4.2.0"
|
||||||
pytest = "^8.4.0"
|
pytest = "^8.3.5"
|
||||||
pytest-env = "^1.1.3"
|
pytest-env = "^1.1.3"
|
||||||
pytest-mock = "^3.14.1"
|
pytest-mock = "^3.14.1"
|
||||||
pytest-playwright = "^0.7.0"
|
pytest-playwright = "^0.7.0"
|
||||||
|
|||||||
@@ -1725,111 +1725,111 @@ def test_add_template_page_title(
|
|||||||
assert normalize_spaces(page.select_one("h1").text) == expected
|
assert normalize_spaces(page.select_one("h1").text) == expected
|
||||||
|
|
||||||
|
|
||||||
# def test_can_create_email_template_with_emoji(
|
def test_can_create_email_template_with_emoji(
|
||||||
# client_request, mock_create_service_template
|
client_request, mock_create_service_template
|
||||||
# ):
|
):
|
||||||
# client_request.post(
|
client_request.post(
|
||||||
# ".add_service_template",
|
".add_service_template",
|
||||||
# service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
# template_type="email",
|
template_type="email",
|
||||||
# _data={
|
_data={
|
||||||
# "name": "new name",
|
"name": "new name",
|
||||||
# "subject": "Food incoming!",
|
"subject": "Food incoming!",
|
||||||
# "template_content": "here's a burrito 🌯",
|
"template_content": "here's a burrito 🌯",
|
||||||
# "template_type": "email",
|
"template_type": "email",
|
||||||
# "service": SERVICE_ONE_ID,
|
"service": SERVICE_ONE_ID,
|
||||||
# "process_type": "normal",
|
"process_type": "normal",
|
||||||
# },
|
},
|
||||||
# _expected_status=302,
|
_expected_status=302,
|
||||||
# )
|
)
|
||||||
# assert mock_create_service_template.called is True
|
assert mock_create_service_template.called is True
|
||||||
|
|
||||||
|
|
||||||
# @pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
# ("template_type", "expected_error"),
|
("template_type", "expected_error"),
|
||||||
# [
|
[
|
||||||
# (
|
(
|
||||||
# "sms",
|
"sms",
|
||||||
# (
|
(
|
||||||
# "Please remove the unaccepted character 🍜 in your message, then save again"
|
"Please remove the unaccepted character 🍜 in your message, then save again"
|
||||||
# ),
|
),
|
||||||
# ),
|
),
|
||||||
# ],
|
],
|
||||||
# )
|
)
|
||||||
# def test_should_not_create_sms_template_with_emoji(
|
def test_should_not_create_sms_template_with_emoji(
|
||||||
# client_request,
|
client_request,
|
||||||
# service_one,
|
service_one,
|
||||||
# mock_create_service_template,
|
mock_create_service_template,
|
||||||
# template_type,
|
template_type,
|
||||||
# expected_error,
|
expected_error,
|
||||||
# ):
|
):
|
||||||
# service_one["permissions"] += [template_type]
|
service_one["permissions"] += [template_type]
|
||||||
# page = client_request.post(
|
page = client_request.post(
|
||||||
# ".add_service_template",
|
".add_service_template",
|
||||||
# service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
# template_type=template_type,
|
template_type=template_type,
|
||||||
# _data={
|
_data={
|
||||||
# "name": "new name",
|
"name": "new name",
|
||||||
# "template_content": "here are some noodles 🍜",
|
"template_content": "here are some noodles 🍜",
|
||||||
# "template_type": "sms",
|
"template_type": "sms",
|
||||||
# "service": SERVICE_ONE_ID,
|
"service": SERVICE_ONE_ID,
|
||||||
# "process_type": "normal",
|
"process_type": "normal",
|
||||||
# },
|
},
|
||||||
# _expected_status=200,
|
_expected_status=200,
|
||||||
# )
|
)
|
||||||
# # print(page.main.prettify())
|
# print(page.main.prettify())
|
||||||
# assert expected_error in normalize_spaces(
|
assert expected_error in normalize_spaces(
|
||||||
# page.select_one("#template_content-error").text
|
page.select_one("#template_content-error").text
|
||||||
# )
|
)
|
||||||
# assert mock_create_service_template.called is False
|
assert mock_create_service_template.called is False
|
||||||
|
|
||||||
|
|
||||||
# @pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
# ("template_type", "expected_error"),
|
("template_type", "expected_error"),
|
||||||
# [
|
[
|
||||||
# (
|
(
|
||||||
# "sms",
|
"sms",
|
||||||
# (
|
(
|
||||||
# "Please remove the unaccepted character 🍔 in your message, then save again"
|
"Please remove the unaccepted character 🍔 in your message, then save again"
|
||||||
# ),
|
),
|
||||||
# ),
|
),
|
||||||
# ],
|
],
|
||||||
# )
|
)
|
||||||
# def test_should_not_update_sms_template_with_emoji(
|
def test_should_not_update_sms_template_with_emoji(
|
||||||
# mocker,
|
mocker,
|
||||||
# client_request,
|
client_request,
|
||||||
# service_one,
|
service_one,
|
||||||
# mock_get_service_template,
|
mock_get_service_template,
|
||||||
# mock_update_service_template,
|
mock_update_service_template,
|
||||||
# fake_uuid,
|
fake_uuid,
|
||||||
# template_type,
|
template_type,
|
||||||
# expected_error,
|
expected_error,
|
||||||
# ):
|
):
|
||||||
# service_one["permissions"] += [template_type]
|
service_one["permissions"] += [template_type]
|
||||||
# return mocker.patch(
|
return mocker.patch(
|
||||||
# "app.service_api_client.get_service_template",
|
"app.service_api_client.get_service_template",
|
||||||
# return_value=template_json(
|
return_value=template_json(
|
||||||
# SERVICE_ONE_ID,
|
SERVICE_ONE_ID,
|
||||||
# fake_uuid,
|
fake_uuid,
|
||||||
# type_=template_type,
|
type_=template_type,
|
||||||
# ),
|
),
|
||||||
# )
|
)
|
||||||
# page = client_request.post(
|
page = client_request.post(
|
||||||
# ".edit_service_template",
|
".edit_service_template",
|
||||||
# service_id=SERVICE_ONE_ID,
|
service_id=SERVICE_ONE_ID,
|
||||||
# template_id=fake_uuid,
|
template_id=fake_uuid,
|
||||||
# _data={
|
_data={
|
||||||
# "id": fake_uuid,
|
"id": fake_uuid,
|
||||||
# "name": "new name",
|
"name": "new name",
|
||||||
# "template_content": "here's a burger 🍔",
|
"template_content": "here's a burger 🍔",
|
||||||
# "service": SERVICE_ONE_ID,
|
"service": SERVICE_ONE_ID,
|
||||||
# "template_type": template_type,
|
"template_type": template_type,
|
||||||
# "process_type": "normal",
|
"process_type": "normal",
|
||||||
# },
|
},
|
||||||
# _expected_status=200,
|
_expected_status=200,
|
||||||
# )
|
)
|
||||||
# assert expected_error in page.text
|
assert expected_error in page.text
|
||||||
# assert mock_update_service_template.called is False
|
assert mock_update_service_template.called is False
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ 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")
|
||||||
|
|
||||||
|
|
||||||
def create_new_template(page):
|
async def create_new_template(page):
|
||||||
|
|
||||||
current_service_link = page.get_by_text("Current service")
|
current_service_link = page.get_by_text("Current service")
|
||||||
expect(current_service_link).to_be_visible()
|
expect(current_service_link).to_be_visible()
|
||||||
@@ -84,6 +84,7 @@ def create_new_template(page):
|
|||||||
page.wait_for_load_state("domcontentloaded")
|
page.wait_for_load_state("domcontentloaded")
|
||||||
|
|
||||||
preview_button = page.get_by_text("Preview")
|
preview_button = page.get_by_text("Preview")
|
||||||
|
assert await preview_button.evaluate("el => el.tagName") == "BUTTON"
|
||||||
expect(preview_button).to_be_visible()
|
expect(preview_button).to_be_visible()
|
||||||
preview_button.click()
|
preview_button.click()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user