-
Notifications
You must be signed in to change notification settings - Fork 42
[WIP] Coral embed #3427
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?
[WIP] Coral embed #3427
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3427 +/- ##
==========================================
+ Coverage 46.30% 46.35% +0.04%
==========================================
Files 583 583
Lines 40877 40956 +79
Branches 1335 1346 +11
==========================================
+ Hits 18927 18984 +57
- Misses 21763 21786 +23
+ Partials 187 186 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
packages/openneuro-app/src/scripts/dataset/comments/coral-embed.tsx
Outdated
Show resolved
Hide resolved
packages/openneuro-app/src/scripts/dataset/comments/coral-embed.tsx
Outdated
Show resolved
Hide resolved
@nellh - Would you mind reviewing this again? I have made the above adjustments, I also added the admin role for Openneuro admins, connected the embed signin to the modal, and added some basic openneuro styling. currently going to fix the lint issues and write some test coverage, as well as wait for the coral teams response to my email |
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 pretty good, a few minor comments.
|
||
global.fetch = vi.fn().mockResolvedValue(Promise.resolve({ | ||
json: vi.fn().mockResolvedValue({ token: "mock-sso-token" }), | ||
})) |
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.
This should probably use the fetch mocking library. vitest-fetch-mock
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.
I am having an issue with vitest-fetch-mock. Is this some sort of version related vite issue?
just adding import createFetchMock from 'vitest-fetch-mock';
to my test file I get
FAIL packages/openneuro-app/src/scripts/dataset/comments/__tests__/coral-embed.spec.jsx > CoralEmbed - Simple Embed.js Check (Vitest) > should check if window.Coral exists and initializeCoralEmbed is called TypeError: Cannot set property testPath of #<Object> which has only a getter
No description provided.