test: fix GlobalError test to match updated error display format#808
Open
vdimarco wants to merge 5 commits into
Open
test: fix GlobalError test to match updated error display format#808vdimarco wants to merge 5 commits into
vdimarco wants to merge 5 commits into
Conversation
The desktop app was showing 'Something went wrong' because NEXT_PUBLIC_PRIVY_APP_ID was not set during the build. Added required environment variables from secrets.
The tray icon was being created twice - once by the trayIcon config in tauri.conf.json and once programmatically in lib.rs setup_tray(). This caused two Gatewayz icons to appear in the Windows taskbar. Removed the config since the code handles it.
- Add 'Show error details' button visible only in desktop app - Display full error name, message, and stack trace - Console log errors for debugging - Helps diagnose 'Something went wrong' errors when DevTools unavailable
Tauri desktop apps use tauri.localhost which is not HTTPS. This causes Privy's embedded wallet to throw: 'Embedded wallet is only available over HTTPS' - Add isTauriDesktop() function to detect Tauri environment - Update shouldDisableEmbeddedWallets() to disable wallets in Tauri - Add tests for Tauri detection - Update getBrowserEnvironmentInfo() to include isTauri field
The GlobalError component was updated to show error details in the format
"Error: {error.name}: {error.message}" instead of just "{error.message}".
This updates the test to use a function matcher that finds the error message
within the correct element, avoiding issues with the regex matching multiple
elements due to the "Error:" prefix in the strong tag.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GlobalError/should display error message in development modescreen.getByText('Test error message')which failed because the component now rendersError: {error.name}: {error.message}formatChanges
src/app/__tests__/global-error.test.tsxto use a function matcher instead of exact text matchTest plan
🤖 Generated with Claude Code
Greptile Summary
This PR fixes a failing test in the GlobalError component test suite. The test was updated to match the component's error display format which was changed in a previous commit.
The PR also includes several unrelated fixes for the Tauri desktop app:
tauri.conf.jsonMain Changes:
global-error.test.tsxto use a function matcher instead of exact text matching to accommodate the error format:Error: {error.name}: {error.message}isTauriDesktop()function to disable embedded wallets on Tauri apps (tauri.localhost is not HTTPS)Confidence Score: 5/5
Important Files Changed
Error: {error.name}: {error.message})Sequence Diagram
sequenceDiagram participant Test as Test Suite participant Component as GlobalError Component participant DOM as Rendered DOM Note over Test,DOM: Test Execution Flow Test->>Component: render(<GlobalError error={mockError} reset={mockReset} />) Component->>Component: Format error message as "Error: {error.name}: {error.message}" Component->>DOM: Render error details in <p> tag Note over Test,DOM: Previous Test (Failed) Test->>DOM: screen.getByText('Test error message') DOM-->>Test: ❌ Not found (exact match failed) Note over Test,DOM: Updated Test (Passes) Test->>DOM: screen.getByText((content, element) => {...}) DOM->>DOM: Check element.tagName === 'P' DOM->>DOM: Check content.includes('Test error message') DOM-->>Test: ✅ Found matching element