Skip to content

Commit

Permalink
fix: frontend: daily and to do
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara-Ho99 committed Apr 5, 2024
1 parent 12d904d commit 0e8acad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions client/memo-minder-web/src/component/taskArea/TaskArea.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ const TaskArea = ({
const handleCompleteClick = (id) => {
setCompletedItems(prev => {
const newSet = new Set(prev);
newSet.add(id);
if (!newSet.has(id)) {
newSet.add(id);
}
return newSet;
});
};
Expand Down Expand Up @@ -359,7 +361,7 @@ const TaskArea = ({
}}>
+
</button>
<p onClick={() => handleItemClick(daily, 'Daily')}
<p
style={{ textDecoration: isCompleted ? 'line-through' : 'none' }}>
{daily.title}
</p>
Expand Down Expand Up @@ -409,7 +411,7 @@ const TaskArea = ({
}}>
+
</button>
<p onClick={() => handleItemClick(todo, 'Todo')}
<p
style={{ textDecoration: isCompleted ? 'line-through' : 'none' }}>
{todo.title}
</p>
Expand Down

2 comments on commit 0e8acad

@heystone999
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for frontend

Action wasn't able to generate report within GitHub comment limit. If you're facing this issue, please let me know by commenting under this issue.

Report generated by 🧪jest coverage report action from 0e8acad

@heystone999
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report for backend

Caution

Test run failed

St.
Category Percentage Covered / Total
🟡 Statements 78.1% 460/589
🔴 Branches 58.66% 105/179
🟡 Functions 67.31% 35/52
🟡 Lines 78.23% 460/588

Test suite run failed

Failed tests: 3/38. Failed suites: 1/7.
  ● Profile routes › should fetch the profile for a specific user

    expected 201 "Created", got 400 "Bad Request"

      33 |       .post('/api/users')
      34 |       .send(userData)
    > 35 |       .expect(201)
         |        ^
      36 |       .expect('Content-Type', /application\/json/);
      37 |
      38 |     const loginResponse = await api

      at Object.expect (tests/profiles.test.js:35:8)
      ----
      at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
      at assertFn (node_modules/supertest/lib/test.js:308:13)
      at Test.fn [as _assertFunction] (node_modules/supertest/lib/test.js:285:13)
      at Test._assertFunction [as assert] (node_modules/supertest/lib/test.js:164:23)
      at Server.assert (node_modules/supertest/lib/test.js:120:14)

  ● Profile routes › should modify an existing profile

    expected 201 "Created", got 400 "Bad Request"

      33 |       .post('/api/users')
      34 |       .send(userData)
    > 35 |       .expect(201)
         |        ^
      36 |       .expect('Content-Type', /application\/json/);
      37 |
      38 |     const loginResponse = await api

      at Object.expect (tests/profiles.test.js:35:8)
      ----
      at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
      at assertFn (node_modules/supertest/lib/test.js:308:13)
      at Test.fn [as _assertFunction] (node_modules/supertest/lib/test.js:285:13)
      at Test._assertFunction [as assert] (node_modules/supertest/lib/test.js:164:23)
      at Server.assert (node_modules/supertest/lib/test.js:120:14)

  ● Profile routes › should delete an existing profile

    expected 201 "Created", got 400 "Bad Request"

      33 |       .post('/api/users')
      34 |       .send(userData)
    > 35 |       .expect(201)
         |        ^
      36 |       .expect('Content-Type', /application\/json/);
      37 |
      38 |     const loginResponse = await api

      at Object.expect (tests/profiles.test.js:35:8)
      ----
      at Test._assertStatus (node_modules/supertest/lib/test.js:252:14)
      at assertFn (node_modules/supertest/lib/test.js:308:13)
      at Test.fn [as _assertFunction] (node_modules/supertest/lib/test.js:285:13)
      at Test._assertFunction [as assert] (node_modules/supertest/lib/test.js:164:23)
      at Server.assert (node_modules/supertest/lib/test.js:120:14)

Report generated by 🧪jest coverage report action from 0e8acad

Please sign in to comment.