mui / mui/material-ui

[tabs] Snapshot test not matching

Open
#32,038 7 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

on hold package: lab scope: tabs test
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Current behavior 😯

The generated id, aria-controls and aria-labelledby is always new and snapshot can not match.

Screenshot 2022-03-29 at 16 08 02
Expected behavior 🤔

It should generate stable ids to be able to test the snapshot

Your environment 🌎

@mui/lab: 5.0.0-alpha.74,
@mui/material: 5.5.0,
@testing-library/jest-dom: 5.11.9,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test path is named. Reproduce the Tabs snapshot mismatch with the listed @mui/lab, @mui/material, and testing-library versions, then trace the generated id, aria-controls, and aria-labelledby values. Done means the relevant snapshot can be rerun with stable ids.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.