Skip to content

Add paved path for unit testing components with behaviors #904

@joelhawksley

Description

@joelhawksley

Problem statement

How have y'all at Github approached testing view components that have an interactive component to them? We've mainly been unit testing each view component we add and then writing feature specs for browser interactions, but I'm wondering if there is a better way to approach it - RailsConf Q&A

Proposed solution

In Primer ViewComponents, we use system tests powered by cuprite and ViewComponent Previews for testing behaviors. As this approach matures, we should aim to move of much of it as possible into ViewComponent.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions