gregnb / gregnb/mui-datatables
Jest snapshot testing fails with material-ui/core 4.10.1 or 4.10.2
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
Jest snapshots stay the same when no code changes.
## Current Behavior
Snapshots now get a mui-id: field that changes
## Steps to Reproduce (for bugs)
We use jest and mui-datatables 3.1.1.
My jest snapshot tests are failing the mui-datatables with 4.10.1 or 4.10.2 but NOT 4.10.0
I am hoping I can describe high level what is happening and either here or the material-ui/core folks will 'just know' what I am talking about... I am sure it will be 'fixed' downstream one way or another so this might serve as a QA post;
My test passes.
Upgrade from 4.10.0 to 4.10.2. (No '^' in package-lock.json so change version and run yarn install)
Now snapshot fail includes an 'id' field it did not have before.
Rows per page:
And that 'id' changes every test after:
class="MuiSelect-root MuiSelect-select MuiTablePagination-select MuiInputBase-input"
- id="mui-40652"
+ id="mui-10525"
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.