Skip to content

Commit

Permalink
feat(frontend): add milestones area
Browse files Browse the repository at this point in the history
  • Loading branch information
looppoolloop committed Mar 10, 2024
1 parent 8ad16c7 commit c8d9886
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/memo-minder-web/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function App() {
};
/*-Transfer for different Areas end-*/

const Layout = ({ showTaskArea, showShop, showChallenge, handleTaskClick, handleShopClick, handleChallengeClick, handleMilestonesClick }) => {
const Layout = ({ showTaskArea, showShop, showChallenge, showMilestones, handleTaskClick, handleShopClick, handleChallengeClick, handleMilestonesClick }) => {

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion client/memo-minder-web/src/component/navBar/NavBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Link } from "react-router-dom";
import "./NavBar.css";
import React, { useState } from "react";

function Navbar({ coin, showTaskArea, showShop, showChallenge, showMilestones, handleTaskClick, handleShopClick, handleMilestonesClick, handleChallengeClick }) {
function Navbar({ coin, showTaskArea, showShop, showChallenge, showMilestones, handleTaskClick, handleShopClick, handleChallengeClick, handleMilestonesClick }) {
const [open, setOpen] = useState(false);

const handleShopLinkClick = () => {
Expand Down

2 comments on commit c8d9886

@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 50.25% 99/197
πŸ”΄ Branches 30.16% 19/63
πŸ”΄ Functions 22.22% 4/18
πŸ”΄ Lines 50.25% 99/197

Test suite run failed

Failed tests: 2/7. Failed suites: 2/3.
  ● POST /api/habits β€Ί should add a new habit

    expected 200 "OK", got 401 "Unauthorized"

      30 |     .post('/api/login')
      31 |     .send({ username: username, password: password })
    > 32 |     .expect(200);
         |      ^
      33 |
      34 |   // Extract the token from the response body
      35 |   token = res.body.token;

      at Object.expect (tests/habits.test.js:32:6)
      ----
      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)


  ● User endpoints β€Ί POST /api/users creates a new user

    expect(received).toHaveLength(expected)

    Expected length: 1
    Received length: 2
    Received array:  [{"email": "[email protected]", "id": "65ed379275458a4d389a6ddf", "username": "testuser"}, {"email": "[email protected]", "id": "65ed379292507c85c150019f", "username": "newuser"}]

      31 |
      32 |     const users = await User.find({})
    > 33 |     expect(users).toHaveLength(1)
         |                   ^
      34 |     expect(users[0].username).toBe(newUser.username)
      35 |
      36 |     const passwordMatches = await bcrypt.compare(newUser.password, users[0].passwordHash)

      at Object.toHaveLength (tests/users.test.js:33:19)

Report generated by πŸ§ͺjest coverage report action from c8d9886

@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 fronend

St.❔
Category Percentage Covered / Total
πŸ”΄ Statements 40.14% 297/740
πŸ”΄ Branches 28.38% 84/296
πŸ”΄ Functions 31.6% 67/212
πŸ”΄ Lines 40.51% 284/701

Test suite run success

13 tests passing in 4 suites.

Report generated by πŸ§ͺjest coverage report action from c8d9886

Please sign in to comment.