Refactor MainLayout to use new hooks for flyers and master items; consolidate error handling
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Update error handling tests to ensure proper status assignment for errors
This commit is contained in:
@@ -171,9 +171,9 @@ describe('AnalysisPanel', () => {
|
||||
|
||||
it('should display a specific error for geolocation permission denial', async () => {
|
||||
// Mock getCurrentPosition to reject the promise, which is how the component's logic handles errors.
|
||||
(navigator.geolocation.getCurrentPosition as Mocked<any>).mockImplementation(
|
||||
(navigator.geolocation.getCurrentPosition as Mock).mockImplementation(
|
||||
(
|
||||
success: (position: GeolocationPosition) => void,
|
||||
_success: (position: GeolocationPosition) => void,
|
||||
error: (error: GeolocationPositionError) => void
|
||||
) => {
|
||||
// The component wraps this in a Promise, so we call the error callback which causes the promise to reject.
|
||||
|
||||
Reference in New Issue
Block a user