Skip to content

Test: Add inheritance tests #165

@NickDJM

Description

@NickDJM

Summary

There's a lot of prop inheritance going on in Grau and I think it would be pretty cool if we supported some testing to make sure things inherited properly.

We'd need to test changing root-level variables and component-level variables. Basically everything along the chain.

This would essentially be unit tests in a way.

Example:

Test buttons border radius.

  1. If you change the --graupl-border-radius prop to 2rem, the buttons border radius should be 2rem.
  2. If you change the --graupl-button-border-radius prop to 2rem, the buttons border radius should be 2rem.
  3. If you change the --graupl-border-radius prop to 2rem and the --graupl-button-border-radius prop to 3rem, the button border radius should be 3rem.

We'd need to add the top/bottom/left/right checks as well, but this was we'd know what's verified to be happening.

Solution

Implement tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    testRelated to tests or testing something about the project.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions