Skip to content
This repository was archived by the owner on May 10, 2019. It is now read-only.

Reduce the amount of snapshot tests #135

@Caleb-Ellis

Description

@Caleb-Ellis

While updating the components to use Vanilla 1.8.0 styling/markup (from 1.6.6) I found that pretty much every component that changed had their tests fail. This was due to the tests being very tightly coupled with the markup (almost 1:1 coupling in fact) meaning that the tests are extremely brittle. I think we should reduce the amount of snapshot tests considerably, in favour of simpler unit tests.

As an example, currently one of the MediaObject tests checks if the large prop works by snapshotting the markup. It would be much simpler to just check if the relevant class (p-media-object--large) is present, rather than the whole markup structure match the snapshot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions