Skip to content

Commit

Permalink
app_account -> facets
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Dec 16, 2024
1 parent 5921c2b commit 1ce2565
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def test_homepage_v2(client):
╔═ [status] ═╗
200 OK""")


def test_login_flow(client):
web_selfie(client.get("/")).to_match_disk("1. not logged in").facet("md").to_be(
"Please login"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,6 @@ Check your email for your login link.
Welcome back [email protected]
╔═ test_login_flow/3. log in works with cookies[status] ═╗
200 OK
╔═ test_login_flow/3. log in works with those cookies ═╗
<html>
<body>
<h1>
Welcome back [email protected]
</h1>
</body>
</html>

╔═ test_login_flow/3. log in works with those cookies[md] ═╗
Welcome back [email protected]
╔═ test_login_flow/3. log in works with those cookies[status] ═╗
200 OK
╔═ test_login_flow/4. log in blocked without cookies ═╗
<html>
<body>
<h1>
Welcome back [email protected]
</h1>
</body>
</html>

╔═ test_login_flow/4. log in blocked without cookies[md] ═╗
Welcome back [email protected]
╔═ test_login_flow/4. log in blocked without cookies[status] ═╗
200 OK
╔═ test_login_flow/4. log in fails with fake cookies ═╗
<!DOCTYPE html>
<html lang="en">
Expand Down
2 changes: 1 addition & 1 deletion selfie.dev/src/pages/py/facets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ [email protected]|JclThw==;Path=/""")
status code: 401""")
```

We just wrote a high-level specification of a realistic login flow, and it only took 24 lines of python code — most of which were generated for us, and could be regenerated on a whim if we want to change our copywriting. The [corresponding disk snapshot](https://github.com/diffplug/selfie/blob/main/python/example-pytest-selfie/tests/app_account_test.ss) gives us an exhaustive specification and description of the server's behavior.
We just wrote a high-level specification of a realistic login flow, and it only took 24 lines of python code — most of which were generated for us, and could be regenerated on a whim if we want to change our copywriting. The [corresponding disk snapshot](https://github.com/diffplug/selfie/blob/main/python/example-pytest-selfie/tests/facets_test.ss) gives us an exhaustive specification and description of the server's behavior.

Didn't think that adopting a bugfixed version of your internationalization lib would cause any changes to your website whatsever? Oops. Don't wade through failed assertions, get a diff in every failure. If you want, regenerate all the snapshots to get a full view of the problem across the whole codebase in your git client.

Expand Down

0 comments on commit 1ce2565

Please sign in to comment.