-
Notifications
You must be signed in to change notification settings - Fork 20
Add seer tag when flask #937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #937 +/- ##
==========================================
- Coverage 26.70% 26.65% -0.05%
==========================================
Files 41 41
Lines 1101 1103 +2
Branches 121 122 +1
==========================================
Hits 294 294
- Misses 787 789 +2
Partials 20 20
|
maxkosty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we never shipped this. Some comments
| return; | ||
| } | ||
|
|
||
| if(getTag('backendType') === 'flask') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now 2 more backends have a well-tested seer RCA+solution
| if(getTag('backendType') === 'flask') { | |
| if(['flask', 'laravel', 'flask-otlp'].includes(getTag('backendType'))) { |
| // test('sets seerDemo tag when backendType is flask', async () => { | ||
| // const mockGetCurrentScope = jest.fn(() => ({ | ||
| // _tags: { backendType: 'flask' } | ||
| // })); | ||
| // Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope); | ||
|
|
||
| // render( | ||
| // <Provider store={store}> | ||
| // <Router> | ||
| // <Checkout backend="/api" rageclick={false} /> | ||
| // </Router> | ||
| // </Provider> | ||
| // ); | ||
|
|
||
| // // Trigger checkout by submitting the form | ||
| // fireEvent.submit(screen.getByRole('button', { name: /Complete order/i })); | ||
|
|
||
| // await waitFor(() => { | ||
| // expect(Sentry.setTag).toHaveBeenCalledWith('seerDemo', true); | ||
| // }); | ||
| // }); | ||
|
|
||
| // test('does not set seerDemo tag when backendType is not flask', async () => { | ||
| // const mockGetCurrentScope = jest.fn(() => ({ | ||
| // _tags: { backendType: 'express' } | ||
| // })); | ||
| // Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope); | ||
|
|
||
| // render( | ||
| // <Provider store={store}> | ||
| // <Router> | ||
| // <Checkout backend="/api" rageclick={false} /> | ||
| // </Router> | ||
| // </Provider> | ||
| // ); | ||
|
|
||
| // // Trigger checkout by submitting the form | ||
| // fireEvent.submit(screen.getByRole('button', { name: /Complete order/i })); | ||
|
|
||
| // await waitFor(() => { | ||
| // expect(Sentry.setTag).not.toHaveBeenCalledWith('seerDemo', true); | ||
| // }); | ||
| // }); | ||
|
|
||
| // test('does not set seerDemo tag when backendType is undefined', async () => { | ||
| // const mockGetCurrentScope = jest.fn(() => ({ | ||
| // _tags: {} | ||
| // })); | ||
| // Sentry.getCurrentScope.mockImplementation(mockGetCurrentScope); | ||
|
|
||
| // render( | ||
| // <Provider store={store}> | ||
| // <Router> | ||
| // <Checkout backend="/api" rageclick={false} /> | ||
| // </Router> | ||
| // </Provider> | ||
| // ); | ||
|
|
||
| // // Trigger checkout by submitting the form | ||
| // fireEvent.submit(screen.getByRole('button', { name: /Complete order/i })); | ||
|
|
||
| // await waitFor(() => { | ||
| // expect(Sentry.setTag).not.toHaveBeenCalledWith('seerDemo', true); | ||
| // }); | ||
| // }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
???
When the backend service called during the checkout flow is flask, set the seerDemo tag to true. This will enable team members to find example issues for the seer demo easily.
Testing: