Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

feat: Created Unit Tests for CSS Color Variables Alignment with Figma Token JSON #719

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

brianacnguyen
Copy link
Contributor

@brianacnguyen brianacnguyen commented Jun 3, 2024

Description

  • This PR seeks to add unit tests to brand color tokens, light theme tokens, and dark theme tokens

Related issues

Fixes: #612

Manual testing steps

  1. run yarn jest src/css

Screenshots/Recordings

Before

After

  • Brand colors test passing
Screenshot 2024-06-03 at 9 37 21 AM Screenshot 2024-06-03 at 9 37 28 AM
  • Brand colors when there's a discrepancy between json and css
Screenshot 2024-06-03 at 9 37 50 AM
  • Theme colors test passing
Screenshot 2024-06-03 at 9 38 12 AM Screenshot 2024-06-03 at 9 40 09 AM
  • Theme colors when there's a hex discrepancy between json and css
Screenshot 2024-06-03 at 9 40 27 AM
  • Theme colors when there's a brand color discrepancy between json and css
Screenshot 2024-06-03 at 9 40 46 AM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@brianacnguyen brianacnguyen added the team-design-system All issues relating to design system label Jun 3, 2024
@brianacnguyen brianacnguyen self-assigned this Jun 3, 2024
@brianacnguyen brianacnguyen requested a review from a team as a code owner June 3, 2024 16:46
Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left one non-blocking comment to understand the linting ignores

@metamaskbot
Copy link
Collaborator

Builds ready [ccecf0c]

Storybook: Storybook

Copy link
Collaborator

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🧪 💯 This is going to be a game changer for catching incorrect CSS color tokens during updates. Nice work!

@brianacnguyen brianacnguyen merged commit 52fab7e into main Jun 4, 2024
19 checks passed
@brianacnguyen brianacnguyen deleted the css-test branch June 4, 2024 15:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
team-design-system All issues relating to design system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Unit Tests for CSS Color Variables Alignment with Figma Token JSON
3 participants