Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(e2e): add PublicAPI tests and use metadata for icon tests #5846

Merged

Conversation

joshblack
Copy link
Contributor

@joshblack joshblack commented Apr 10, 2020

Adds updated e2e tests for icons and icons-react, including a Public API snapshot and tests that leverage metadata as a source of truth.

Changelog

New

  • Add load helper to Metadata to load metadata information in-memory instead of persisting to disk
  • Add PublicAPI-test.js files for e2e/icons and e2e/icons-react. These test the public exports of these packages
  • Add e2e tests for pictograms and pictograms-react

Changed

  • Update DAP helper to be lazily loaded as it was running into issues when running in a Node.js test environment
  • Update e2e tests for icons and icons-react to use the metadata as the source of truth instead of build info as we start to move away from that resource.
  • Update pictograms package to have main and module fields

Removed

@joshblack joshblack requested review from laurenmrice and a team as code owners April 10, 2020 20:07
@ghost ghost requested review from aledavila and tw15egan April 10, 2020 20:07
@joshblack joshblack removed the request for review from laurenmrice April 10, 2020 20:08
@netlify
Copy link

netlify bot commented Apr 10, 2020

Deploy preview for carbon-elements ready!

Built with commit c7b0603

https://deploy-preview-5846--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Apr 10, 2020

Deploy preview for carbon-components-react ready!

Built with commit c7b0603

https://deploy-preview-5846--carbon-components-react.netlify.com

if (Array.isArray(icon.namespace) && icon.namespace.length > 0) {
entry.namespace = icon.namespace.join('/');
}
entry.namespace = Array.isArray(icon.namespace) ? icon.namespace : [];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a quick heads up for metadata changes @vpicone just going to have this be an array instead of converting it 👍

@netlify
Copy link

netlify bot commented Apr 10, 2020

Deploy preview for carbon-elements ready!

Built with commit ec9cc37

https://deploy-preview-5846--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Apr 10, 2020

Deploy preview for carbon-components-react ready!

Built with commit e44d813

https://deploy-preview-5846--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Apr 10, 2020

Deploy preview for carbon-components-react ready!

Built with commit ec9cc37

https://deploy-preview-5846--carbon-components-react.netlify.com

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

Tests work as expected 👍 ✅

@joshblack joshblack merged commit 84b5158 into carbon-design-system:master Apr 14, 2020
@joshblack joshblack deleted the test/add-exports-test-for-icons branch April 14, 2020 16:24
joshblack added a commit to joshblack/carbon that referenced this pull request Apr 16, 2020
…n-design-system#5846)

* chore(github): update CODEOWNERS syntax for PublicAPI files

* test(e2e): add PublicAPI tests and use metadata for icon tests

* fix(icons): add registry to exports and check for duplicate sizes

* test(matchers): defer AAT module resolution until called

* docs(icon-build-helpers): add jsdoc for load export

* test(e2e): add ESM files to exports test

* chore(test): update paths for registry

* chore(github): update CODEOWNERS comments

* fix(icon-build-helpers): set namespace for pictograms

* fix(pictograms): add main and module fields to package.json

* test(e2e): add e2e tests for pictograms and pictograms-react

Co-authored-by: TJ Egan <tw15egan@gmail.com>
joshblack added a commit that referenced this pull request Apr 21, 2020
* chore(github): update CODEOWNERS syntax for PublicAPI files

* test(e2e): add PublicAPI tests and use metadata for icon tests

* fix(icons): add registry to exports and check for duplicate sizes

* test(matchers): defer AAT module resolution until called

* docs(icon-build-helpers): add jsdoc for load export

* test(e2e): add ESM files to exports test

* chore(test): update paths for registry

* chore(github): update CODEOWNERS comments

* fix(icon-build-helpers): set namespace for pictograms

* fix(pictograms): add main and module fields to package.json

* test(e2e): add e2e tests for pictograms and pictograms-react

Co-authored-by: TJ Egan <tw15egan@gmail.com>
This was referenced Apr 23, 2020
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.

3 participants