You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While tests are very helpful, too many tests, or too intensive tests make the code hard and more cumbersome to change. So what we need are rather basic tests for components, and when appropriate (like extenders or utils/helpers) more in-depth tests.
Striking a balance between sufficient test coverage and maintainability is crucial here.
The most basic test we can have for a component, yet can still be useful, is that it simply renders without issues and some interactions (such as any clicks) work as expected.
We'll prioritize components that are building blocks of other components.
Then Utils/Helpers that are most commonly used.
Then Extenders.
And finally Large components. (integration tests if possible)
Building Blocks
Avatar
Badge
Button
Checkbox
ColorPreviewInput
Dropdown
FieldSet
Modal & FormModal
Input
Icon
Link & LinkButton
LoadingIndicator
MultiSelect
Select
SelectDropdown
SplitDropdown
Tooltip (tied to jquery so skipping for now)
Utils/Helpers
highlight
string
extractText
listItems
extend & override
Extenders
Model
PostTypes
Notification
Routes
Search
Store
Larger components
PostStream
AlertManager
ModalManager
The various modals (asserting that they render without issue would already be good to have)
Somepages like the IndexPage if possible
Relevant links, should be documented with the docs we will add for frontend testing:
While tests are very helpful, too many tests, or too intensive tests make the code hard and more cumbersome to change. So what we need are rather basic tests for components, and when appropriate (like extenders or utils/helpers) more in-depth tests.
Striking a balance between sufficient test coverage and maintainability is crucial here.
The most basic test we can have for a component, yet can still be useful, is that it simply renders without issues and some interactions (such as any clicks) work as expected.
We'll prioritize components that are building blocks of other components.
Then Utils/Helpers that are most commonly used.
Then Extenders.
And finally Large components. (integration tests if possible)
Building Blocks
Tooltip(tied to jquery so skipping for now)Utils/Helpers
Extenders
Larger components
IndexPage
if possibleRelevant links, should be documented with the docs we will add for frontend testing:
Must also add the
Jest
infra generation to the CLI.The text was updated successfully, but these errors were encountered: