community-platform
community-platform copied to clipboard
fix: Add spaces to notifications with urls
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.10%. Comparing base (
38d5be0
) to head (86f06cb
).
Additional details and impacted files
@@ Coverage Diff @@
## master #3331 +/- ##
==========================================
+ Coverage 66.00% 66.10% +0.09%
==========================================
Files 418 418
Lines 13543 13543
Branches 2493 2493
==========================================
+ Hits 8939 8952 +13
+ Misses 4552 4539 -13
Partials 52 52
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
maybe a test update would be good, something like
import { MemoryRouter } from 'react-router-dom'
import { render } from '@testing-library/react'
import { NotificationTypes } from 'oa-shared'
import { FactoryNotification } from 'src/test/factories/Notification'
import { getFormattedNotifications } from './getFormattedNotifications'
describe('getFormattedNotifications', () => {
NotificationTypes.forEach((type) => {
it(`returns a well formatted ${type} message with spaces between words and values`, () => {
const [notification] = getFormattedNotifications([
FactoryNotification({ type }),
])
const { container } = render(
<MemoryRouter>{notification.children}</MemoryRouter>,
)
expect(container).not.toBeEmptyDOMElement()
// Assert that there are spaces between words and values in the formatted notification message
const formattedMessage = container.textContent
const words = formattedMessage.split(' ')
expect(words.length).toBeGreaterThan(0)
})
})
})
Hey @exabyssus. Are you still able to work on this?
Passing run #5404 ↗︎
![]() |
![]() |
![]() |
![]() |
![]() |
Details:
Merge branch 'master' into 3330-notification-spaces | |||
Project: onearmy-community-platform | Commit: 86f06cb7c9 |
||
Status: Passed | Duration: 04:53 💡 | ||
Started: Apr 12, 2024 1:49 PM | Ended: Apr 12, 2024 1:54 PM |
Review all test suite changes for PR #3331 ↗︎
Shame not to have the test for this but still want to merge it in. Thanks for your work @exabyssus.
@all-contributors please add @exabyssus for code
:tada: This PR is included in version 1.172.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket: