Skip to content

# test(e2e): add settings persistence and failure handling tests (#3805) - #3830

Merged
Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
KartikeyG-world:test/issue-3805-settings-e2e
Nov 26, 2026
Merged

Priyanshu-byte-coder merged 2 commits into
Priyanshu-byte-coder:mainfrom
KartikeyG-world:test/issue-3805-settings-e2e

Conversation

@KartikeyG-world

Copy link
Copy Markdown
Contributor

Closes #3805

Description

Implements complete Playwright E2E coverage for user settings changes, state persistence across page reloads, and error handling when persistence fails.

Key Changes

  • Extended shared settings mock in e2e/settings.spec.js to statefully support bio and timezone alongside existing visibility settings.
  • Added test verifying bio updates (#profile-bio -> "Save Bio"), timezone selection (#timezone-select -> "Asia/Kolkata"), and public profile visibility toggle.
  • Added reload verification asserting that all modified settings (bio, timezone, is_public) persist accurately after page.reload().
  • Added failure path test asserting that when PATCH /api/user/settings returns HTTP 500, appropriate error feedback is rendered, no false success message is shown, and unsaved changes are not persisted on reload.
  • Maintained exact one-commit-per-file discipline (1 commit for 1 modified file).

Testing & Verification

  • pnpm run type-check: Passed with 0 errors.
  • git diff --check: 0 whitespace issues.

Contributor Notes (WOCS 2026)

@github-actions github-actions Bot added type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) labels Nov 26, 2026

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good coverage: the stateful mock makes the reload check meaningful, and the 500 path asserts there's no false success message. Thanks!

You mentioned WOCS 2026 in the description but used a custom PR body, so the template's WOCS checkbox isn't there. I've added wocs and level 2 for you; next time keep the template and tick the box.

@Priyanshu-byte-coder Priyanshu-byte-coder added wocs Winter of Code Social 2026: counts for WOCS points level 2 WOCS: moderate, bug fixes/tests/small features (5 points) labels Nov 26, 2026
@github-actions

Copy link
Copy Markdown

Thanks for the PR, @KartikeyG-world! ❄️ This PR is tracked for Winter of Code Social 2026.

See CONTRIBUTING.md for the details.

@Priyanshu-byte-coder Priyanshu-byte-coder left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approving after updating with main.

@Priyanshu-byte-coder
Priyanshu-byte-coder merged commit 596bb04 into Priyanshu-byte-coder:main Nov 26, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

🎉 Merged! Thanks for contributing to DevTrack.

If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers.

Keep an eye on open issues for your next contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level 2 WOCS: moderate, bug fixes/tests/small features (5 points) type:feature GSSoC type bonus: new feature type:testing GSSoC type bonus: tests (+10 pts) wocs Winter of Code Social 2026: counts for WOCS points

Projects

None yet

Development

Successfully merging this pull request may close these issues.

E2E test: saving settings

2 participants