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

SyTW2223 / E01 / 3976491236

pending completion
3976491236

push

github

juanmdom
test y responsividad

18 of 66 branches covered (27.27%)

Branch coverage included in aggregate %.

7 of 12 new or added lines in 5 files covered. (58.33%)

211 of 408 relevant lines covered (51.72%)

1.31 hits per line

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

57.14
/client/src/components/form/TaskForm.jsx
1
import React from 'react';
2
import { TextField, ListItem, IconButton, Button } from '@mui/material';
3
import DeleteIcon from '@mui/icons-material/Delete';
4
import {ThemeProvider} from '@mui/material';
5
import { theme } from '../../themes/mainTheme';
6
import { useState } from 'react';
7
import DoneAllIcon from '@mui/icons-material/DoneAll';
8

9
const TaskForm = ({ task, taskIndex, objectiveIndex, handleTaskChange, handleDeleteTask, objetiveCompleted }) => {
4✔
10
  const [taskCompleted, setCompletedTask] = useState(false);
9✔
11

12
  const useStyles =  {
9✔
13
    maxWidth: '280px',
14
    bgcolor: theme.palette.secondary.secondary,
15
    borderRadius: '15px',
16
    boxShadow: 1,
17
    marginTop: 1,
18
    marginBottom: 1,
19
  };
20

21
  return (
9✔
22
    <ThemeProvider theme={theme}>
23
      <ListItem key={taskIndex} sx={useStyles}>
24
        <TextField
25
          data-testid="task-name-input"
26
          InputProps={{
27
            style: { color: '#658864' },
28
          }}
29
          variant='standard'
30
          disabled={taskCompleted}
31
          label="Task"
32
          value={task}
33
          onChange={(event) => handleTaskChange(event, objectiveIndex, taskIndex)}
×
34
          sx={{
35
            color: 'secondary.main'
36
          }}
37
        />
NEW
38
        <IconButton onClick={() => handleDeleteTask(objectiveIndex, taskIndex)} data-testid="task-delete-btn"> 
×
39
          <DeleteIcon sx={{color: 'primary.main'}}/> 
40
        </IconButton>
NEW
41
        <Button onClick={() => setCompletedTask(true)} disabled={taskCompleted} sx={{maxWidth: '1px'}}>
×
42
          <DoneAllIcon
43
          data-testid="task-complete-btn"
44
          sx={{
45
            borderRadius: 1,
46
            color: 'primary.main',
47
            marginX: 2
48
          }}/>
49
        </Button>
50
      </ListItem>
51
    </ThemeProvider>
52
  );
53
}
54

55
export default TaskForm;
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