render()

in ui/src/client/components/ModalRoot/common/TestResult/TestResult.js [28:59]


  render() {
    const { testErrors, tested } = this.props;
    if (testErrors.length === 0 && !tested) {
      return null;
    }

    if (testErrors.length === 0 && tested) {
      return (<span style={{ padding: '4px 0', color: 'green' }}>ok</span>);
    }

    return (
      <div>
        {
          testErrors.map(error => (
            <div className="test-error">
              {error.path
                ? (
                  <div className="item">
                    <span>path: </span>
                    <span className="text">{error.path}</span>
                  </div>
                ) : null
              }
              <div className="item">
                <span className="text">{error.message}</span>
              </div>
            </div>
          ))
        }
      </div>
    );
  }