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

CBIIT / bento-icdc-frontend / 26531437966

27 May 2026 06:43PM UTC coverage: 17.253% (-8.5%) from 25.73%
26531437966

Pull #1607

github

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

306 of 2599 branches covered (11.77%)

Branch coverage included in aggregate %.

1 of 4403 new or added lines in 76 files covered. (0.02%)

2 existing lines in 2 files now uncovered.

2197 of 11909 relevant lines covered (18.45%)

0.41 hits per line

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

0.0
/src/components/ReadMeDialog/ReadMe.styled.generated.test.js
1
// src/components/ReadMeDialog/ReadMe.styled.test.js
2
import React from 'react';
3
import { render, screen } from '@testing-library/react';
4
import {
5
  TitleContent,
6
  Title,
7
  DialogActionContent,
8
  DownloadButton,
9
  DownloadIcon,
10
  ClosButton,
11
  CloseBtnIcon,
12
  ReadMeContentContainer,
13
  DialogBox,
14
} from './ReadMe.styled';
15

NEW
16
describe('ReadMe.styled components', () => {
×
NEW
17
  const rgb = (r, g, b) => `rgb(${r}, ${g}, ${b})`;
×
18

NEW
19
  describe('TitleContent', () => {
×
NEW
20
    it('renders without crashing', () => {
×
NEW
21
      render(<TitleContent data-testid="title-content" />);
×
NEW
22
      expect(screen.getByTestId('title-content')).toBeTruthy();
×
23
    });
24
  });
25

NEW
26
  describe('Title', () => {
×
NEW
27
    it('applies base typography and color styles', () => {
×
NEW
28
      render(<Title data-testid="title">ReadMe</Title>);
×
NEW
29
      const el = screen.getByTestId('title');
×
NEW
30
      const cs = getComputedStyle(el);
×
31

NEW
32
      expect(cs.fontSize).toBe('23px');
×
NEW
33
      expect(cs.marginTop).toBe('20px');
×
NEW
34
      expect(cs.display).toBe('inherit');
×
NEW
35
      expect(cs.fontWeight).toBe('500');
×
NEW
36
      expect(cs.color).toBe(rgb(13, 113, 163));
×
NEW
37
      expect(cs.cssFloat || cs.float).toBe('left');
×
NEW
38
      expect(cs.fontFamily.toLowerCase()).toContain('nunito');
×
39
    });
40
  });
41

NEW
42
  describe('DialogActionContent', () => {
×
NEW
43
    it('applies alignment and font size', () => {
×
NEW
44
      render(
×
45
        <DialogActionContent data-testid="dialog-action">X</DialogActionContent>
46
      );
NEW
47
      const el = screen.getByTestId('dialog-action');
×
NEW
48
      const cs = getComputedStyle(el);
×
49

NEW
50
      expect(cs.paddingTop).toBe('5px');
×
NEW
51
      expect(cs.paddingRight).toBe('5px');
×
NEW
52
      expect(cs.paddingBottom).toBe('5px');
×
NEW
53
      expect(cs.paddingLeft).toBe('5px');
×
NEW
54
      expect(cs.textAlign).toBe('right');
×
NEW
55
      expect(cs.fontSize).toBe('30px');
×
56
    });
57
  });
58

NEW
59
  describe('DownloadButton', () => {
×
NEW
60
    it('applies sizing and spacing styles', () => {
×
NEW
61
      render(<DownloadButton data-testid="download-btn">DL</DownloadButton>);
×
NEW
62
      const el = screen.getByTestId('download-btn');
×
NEW
63
      const cs = getComputedStyle(el);
×
64

NEW
65
      expect(cs.minWidth).toBe('30px');
×
NEW
66
      expect(cs.paddingTop).toBe('0px');
×
NEW
67
      expect(cs.paddingRight).toBe('0px');
×
NEW
68
      expect(cs.paddingBottom).toBe('0px');
×
NEW
69
      expect(cs.paddingLeft).toBe('0px');
×
NEW
70
      expect(cs.marginTop).toBe('10px');
×
NEW
71
      expect(cs.marginRight).toBe('7px');
×
NEW
72
      expect(cs.marginBottom).toBe('0px');
×
NEW
73
      expect(cs.marginLeft).toBe('0px');
×
74
    });
75
  });
76

NEW
77
  describe('DownloadIcon', () => {
×
NEW
78
    it('applies size and color styles', () => {
×
NEW
79
      render(<DownloadIcon data-testid="download-icon" alt="dl" />);
×
NEW
80
      const el = screen.getByTestId('download-icon');
×
NEW
81
      const cs = getComputedStyle(el);
×
82

NEW
83
      expect(cs.width).toBe('30px');
×
NEW
84
      expect(cs.height).toBe('30px');
×
NEW
85
      expect(cs.color).toBe(rgb(255, 255, 255));
×
86
    });
87
  });
88

NEW
89
  describe('ClosButton', () => {
×
NEW
90
    it('applies padding styles', () => {
×
NEW
91
      render(<ClosButton data-testid="close-btn" aria-label="close" />);
×
NEW
92
      const el = screen.getByTestId('close-btn');
×
NEW
93
      const cs = getComputedStyle(el);
×
94

NEW
95
      expect(cs.paddingTop).toBe('8px');
×
NEW
96
      expect(cs.paddingLeft).toBe('0px');
×
97
    });
98
  });
99

NEW
100
  describe('CloseBtnIcon', () => {
×
NEW
101
    it('applies icon styles', () => {
×
NEW
102
      render(<CloseBtnIcon data-testid="close-icon" />);
×
NEW
103
      const el = screen.getByTestId('close-icon');
×
NEW
104
      const cs = getComputedStyle(el);
×
105

NEW
106
      expect(cs.paddingTop).toBe('5px');
×
NEW
107
      expect(cs.paddingRight).toBe('5px');
×
NEW
108
      expect(cs.paddingBottom).toBe('5px');
×
NEW
109
      expect(cs.paddingLeft).toBe('5px');
×
NEW
110
      expect(cs.textAlign).toBe('right');
×
NEW
111
      expect(cs.fontSize).toBe('30px');
×
112
    });
113
  });
114

NEW
115
  describe('ReadMeContentContainer', () => {
×
NEW
116
    it('applies container sizing and overflow styles', () => {
×
NEW
117
      render(<ReadMeContentContainer data-testid="readme-container" />);
×
NEW
118
      const el = screen.getByTestId('readme-container');
×
NEW
119
      const cs = getComputedStyle(el);
×
120

NEW
121
      expect(cs.height).toBe('700px');
×
NEW
122
      expect(cs.overflowY).toBe('scroll');
×
NEW
123
      expect(cs.paddingRight).toBe('20px');
×
NEW
124
      expect(cs.paddingLeft).toBe('25px');
×
NEW
125
      expect(cs.lineHeight).toBe('1.5');
×
126
    });
127

NEW
128
    it('applies nested heading styles (h1-h5)', () => {
×
NEW
129
      render(
×
130
        <ReadMeContentContainer>
131
          <h1 data-testid="h1">Title</h1>
132
          <h3 data-testid="h3">Sub</h3>
133
        </ReadMeContentContainer>
134
      );
135

NEW
136
      const h1 = screen.getByTestId('h1');
×
NEW
137
      const h3 = screen.getByTestId('h3');
×
138

NEW
139
      const h1cs = getComputedStyle(h1);
×
NEW
140
      const h3cs = getComputedStyle(h3);
×
141

NEW
142
      expect(h1cs.color).toBe(rgb(0, 0, 0));
×
NEW
143
      expect(h1cs.fontWeight).toBe('700');
×
NEW
144
      expect(h1cs.lineHeight).toBe('40px');
×
145

NEW
146
      expect(h3cs.color).toBe(rgb(0, 0, 0));
×
NEW
147
      expect(h3cs.fontWeight).toBe('700');
×
NEW
148
      expect(h3cs.lineHeight).toBe('40px');
×
149
    });
150

NEW
151
    it('applies nested paragraph and list item styles', () => {
×
NEW
152
      render(
×
153
        <ReadMeContentContainer>
154
          <p data-testid="p">Paragraph</p>
155
          <ul>
156
            <li data-testid="li">Item</li>
157
          </ul>
158
        </ReadMeContentContainer>
159
      );
160

NEW
161
      const p = screen.getByTestId('p');
×
NEW
162
      const li = screen.getByTestId('li');
×
163

NEW
164
      const pcs = getComputedStyle(p);
×
NEW
165
      const lics = getComputedStyle(li);
×
166

NEW
167
      expect(pcs.marginTop).toBe('5px');
×
NEW
168
      expect(pcs.fontSize).toBe('18px');
×
NEW
169
      expect(pcs.letterSpacing).toBe('0.2px');
×
NEW
170
      expect(pcs.lineHeight).toBe('30px');
×
NEW
171
      expect(pcs.fontWeight).toBe('400');
×
NEW
172
      expect(pcs.fontFamily.toLowerCase()).toContain('open sans');
×
173

NEW
174
      expect(lics.marginTop).toBe('5px');
×
NEW
175
      expect(lics.fontSize).toBe('18px');
×
NEW
176
      expect(lics.letterSpacing).toBe('0.2px');
×
NEW
177
      expect(lics.lineHeight).toBe('30px');
×
NEW
178
      expect(lics.fontWeight).toBe('400');
×
NEW
179
      expect(lics.fontFamily.toLowerCase()).toContain('open sans');
×
180
    });
181

NEW
182
    it('applies nested anchor styles', () => {
×
NEW
183
      render(
×
184
        <ReadMeContentContainer>
185
          <a href="#" data-testid="a">
186
            Link
187
          </a>
188
        </ReadMeContentContainer>
189
      );
190

NEW
191
      const a = screen.getByTestId('a');
×
NEW
192
      const acs = getComputedStyle(a);
×
193

NEW
194
      expect(acs.color).toBe(rgb(184, 83, 0));
×
NEW
195
      expect(acs.fontFamily.toLowerCase()).toContain('open sans');
×
NEW
196
      expect(acs.fontWeight).toBe('600');
×
NEW
197
      expect(acs.textDecorationLine || acs.textDecoration).toContain(
×
198
        'underline'
199
      );
NEW
200
      expect(acs.cursor).toBe('pointer');
×
201
    });
202
  });
203

NEW
204
  describe('DialogBox', () => {
×
NEW
205
    it('applies container styles and nested paper padding', () => {
×
NEW
206
      render(
×
207
        <DialogBox open onClose={() => {}} aria-labelledby="dialog-title">
208
          <div>Content</div>
209
        </DialogBox>
210
      );
211

NEW
212
      const paper = document.querySelector('.MuiDialog-paper');
×
NEW
213
      expect(paper).toBeTruthy();
×
214

NEW
215
      const paperCS = getComputedStyle(paper);
×
NEW
216
      expect(paperCS.paddingTop).toBe('0px');
×
NEW
217
      expect(paperCS.paddingRight).toBe('0px');
×
NEW
218
      expect(paperCS.paddingBottom).toBe('0px');
×
NEW
219
      expect(paperCS.paddingLeft).toBe('20px');
×
220

NEW
221
      const dialogRoot = paper?.parentElement?.parentElement;
×
NEW
222
      if (dialogRoot) {
×
NEW
223
        const rootCS = getComputedStyle(dialogRoot);
×
NEW
224
        expect(rootCS.overflowY).toBe('scroll');
×
NEW
225
        expect(rootCS.paddingBottom).toBe('10px');
×
226
      }
227
    });
228

NEW
229
    it('renders safely when closed (edge case)', () => {
×
NEW
230
      render(
×
231
        <DialogBox open={false} onClose={() => {}}>
232
          <div>Hidden</div>
233
        </DialogBox>
234
      );
235

NEW
236
      const paper = document.querySelector('.MuiDialog-paper');
×
NEW
237
      expect(paper).toBeNull();
×
238
    });
239
  });
240
});
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