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

CBIIT / bento-icdc-frontend / 26530955228

27 May 2026 06:34PM UTC coverage: 17.321% (-8.4%) from 25.73%
26530955228

Pull #1607

github

web-flow
Merge 361b68ce9 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 4346 new or added lines in 75 files covered. (0.02%)

2 existing lines in 2 files now uncovered.

2197 of 11852 relevant lines covered (18.54%)

0.41 hits per line

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

0.0
/src/components/header/SearchInput.js
1
import React, { useCallback, useState } from 'react';
2
import { Button, TextField, Box, CircularProgress } from '@mui/material';
3
import styled from '@emotion/styled';
4

5
const Root = styled(Box)`
×
6
  display: flex;
7
  align-items: stretch;
8
  width: 100%;
9
  max-width: 720px;
10
`;
11

12
const Input = styled(TextField)(({ theme }) => ({
×
13
  flex: '0 0 254px',
14
  height: '46px',
15
  width: 254,
16
  '& .MuiOutlinedInput-root': {
17
    height: 48,
18
    borderTopRightRadius: 0,
19
    borderBottomRightRadius: 0,
20
  },
21
  '& .MuiOutlinedInput-notchedOutline': {
22
    borderColor: '#6b778c',
23
  },
24
  '&:hover .MuiOutlinedInput-notchedOutline': {
25
    borderColor: '#5a657a',
26
  },
27
  '&.Mui-focused .MuiOutlinedInput-notchedOutline': {
28
    borderColor: theme?.palette?.primary?.main ?? '#1976d2',
×
29
    borderWidth: 1,
30
  },
31
}));
32

33
const SearchButton = styled(Button)`
×
34
  height: 46px;
35
  border-top-left-radius: 0;
36
  border-bottom-left-radius: 0;
37
  border-top-right-radius: 10px;
38
  border-bottom-right-radius: 10px;
39
  padding-left: 20px;
40
  padding-right: 20px;
41
  min-width: 112px;
42
`;
43

44
function SearchBar({
45
  loading = false,
×
46
  placeholder = '',
×
47
  onClick,
48
  onEnter,
49
  defaultValue = '',
×
50
  disabled = false,
×
51
  buttonText = 'Search',
×
52
  className,
53
  ariaLabel = 'Search',
×
54
}) {
UNCOV
55
  const [value, setValue] = useState(defaultValue);
×
56

NEW
57
  const isDisabled = disabled || loading;
×
58

59
  const go = useCallback(() => {
×
NEW
60
    if (!isDisabled && onClick) onClick(value);
×
61
  }, [isDisabled, onClick, value]);
62

NEW
63
  const handleKeyDown = e => {
×
NEW
64
    if (e.key === 'Enter' && !isDisabled && onEnter) {
×
NEW
65
      e.preventDefault();
×
NEW
66
      onEnter(value);
×
67
    }
68
  };
69

70
  return (
×
71
    <Root className={className}>
72
      <Input
73
        placeholder={placeholder}
74
        value={value}
75
        onChange={e => setValue(e.target.value)}
×
76
        onKeyDown={handleKeyDown}
77
        inputProps={{ 'aria-label': ariaLabel }}
78
        disabled={isDisabled}
79
        size="small"
80
        variant="outlined"
81
      />
82
      <SearchButton
83
        variant="contained"
84
        sx={{
85
          backgroundColor: '#3A75BD',
86
          fontFamily: 'Open Sans',
87
          fontWeight: 600,
88
          fontSize: '16px',
89
          color: '#fff',
90
          textTransform: 'none',
91
        }}
92
        onClick={go}
93
        disabled={isDisabled}
94
      >
95
        {loading ? <CircularProgress color="inherit" size={20} /> : buttonText}
×
96
      </SearchButton>
97
    </Root>
98
  );
99
}
100

101
export default SearchBar;
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