patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
794 stars 356 forks source link

PF4: ReactStyles issue with css #1795

Closed dlabrecq closed 5 years ago

dlabrecq commented 5 years ago

Many of the JEST tests are failing in Cost Management with the latest PatternFly packages. We've updated our snapshots, but still have 25 failing tests. For example:

Screen Shot 2019-04-17 at 11 10 12 AM

Seems to happen for any test that imports:

import { css } from '@patternfly/react-styles';

Screen Shot 2019-04-17 at 11 46 30 AM

Could be an issue for the Cost Management UI to solve, but we haven't made any changes to our tests. Still investigating with the UI to see if there's something we need to do on our end, but want to start tracking the issue.

dlabrecq commented 5 years ago

A draft PR with the latest packages can be found here: https://github.com/project-koku/koku-ui/pull/758

dlabrecq commented 5 years ago

Added the following to jest.config.ts and all appears to be well now.

moduleNameMapper: {
  '\\.(css|less)$': '<rootDir>/test/styleMock.js',
},
dgutride commented 5 years ago

Need to add this to our release notes, just in case...