Skip to content

Commit

Permalink
Fix logout, update Playwright snapshots
Browse files Browse the repository at this point in the history
Also fix `playwright.env` getting all sorts of junk in it.
  • Loading branch information
trey committed Feb 19, 2024
1 parent f68deae commit b423a42
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dev/test-build
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case $yn in
npx playwright install --with-deps

# Run Playwright tests with a new user
printf "CREATE_USER=True\[email protected]\nPLAYWRIGHT_PASSWORD=tester_password" >> ../e2e/playwright.env
printf "CREATE_USER=True\[email protected]\nPLAYWRIGHT_PASSWORD=tester_password" > ../e2e/playwright.env
npx playwright test

read -p "Delete test build folder (./.test_project/)? (Y/N) " yn2
Expand Down
Binary file modified e2e/home-page.spec.js-snapshots/home-page-dark-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified e2e/home-page.spec.js-snapshots/home-page-dark-webkit-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified e2e/home-page.spec.js-snapshots/home-page-light-chromium-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions templates/placeholder.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ <h1>Blaze.horse — Django Starter Kit</h1>
<p>
Now you can see <a href="{% url 'private-page' %}">the private page</a>.
</p>
<p>
<a href="{% url 'logout' %}">Log out</a>
</p>
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button>Log out</button>
</form>
{% else %}
<p>
<a href="{% url 'login' %}">Log in</a>
Expand Down
7 changes: 4 additions & 3 deletions templates/private.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<h1>Private page!</h1>

<p>Logged in as {{ request.user }}</p>
<p>
<a href="{% url 'logout' %}">Log out</a>
</p>
<form method="post" action="{% url 'logout' %}">
{% csrf_token %}
<button>Log out</button>
</form>
{% endblock content %}

0 comments on commit b423a42

Please sign in to comment.