Skip to content

Randomly generated Id is rendering snapshot testing useless (mui-id) #21306

Closed
@cojj90

Description

@cojj90
  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

A randomly generated label-Id gets passed down to inner Typography component which means that every time a snapshot is generated, it's going to have a different Id. Example of where this happens:

ae3c251#diff-f92b445636d789b46906505273654e5eR106

Expected Behavior 🤔

At least allow us to override this value so that we can resume snapshot testing

Steps to Reproduce 🕹

Steps:

  1. Set up a snapshot testing that uses TablePagination component
  2. Generate a snapshot
  3. Watch as it generates a random id for the caption

Context 🔦

Trying to get snapshot testing working. Everything was fine in the previous version (4.10.0)

Your Environment 🌎

Tech Version
Material-UI v4.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: tableThis is the name of the generic UI component, not the React module!duplicateThis issue or pull request already exists

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions