mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-02 12:49:01 -04:00
code review feedback
This commit is contained in:
5
.github/workflows/checks.yml
vendored
5
.github/workflows/checks.yml
vendored
@@ -93,9 +93,12 @@ jobs:
|
||||
run: |
|
||||
curl --fail -v https://notify-api-staging.app.cloud.gov || exit 1
|
||||
- name: Run Admin server
|
||||
# If we want to log stuff and see what's broken,
|
||||
# insert this line:
|
||||
# tail -f admin-server.log &
|
||||
# above make e2e-test
|
||||
run: |
|
||||
make run-flask > admin-server.log 2>&1 &
|
||||
tail -f admin-server.log &
|
||||
make e2e-test
|
||||
env:
|
||||
API_HOST_NAME: https://notify-api-staging.app.cloud.gov/
|
||||
|
||||
@@ -162,15 +162,14 @@ def _handle_e2e_tests(redirect_url):
|
||||
@main.route("/sign-in", methods=(["GET", "POST"]))
|
||||
@hide_from_search_engines
|
||||
def sign_in():
|
||||
|
||||
# If we have to revalidated the email, send the message
|
||||
# via email and redirect to the "verify your email page"
|
||||
# and don't proceed further with login
|
||||
redirect_url = request.args.get("next")
|
||||
|
||||
if os.getenv("NOTIFY_E2E_TEST_EMAIL"):
|
||||
return _handle_e2e_tests(None)
|
||||
|
||||
# If we have to revalidated the email, send the message
|
||||
# via email and redirect to the "verify your email page"
|
||||
# and don't proceed further with login
|
||||
email_verify_template = _do_login_dot_gov()
|
||||
if (
|
||||
email_verify_template
|
||||
|
||||
3637
package-lock.json
generated
3637
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -39,7 +39,7 @@
|
||||
"morphdom": "^2.7.4",
|
||||
"python": "^0.0.4",
|
||||
"query-command-supported": "1.0.0",
|
||||
"sass-embedded": "^1.77.8",
|
||||
"sass-embedded": "^1.78.0",
|
||||
"textarea-caret": "3.1.0",
|
||||
"timeago": "1.6.7",
|
||||
"vinyl-buffer": "^1.0.1",
|
||||
@@ -48,8 +48,8 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.4",
|
||||
"@uswds/compile": "^1.1.0",
|
||||
"better-npm-audit": "^3.8.3",
|
||||
"@uswds/compile": "^1.2.0",
|
||||
"better-npm-audit": "^3.11.0",
|
||||
"gulp": "^5.0.0",
|
||||
"gulp-add-src": "^1.0.0",
|
||||
"gulp-babel": "8.0.0",
|
||||
@@ -64,7 +64,7 @@
|
||||
"jest-environment-jsdom": "^29.2.2",
|
||||
"jshint": "2.13.6",
|
||||
"jshint-stylish": "2.2.1",
|
||||
"rollup": "^4.21.1",
|
||||
"rollup": "^4.21.2",
|
||||
"rollup-plugin-commonjs": "10.1.0",
|
||||
"rollup-plugin-node-resolve": "5.2.0"
|
||||
}
|
||||
|
||||
@@ -5,33 +5,6 @@ import pytest
|
||||
E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI")
|
||||
|
||||
|
||||
def login_for_end_to_end_testing(browser):
|
||||
# Open a new page and go to the staging site.
|
||||
context = browser.new_context()
|
||||
page = context.new_page()
|
||||
page.goto(f"{E2E_TEST_URI}/sign-in")
|
||||
|
||||
# Wait for the next page to fully load.
|
||||
page.wait_for_load_state("domcontentloaded")
|
||||
# Save storage state into the file.
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
)
|
||||
context.storage_state(path=auth_state_path)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def end_to_end_authenticated_context(browser):
|
||||
|
||||
auth_state_path = os.path.join(
|
||||
os.getenv("NOTIFY_E2E_AUTH_STATE_PATH"), "state.json"
|
||||
)
|
||||
|
||||
context = browser.new_context(storage_state=auth_state_path)
|
||||
|
||||
return context
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def end_to_end_context(browser):
|
||||
context = browser.new_context()
|
||||
|
||||
Reference in New Issue
Block a user