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

CaptainFact / captain-fact-frontend / 20411409289

21 Dec 2025 02:42PM UTC coverage: 1.46% (-1.8%) from 3.249%
20411409289

push

github

Betree
iterate

26 of 1952 branches covered (1.33%)

Branch coverage included in aggregate %.

1 of 8 new or added lines in 4 files covered. (12.5%)

528 existing lines in 32 files now uncovered.

39 of 2500 relevant lines covered (1.56%)

0.07 hits per line

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

0.0
/app/components/Users/UserFormFields.jsx
1
import { AtSign, IdCard, Lock, Mail } from 'lucide-react'
2
import React from 'react'
3

4
import { cleanStr } from '../../lib/clean_str'
5
import { Input } from '../ui/input'
6
import { Label } from '../ui/label'
7

UNCOV
8
export const FormikUserEmailField = ({
×
9
  t,
10
  values,
11
  errors,
12
  touched,
13
  handleChange,
14
  handleBlur,
15
  label = t('email'),
×
16
  placeholder = 'example@example.com',
×
17
  _required = true,
×
18
  ...props
19
}) => {
UNCOV
20
  return (
×
21
    <div className="space-y-2">
22
      <Label htmlFor="email">{label}</Label>
23
      <div className="relative">
24
        <Input
25
          id="email"
26
          name="email"
27
          type="email"
28
          placeholder={placeholder}
29
          value={values.email}
30
          onChange={handleChange}
31
          onBlur={handleBlur}
32
          className={`pl-10 ${touched.email && errors.email ? 'border-red-600' : ''}`}
×
33
          {...props}
34
        />
35
        <Mail
36
          size={16}
37
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
38
        />
39
      </div>
40
      {touched.email && errors.email && (
×
41
        <span className="text-xs text-red-600 pl-1">{errors.email}</span>
42
      )}
43
    </div>
44
  )
45
}
46

UNCOV
47
export const FormikUserEmailOrUsernameField = ({
×
48
  t,
49
  values,
50
  errors,
51
  touched,
52
  handleChange,
53
  handleBlur,
54
  label = t('emailOrUsername'),
×
55
  ...props
56
}) => {
57
  return (
×
58
    <div className="space-y-2">
59
      <Label htmlFor="email">{label}</Label>
60
      <div className="relative">
61
        <Input
62
          id="email"
63
          name="email"
64
          type="text"
65
          placeholder="example@example.com"
66
          value={values.email}
67
          onChange={handleChange}
68
          onBlur={handleBlur}
69
          className={`pl-10 ${touched.email && errors.email ? 'border-red-600' : ''}`}
×
70
          {...props}
71
        />
72
        <IdCard
73
          size={16}
74
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
75
        />
76
      </div>
77
      {touched.email && errors.email && (
×
78
        <span className="text-xs text-red-600 pl-1">{errors.email}</span>
79
      )}
80
    </div>
81
  )
82
}
83

UNCOV
84
export const FormikUserPasswordField = ({
×
85
  t,
86
  values,
87
  errors,
88
  touched,
89
  handleChange,
90
  handleBlur,
91
  label,
92
  required = true,
×
93
  ...props
94
}) => {
UNCOV
95
  return (
×
96
    <div className="space-y-2">
97
      <Label htmlFor="password">{label || t(required ? 'password' : 'passwordOptional')}</Label>
×
98
      <div className="relative">
99
        <Input
100
          id="password"
101
          name="password"
102
          type="password"
103
          value={values.password}
104
          onChange={handleChange}
105
          onBlur={handleBlur}
106
          className={`pl-10 ${touched.password && errors.password ? 'border-red-600' : ''}`}
×
107
          {...props}
108
        />
109
        <Lock
110
          size={16}
111
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
112
        />
113
      </div>
114
      {touched.password && errors.password && (
×
115
        <span className="text-xs text-red-600 pl-1">{errors.password}</span>
116
      )}
117
    </div>
118
  )
119
}
120

UNCOV
121
export const FormikUserPasswordRepeatField = ({
×
122
  t,
123
  values,
124
  errors,
125
  touched,
126
  handleChange,
127
  handleBlur,
128
  label = t('repeatPassword'),
×
129
  ...props
130
}) => {
UNCOV
131
  return (
×
132
    <div className="space-y-2">
133
      <Label htmlFor="passwordRepeat">{label}</Label>
134
      <div className="relative">
135
        <Input
136
          id="passwordRepeat"
137
          name="passwordRepeat"
138
          type="password"
139
          value={values.passwordRepeat}
140
          onChange={handleChange}
141
          onBlur={handleBlur}
142
          className={`pl-10 ${touched.passwordRepeat && errors.passwordRepeat ? 'border-red-600' : ''}`}
×
143
          {...props}
144
        />
145
        <Lock
146
          size={16}
147
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
148
        />
149
      </div>
150
      {touched.passwordRepeat && errors.passwordRepeat && (
×
151
        <span className="text-xs text-red-600 pl-1">{errors.passwordRepeat}</span>
152
      )}
153
    </div>
154
  )
155
}
156

UNCOV
157
export const FormikUserUsernameField = ({
×
158
  t,
159
  values,
160
  errors,
161
  touched,
162
  handleChange,
163
  handleBlur,
164
  label = t('username'),
×
165
  ...props
166
}) => {
UNCOV
167
  return (
×
168
    <div className="space-y-2">
169
      <Label htmlFor="username">{label}</Label>
170
      <div className="relative">
171
        <Input
172
          id="username"
173
          name="username"
174
          type="text"
175
          placeholder={label}
176
          value={values.username}
177
          onChange={handleChange}
178
          onBlur={handleBlur}
179
          className={`pl-10 ${touched.username && errors.username ? 'border-red-600' : ''}`}
×
180
          {...props}
181
        />
182
        <AtSign
183
          size={16}
184
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
185
        />
186
      </div>
187
      {touched.username && errors.username && (
×
188
        <span className="text-xs text-red-600 pl-1">{errors.username}</span>
189
      )}
190
    </div>
191
  )
192
}
193

UNCOV
194
export const FormikUserNameField = ({
×
195
  t,
196
  values,
197
  errors,
198
  touched,
199
  handleChange,
200
  handleBlur,
201
  label = `${t('realName')} (${t('optional')})`,
×
202
  ...props
203
}) => {
UNCOV
204
  return (
×
205
    <div className="space-y-2">
206
      <Label htmlFor="name">{label}</Label>
207
      <div className="relative">
208
        <Input
209
          id="name"
210
          name="name"
211
          type="text"
212
          placeholder={label}
213
          value={values.name}
214
          onChange={(e) => {
UNCOV
215
            handleChange({
×
216
              target: { name: 'name', value: cleanStr(e.target.value).trim() },
217
            })
218
          }}
219
          onBlur={handleBlur}
220
          className={`pl-10 ${touched.name && errors.name ? 'border-red-600' : ''}`}
×
221
          {...props}
222
        />
223
        <IdCard
224
          size={16}
225
          className="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-300"
226
        />
227
      </div>
228
      {touched.name && errors.name && (
×
229
        <span className="text-xs text-red-600 pl-1">{errors.name}</span>
230
      )}
231
    </div>
232
  )
233
}
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