mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-16 23:24:55 -05:00
[PR #1886] [CLOSED] add unit and E2E integration tests for community progress syncing #33439
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1886
Author: @kai4avaya
Created: 6/17/2026
Status: ❌ Closed
Base:
dev← Head:kai/fixing-profile-setting-and-map📝 Commits (3)
ffb92e0add unit and E2E integration tests for community progress syncingaac11f5fix: resolve community portal login redirect loop due to missing refresh token4f94f98refactor: clean up unused imports and redundant condition flagged by CodeQL📊 Changes
5 files changed (+366 additions, -9 deletions)
View changed files
📝
tinytorch/quarto/community/modules/auth.js(+4 -4)📝
tinytorch/quarto/community/modules/guard.js(+2 -2)📝
tinytorch/tests/cli/README.md(+30 -3)➕
tinytorch/tests/cli/test_community_flow.py(+146 -0)➕
tinytorch/tests/cli/test_live_submission.py(+184 -0)📄 Description
the TinyTorch CLI progress syncing flow, resolves a login
redirect loop on the community portal website caused by a
missing refresh token, and resolves subsequent CodeQL code
quality findings.
configuration parser, payload assembly, and token refresh logic
under offline mocked conditions.
- Added
tests/cli/test_live_submission.pyto perform E2Everification including programmatic Supabase login, progress
upload, and verification of profile details persistence.
- Updated
tests/cli/README.mdto document the new testsuites and explain how developers can configure a local
.envfile to run integration tests.
using a dummy refresh token fallback (
"dummy_refresh_token")if
storedRefreshis missing in local storage.- Modified auth.js to restore sessions in
verifySessionandhandleAutheven when the Netlifyauthentication proxy fails to return a
refresh_token.Python test files.
- Simplified redundant conditional
if (!sbSession && token)to
if (!sbSession)inauth.js.rebuilt/compiled using
quarto renderto ensure the compiledassets in
quarto/_build/community/modules/are updated withthese changes.
verified the browser login flow at
http://localhost:8000/community/index.html. Logging in usingthe test credentials correctly redirected to
profile_setup. htmland remained authenticated. Successfully completed theprofile update without encountering any loop, landing on
dashboard.html.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.