Taylor Jones

Results 127 comments of Taylor Jones

This is probably something we'll need to defer into the next iteration of DatePicker, https://github.com/carbon-design-system/carbon/issues/11967

## High level steps 1. Get familiar with the component, gather list of functionality/api to be tested 1. Comment out or rename existing tests 1. Include RTL imports 1. Create...

## Patterns ### What should we test? - How does a person use the component? - Click, hover - Keyboard - focus - special keys relating to functionality - "esc...

We need to resurrect https://github.com/carbon-design-system/carbon/pull/4467 so that `jest-dom` matchers like `toBeVisible` will work.

### Testing against `next` component versions - We'll move to a single file approach for these. One test file per component instead of duplicating a test file into `/next`. -...

### Do not use relative paths for component imports - #10304 adds a config for `moduleNameMapper` to ensure imports from common packages (`@carbon/react`, `@carbon/react/icons`, `carbon-components-react`) within test files are resolved...

### Where to place component composition (children) integration tests - For components that leverage composition of specific children, place composition integration tests in the parent component's test file. - As...

### Testing pseudo elements - jsdom does not currently support pseudo elements, so any component utilizing pseudo elements for core functionality can't really be fully tested through RTL. - We'll...

@abbeyhrt could you write up a comment on how to use the script you made to help scaffold these out?

We're about 72% through this effort. Something additional to consider here would be if we could segment our enzyme tests to run against React 17, while the RTL ones run...