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

MarkUsProject / Markus / 20143075828

11 Dec 2025 06:18PM UTC coverage: 91.513%. Remained the same
20143075828

Pull #7763

github

web-flow
Merge 9f55e660a into 3421ef3b2
Pull Request #7763: Release 2.9.0

914 of 1805 branches covered (50.64%)

Branch coverage included in aggregate %.

1584 of 1666 new or added lines in 108 files covered. (95.08%)

573 existing lines in 35 files now uncovered.

43650 of 46892 relevant lines covered (93.09%)

121.63 hits per line

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

86.67
/app/javascript/Components/Modals/create_group_modal.jsx
1
import React from "react";
2
import Modal from "react-modal";
3

4
export default class CreateGroupModal extends React.Component {
5
  constructor(props) {
6
    super(props);
11✔
7
    this.state = {
11✔
8
      groupName: "",
9
    };
10
  }
11

12
  componentDidMount() {
13
    Modal.setAppElement("body");
11✔
14
  }
15

16
  handleChange = event => {
11✔
17
    this.setState({groupName: event.target.value});
1✔
18
  };
19

20
  handleSubmit = event => {
11✔
21
    event.preventDefault();
1✔
22
    if (!this.state.groupName) {
1!
NEW
23
      return;
×
24
    }
25
    this.props.onSubmit(this.state.groupName);
1✔
26
    this.setState({groupName: ""});
1✔
27
  };
28

29
  render() {
30
    return (
21✔
31
      <Modal
32
        className="react-modal markus-dialog"
33
        isOpen={this.props.isOpen}
34
        onRequestClose={this.props.onRequestClose}
35
        id="create_group_modal"
36
      >
37
        <h2>{I18n.t("helpers.submit.create", {model: I18n.t("activerecord.models.group.one")})}</h2>
38
        <form onSubmit={this.handleSubmit}>
39
          <label htmlFor="groupName">{I18n.t("activerecord.models.group.one")}</label>
40
          <input
41
            id="groupName"
42
            type="text"
43
            value={this.state.groupName}
44
            onChange={event => this.handleChange(event)}
1✔
45
            autoFocus
46
          />
47
          <div className={"dialog-actions"}>
48
            <button className="button" type="submit" disabled={!this.state.groupName}>
49
              {I18n.t("helpers.submit.create", {model: I18n.t("activerecord.models.group.one")})}
50
            </button>
51
            <button className="button" type="reset" onClick={this.props.onRequestClose}>
52
              {I18n.t("cancel")}
53
            </button>
54
          </div>
55
        </form>
56
      </Modal>
57
    );
58
  }
59
}
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

© 2025 Coveralls, Inc