diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7952fa48a..1217b7ea4 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [22.x] steps: - uses: actions/checkout@v3 diff --git a/__tests__/Unit/Components/ExtensionRequest/ExtensionStatusModal.test.tsx b/__tests__/Unit/Components/ExtensionRequest/ExtensionStatusModal.test.tsx index 4996dabf2..f63bf9fcc 100644 --- a/__tests__/Unit/Components/ExtensionRequest/ExtensionStatusModal.test.tsx +++ b/__tests__/Unit/Components/ExtensionRequest/ExtensionStatusModal.test.tsx @@ -121,8 +121,15 @@ describe('ExtensionStatusModal Component', () => { test('should test formatToRelativeTime function', () => { const timestamp = 1640995200; + const fixedNow = new Date('2025-01-01T00:00:00Z'); + + jest.useFakeTimers(); + jest.setSystemTime(fixedNow); + const result = formatToRelativeTime(timestamp); expect(result).toBe('3 years ago'); + + jest.useRealTimers(); }); test('should open extension request form when request extension button is clicked', () => { diff --git a/__tests__/Unit/Components/Navbar/Navbar.test.tsx b/__tests__/Unit/Components/Navbar/Navbar.test.tsx index 237f63b86..2ea4377ff 100644 --- a/__tests__/Unit/Components/Navbar/Navbar.test.tsx +++ b/__tests__/Unit/Components/Navbar/Navbar.test.tsx @@ -89,7 +89,7 @@ describe('Navbar', () => { ); expect(eventLink).toHaveAttribute( 'href', - 'https://www.realdevsquad.com/events.html' + 'https://www.realdevsquad.com/events' ); expect(memberLink).toHaveAttribute( 'href', diff --git a/__tests__/Unit/Components/Tasks/Card.test.tsx b/__tests__/Unit/Components/Tasks/Card.test.tsx index 025f1cbfa..00d924f67 100644 --- a/__tests__/Unit/Components/Tasks/Card.test.tsx +++ b/__tests__/Unit/Components/Tasks/Card.test.tsx @@ -537,6 +537,8 @@ describe('Task card', () => { }); it('renders "Started" with a specific date if status is not AVAILABLE', () => { + jest.useFakeTimers(); + jest.setSystemTime(new Date('2025-01-01T00:00:00Z')); const { getByTestId } = renderWithRouter( { ); const spanElement = screen.getByTestId('started-on'); expect(spanElement).toHaveTextContent('Started 4 years ago'); // Mocked date from moment + jest.useRealTimers(); }); it('Should show the status of the task', () => { renderWithRouter( diff --git a/package.json b/package.json index a355ea0f2..24ff5563c 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@testing-library/react-hooks": "^8.0.1", "@types/jest": "^29.2.5", "@types/next": "^9.0.0", - "@types/node": "^18.7.8", + "@types/node": "22.10.5", "@types/react": "^18.0.17", "@types/react-beautiful-dnd": "^13.1.2", "@types/react-dom": "^18.0.6", @@ -96,7 +96,7 @@ "whatwg-fetch": "^3.6.2" }, "engines": { - "node": "18.x" + "node": "22.x" }, "lint-staged": { "*.+(ts|tsx)": [ @@ -107,7 +107,7 @@ "workerDirectory": "public" }, "volta": { - "node": "18.14.2", + "node": "22.12.0", "yarn": "1.22.19" } } diff --git a/src/components/Dropdown/Dropdown.tsx b/src/components/Dropdown/Dropdown.tsx index 68d84700a..4a6019b02 100644 --- a/src/components/Dropdown/Dropdown.tsx +++ b/src/components/Dropdown/Dropdown.tsx @@ -1,5 +1,5 @@ import Link from 'next/link'; -import { LOGOUT_URL, MAIN_SITE_URL, MY_SITE_URL } from '../../constants/url'; +import { LOGOUT_URL, MAIN_SITE_URL } from '../../constants/url'; import styles from '@/components/Dropdown/dropdown.module.scss'; export const logout = () => { @@ -18,23 +18,23 @@ const Dropdown = () => {
  • Home
  • - -
  • Status
  • - -
  • Profile
  • +
  • Status
  • +
  • Profile
  • + +
  • Tasks
  • Identity
  • diff --git a/src/components/tasks/card/index.tsx b/src/components/tasks/card/index.tsx index e863222a3..8257ef130 100644 --- a/src/components/tasks/card/index.tsx +++ b/src/components/tasks/card/index.tsx @@ -575,7 +575,7 @@ const Card: FC = ({ : `Started ${getStartedAgo()}`} - {!isDevMode && ( + {!isSelfTask && (

    Status:

    = ({ {showAssignButton() && }

    - {(isEditable || (isDevMode && isSelfTask)) && ( + {(isEditable || isSelfTask) && (