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

CBIIT / INS-WebPortal / 20350434716

18 Dec 2025 08:28PM UTC coverage: 2.453%. First build
20350434716

push

github

web-flow
Merge pull request #482 from CBIIT/3.2.0

3.2.0 Release

43 of 1822 branches covered (2.36%)

Branch coverage included in aggregate %.

7 of 490 new or added lines in 27 files covered. (1.43%)

83 of 3314 relevant lines covered (2.5%)

1.02 hits per line

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

0.0
/src/components/Header/components/SearchBarTablet.tsx
NEW
1
import React, { useState } from 'react';
×
NEW
2
import styled from 'styled-components';
×
NEW
3
import { useHistory } from 'react-router-dom';
×
NEW
4
import clearIcon from '../../../assets/header/Clear_Icon.svg';
×
NEW
5
import searchIcon from '../../../assets/header/Search_Small_Icon.svg';
×
6

NEW
7
const SearchBarContainer = styled.div`
×
8
    display: flex;
9

10
    .searchBar {
11
      margin-left: auto;
12
      width: 303px;
13
      height: 43px;
14
      border: 1px solid #71767A;
15
    }
16

17
    .searchButton {
18
      height: 43px;
19
      font-family: Open Sans;
20
      font-weight: 700;
21
      font-size: 1rem;
22
      line-height: 33px;
23
      text-align: center;
24
      color: #FFFFFF;
25
      background: #007BBD;
26
      padding: 10px 14px;
27
      border-radius: 0px 5px 5px 0px;
28
    }
29

30
    .searchButton:hover {
31
      cursor: pointer;
32
      background: #004971;
33
    }
34
`;
35

NEW
36
const SearchInput = styled.input`
×
37
  margin: -1px 0 0 -1px;
38
  padding: 0 7px;
39
  border: none;
40
  font-family: Open Sans;
41
  font-weight: 400;
42
  font-size: 1.27rem;
43
  line-height: 47px;
44
  color: #1b1b1b;
45
  width: 303px;
46
  height: 43px;
47
  background: transparent;
48

49
  ::placeholder {
50
    color: #004A8B;
51
  }
52

53
  :focus {
54
    outline: 0.25rem solid #2491ff;
55
  }
56

57
  input[type="search"]::-webkit-search-cancel-button {
58
    position: relative;
59
    -webkit-appearance: none;
60
    height: 20px;
61
    width: 20px;
62
    background: url(${clearIcon}) right center no-repeat;
63
    background-image: url(${clearIcon}) red;
64
    background-size: 20px;
65
    cursor: pointer;
66
  }
67

68
  input[type="search"]:focus::-webkit-search-cancel-button {
69
    position: relative;
70
    -webkit-appearance: none;
71
    height: 20px;
72
    width: 20px;
73
    background: url(${clearIcon}) right center no-repeat;
74
    background-image: url(${clearIcon}) red;
75
    background-size: 20px;
76
    cursor: pointer;
77
  }
78
`;
79

NEW
80
const SearchBar = () => {
×
NEW
81
  const history = useHistory();
×
NEW
82
  const [localText, setLocalText] = useState('');
×
83

NEW
84
  const handleTextInputChange = (event) => {
×
NEW
85
    const text = event.target.value;
×
NEW
86
    setLocalText(text);
×
87
  };
88

NEW
89
  const handleKeyPress = (event) => {
×
NEW
90
    if (event.key === 'Enter') {
×
NEW
91
      history.push(`/globalsearch/${localText.trim()}`);
×
NEW
92
      setLocalText('');
×
93
    }
94
  };
95

NEW
96
  const handleSearch = () => {
×
NEW
97
    history.push(`/globalsearch/${localText.trim()}`);
×
NEW
98
    setLocalText('');
×
99
  };
100

NEW
101
  return (
×
102
    <SearchBarContainer>
103
      <div className="searchBar">
104
        <label>
105
          <SearchInput id="header-search-bar" type="search" value={localText} placeholder="" onChange={handleTextInputChange} onKeyDown={handleKeyPress} />
106
        </label>
107
      </div>
108
      <div role="button" tabIndex={0} className="searchButton" onKeyDown={handleKeyPress} onClick={handleSearch}><img src={searchIcon} alt="searchIcon" /></div>
109
    </SearchBarContainer>
110
  );
NEW
111
};
×
112

113
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