Skip to content

Commit

Permalink
debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed May 9, 2024
1 parent b24a095 commit 0264f32
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions cookie_consent/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class CookieStatusView(View):
"""

def get(self, request: HttpRequest) -> JsonResponse:
print("GET cookie status")
accepted = get_accepted_cookie_groups(request)
declined = get_declined_cookie_groups(request)
not_accepted_or_declined = get_not_accepted_or_declined_cookie_groups(request)
Expand All @@ -114,4 +115,5 @@ def get(self, request: HttpRequest) -> JsonResponse:
group.varname for group in not_accepted_or_declined
],
}
print("RESPONSE cookie status")
return JsonResponse(data)
3 changes: 3 additions & 0 deletions tests/test_javascript_cookiebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ def test_on_accept_handler_runs_on_load(page: Page, live_server):

test_page_url = f"{live_server.url}{reverse('test_page')}"
page.goto(test_page_url)
print("GOTO PAGE")
marker = page.get_by_text("page-done-loading")
expect(marker).to_be_visible()
print("PAGE DONE LOADING")

share_button = page.get_by_role("button", name="SHARE")
print("CHECKING SHARE BUTTON")
expect(share_button).to_be_visible()
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ extras =
deps =
Django~=4.2.0
commands =
pytest tests \
pytest -s tests \
--cov --cov-report xml:reports/coverage-{envname}.xml \
{posargs}

Expand Down

0 comments on commit 0264f32

Please sign in to comment.