DIDView: validate DID format #176

Merged
jose merged 8 commits from didview-invalid-did-handling into master 2 weeks ago
jose commented 3 weeks ago
Owner
  • Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info
  • Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0)
  • Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging

Resolves: DIDView loading current user's info for invalid DID parameters

- Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info - Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0) - Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging Resolves: DIDView loading current user's info for invalid DID parameters
jose added 1 commit 3 weeks ago
74c70c7fa0 fix(DIDView): validate DID format before processing URL parameters
trentlarson reviewed 2 weeks ago
// Should redirect to contacts page
await expect(page).toHaveURL(/.*\/contacts$/);
});
Poster
Owner

Love the additional test!

Love the additional test!
trentlarson marked this conversation as resolved
trentlarson reviewed 2 weeks ago
// Should redirect to contacts page
await expect(page).toHaveURL(/.*\/contacts$/);
});
Poster
Owner

Note that the test seems to go to the front page, so that may not match this test that goes to "contacts". 🤷

Note that the test seems to go to the front page, so that may not match this test that goes to "contacts". 🤷
trentlarson marked this conversation as resolved
jose added 19 commits 2 weeks ago
9f976f011a Fix: account for new Export Data dialog
d663c52f2d feat: implement Build Architecture Guard with Husky hooks
d5786e5131 docs: add comprehensive Build Architecture Guard documentation
7b31ea0143 feat: add Build Architecture Guard PR template
ae0601281b feat: add markdown validation and auto-fix scripts
8336d9d6bd feat: enhance markdown rules for AI generation compliance
80aecbcbbc feat: add Build Architecture Guard MDC directive
963ff9234f feat: implement comprehensive Build Architecture Guard system
2d17bfd3b4 docs: comprehensive documentation updates and modernization
51b8a0b0a8 refactor: complete migration from GitHub to Gitea
d7733e4c41 feat: add markdown automation setup script
5fc362ad4b feat(cursor): add Harbor Pilot universal directive for technical guides
6afe1c4c13 feat(harbor-pilot): add historical comment management and no time estimates rules
4391cb2881 feat(harbor-pilot): add Playwright test investigation directive
Poster
Owner

I fixed the tests by:

  • Making .toHaveURL expect "/" instead of "/contacts" (expected behavior)
  • Merging a different branch that updates the tests to expect the second dialog after adding a contact

Ran the tests again, and it passed with flying colors! I'll go ahead and merge this back.

I fixed the tests by: - Making `.toHaveURL` expect "/" instead of "/contacts" (expected behavior) - Merging a different branch that updates the tests to expect the second dialog after adding a contact Ran the tests again, and it passed with flying colors! I'll go ahead and merge this back.
jose merged commit 43e7bc1c12 into master 2 weeks ago
The pull request has been merged as 43e7bc1c12.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.