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

MarkUsProject / Markus / 16200263614

10 Jul 2025 04:08PM UTC coverage: 91.993%. Remained the same
16200263614

Pull #7592

github

web-flow
Merge 29cccf265 into d1fa0e71a
Pull Request #7592: Refactor DropDownMenu class to a new React component

643 of 1381 branches covered (46.56%)

Branch coverage included in aggregate %.

10 of 11 new or added lines in 1 file covered. (90.91%)

41983 of 44955 relevant lines covered (93.39%)

118.4 hits per line

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

93.33
/app/javascript/Components/Result/dropdown_menu.jsx
1
import React from "react";
2

3
import safe_marked from "../../common/safe_marked";
4

5
export class DropDownMenu extends React.Component {
6
  constructor(props) {
7
    super(props);
7✔
8
    this.state = {expanded: false};
7✔
9
  }
10

11
  handleMouseEnter = () => {
7✔
12
    this.setState({expanded: true});
5✔
13
  };
14

15
  handleMouseLeave = () => {
7✔
16
    this.setState({expanded: false});
1✔
17
  };
18

19
  render() {
20
    return (
13✔
21
      <li
22
        className="dropdown_menu"
23
        onMouseEnter={this.handleMouseEnter}
24
        onMouseLeave={this.handleMouseLeave}
NEW
25
        onMouseDown={e => e.preventDefault()}
×
26
      >
27
        <div className="dropdown-header">{this.props.header}</div>
28

29
        {this.state.expanded && (
18✔
30
          <ul>
31
            {this.props.items.map(item => (
32
              <li
15✔
33
                key={item.id}
34
                onClick={e => {
35
                  e.preventDefault();
1✔
36
                  this.props.onItemClick(item.id);
1✔
37
                }}
38
              >
39
                <span
40
                  className={"text-content"}
41
                  dangerouslySetInnerHTML={{__html: safe_marked(item.content).slice(0, 70)}}
42
                />
43
                <span className={"red-text"}>{!item.deduction ? "" : "-" + item.deduction}</span>
15✔
44
              </li>
45
            ))}
46
          </ul>
47
        )}
48
      </li>
49
    );
50
  }
51
}
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