• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CBIIT / bento-icdc-frontend / 26521483403

27 May 2026 03:36PM UTC coverage: 17.458% (-8.3%) from 25.73%
26521483403

Pull #1607

github

web-flow
Merge 2f30510ff into bc935f39c
Pull Request #1607: Feature/ai test studio - ICDC-4165 & ICDC-4171

306 of 2587 branches covered (11.83%)

Branch coverage included in aggregate %.

1 of 4244 new or added lines in 74 files covered. (0.02%)

2 existing lines in 2 files now uncovered.

2197 of 11750 relevant lines covered (18.7%)

0.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/components/ReadMeDialog/ReadMe.theme.config.generated.test.jsx
1
// src/components/ReadMeDialog/ReadMe.theme.config.test.jsx
2

3
import React from 'react';
4
import { render, screen } from '@testing-library/react';
5
import {
6
  useTheme,
7
  createTheme as mockedCreateTheme,
8
} from '@mui/material/styles';
9
import ReadMeThemeConfig from './ReadMe.theme.config.jsx';
10

NEW
11
jest.mock('@mui/material/styles', () => {
×
NEW
12
  const actual = jest.requireActual('@mui/material/styles');
×
13

NEW
14
  return {
×
15
    ...actual,
16
    createTheme: jest.fn(actual.createTheme),
17
  };
18
});
19

NEW
20
describe('ReadMeThemeConfig', () => {
×
NEW
21
  const TestConsumer = () => {
×
NEW
22
    const theme = useTheme();
×
23

24
    const dialogPaperMaxWidth =
NEW
25
      theme?.components?.MuiDialog?.styleOverrides?.paper?.maxWidth;
×
26
    const dialogScrollPaperMaxHeight =
NEW
27
      theme?.components?.MuiDialog?.styleOverrides?.paperScrollPaper?.maxHeight;
×
28
    const dialogPaperWidthMdMinWidth =
NEW
29
      theme?.components?.MuiDialog?.styleOverrides?.paperWidthMd?.minWidth;
×
30
    const backdropBg =
NEW
31
      theme?.components?.MuiBackdrop?.styleOverrides?.root?.backgroundColor;
×
32
    const svgIconColor =
NEW
33
      theme?.components?.MuiSvgIcon?.styleOverrides?.root?.color;
×
34

NEW
35
    return (
×
36
      <div>
37
        <span data-testid="paper-max-width">{dialogPaperMaxWidth}</span>
38
        <span data-testid="scrollpaper-max-height">
39
          {dialogScrollPaperMaxHeight}
40
        </span>
41
        <span data-testid="paperwidthmd-minwidth">
42
          {dialogPaperWidthMdMinWidth}
43
        </span>
44
        <span data-testid="backdrop-bg">{backdropBg}</span>
45
        <span data-testid="svgicon-color">{svgIconColor}</span>
46
      </div>
47
    );
48
  };
49

NEW
50
  beforeEach(() => {
×
NEW
51
    mockedCreateTheme.mockClear();
×
52
  });
53

NEW
54
  it('should render provided children inside ThemeProvider', () => {
×
NEW
55
    render(
×
56
      <ReadMeThemeConfig>
57
        <div data-testid="child">Hello Theme</div>
58
      </ReadMeThemeConfig>
59
    );
60

NEW
61
    expect(screen.getByTestId('child').textContent).toBe('Hello Theme');
×
62
  });
63

NEW
64
  it('should provide expected MUI component overrides in theme', () => {
×
NEW
65
    render(
×
66
      <ReadMeThemeConfig>
67
        <TestConsumer />
68
      </ReadMeThemeConfig>
69
    );
70

NEW
71
    expect(screen.getByTestId('paper-max-width').textContent).toBe('960px');
×
NEW
72
    expect(screen.getByTestId('scrollpaper-max-height').textContent).toBe(
×
73
      '650px'
74
    );
NEW
75
    expect(screen.getByTestId('paperwidthmd-minwidth').textContent).toBe(
×
76
      '750px'
77
    );
NEW
78
    expect(screen.getByTestId('backdrop-bg').textContent).toBe('#4a4a4a52');
×
NEW
79
    expect(screen.getByTestId('svgicon-color').textContent).toBe('#0d71a3');
×
80
  });
81

NEW
82
  it('should render nothing when children is null', () => {
×
NEW
83
    const { container } = render(<ReadMeThemeConfig>{null}</ReadMeThemeConfig>);
×
NEW
84
    expect(container.firstChild).toBeNull();
×
85
  });
86

NEW
87
  it('should not throw and render nothing when children is undefined', () => {
×
NEW
88
    const { container } = render(<ReadMeThemeConfig />);
×
NEW
89
    expect(container.firstChild).toBeNull();
×
90
  });
91

NEW
92
  it('should call createTheme with the expected overrides', () => {
×
NEW
93
    render(
×
94
      <ReadMeThemeConfig>
95
        <div />
96
      </ReadMeThemeConfig>
97
    );
98

NEW
99
    expect(mockedCreateTheme).toHaveBeenCalledTimes(1);
×
100

NEW
101
    expect(mockedCreateTheme).toHaveBeenCalledWith(
×
102
      expect.objectContaining({
103
        components: expect.objectContaining({
104
          MuiDialog: expect.objectContaining({
105
            styleOverrides: expect.objectContaining({
106
              paper: expect.objectContaining({
107
                maxWidth: '960px',
108
                maxHeight: '650px',
109
                borderRadius: '5px',
110
                padding: '0px 0px 0px 20px',
111
                boxShadow: 'none',
112
                overflowX: 'hidden',
113
                overflowY: 'hidden',
114
              }),
115
              paperScrollPaper: expect.objectContaining({
116
                maxHeight: '650px',
117
              }),
118
              paperWidthMd: expect.objectContaining({
119
                minWidth: '750px',
120
              }),
121
            }),
122
          }),
123
          MuiBackdrop: expect.objectContaining({
124
            styleOverrides: expect.objectContaining({
125
              root: expect.objectContaining({
126
                backgroundColor: '#4a4a4a52',
127
              }),
128
            }),
129
          }),
130
          MuiSvgIcon: expect.objectContaining({
131
            styleOverrides: expect.objectContaining({
132
              root: expect.objectContaining({
133
                color: '#0d71a3',
134
              }),
135
            }),
136
          }),
137
        }),
138
      })
139
    );
140
  });
141
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc