Skip to content

chore: Generate test definitions#4544

Open
jperals wants to merge 1 commit into
mainfrom
chore/test-definitions
Open

chore: Generate test definitions#4544
jperals wants to merge 1 commit into
mainfrom
chore/test-definitions

Conversation

@jperals
Copy link
Copy Markdown
Member

@jperals jperals commented May 20, 2026

Description

Adds test definitions and builds them into the lib directory as part of the build process.

Doc: J5RmAnz6YwPa

Test definitions for two components (action card and alert) are added, but they are not run yet (for an example of that, see #4509). Once I can consume them internally I will add the rest.

How has this been tested?

Ran npm run build and inspected the test-definitions directory generated inside lib.

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -0,0 +1,32 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These two files are inside test/definitions/visual because they are definitions of visual regression tests, but I intentionally named the build files and process after just "test definitions" and not specifically "visual test definitions" because this approach can be used for other tests, such as integration tests, if we later want to.

@jperals jperals marked this pull request as ready for review May 20, 2026 14:38
@jperals jperals requested a review from a team as a code owner May 20, 2026 14:38
@jperals jperals requested review from cansuaa and removed request for a team May 20, 2026 14:38
@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.42%. Comparing base (7c2631d) to head (168756d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4544   +/-   ##
=======================================
  Coverage   97.42%   97.42%           
=======================================
  Files         939      939           
  Lines       29645    29645           
  Branches    10772    10771    -1     
=======================================
  Hits        28883    28883           
- Misses        715      755   +40     
+ Partials       47        7   -40     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant