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

EcrituresNumeriques / stylo / 15946724579

28 Jun 2025 05:54PM UTC coverage: 39.421% (-0.1%) from 39.533%
15946724579

Pull #1645

github

web-flow
Merge a99a1910a into 78e3afa65
Pull Request #1645: chore: ajout de tests e2e (playwright)

571 of 804 branches covered (71.02%)

Branch coverage included in aggregate %.

3 of 76 new or added lines in 6 files covered. (3.95%)

3 existing lines in 1 file now uncovered.

5702 of 15109 relevant lines covered (37.74%)

2.59 hits per line

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

0.0
/front/src/components/header/UserMenu.jsx
1
import { LogOut, User } from 'lucide-react'
×
2
import React from 'react'
×
3
import { useTranslation } from 'react-i18next'
×
4
import { Link, NavLink, useRouteLoaderData } from 'react-router'
×
5

6
import styles from '../header.module.scss'
×
7

8
export default function UserMenu() {
×
9
  const { t } = useTranslation()
×
10
  const { user } = useRouteLoaderData('app')
×
11
  const userId = user?._id
×
12

13
  if (!userId) {
×
14
    return (
×
15
      <nav className={styles.userMenu} aria-label={t('header.userMenu.title')}>
×
NEW
16
        <NavLink data-testid="login" to="/login">{t('credentials.login.confirmButton')}</NavLink>
×
17

18
        <NavLink to="/register" className="hidden-below-tablet">
×
19
          {t('credentials.login.registerLink')}
×
20
        </NavLink>
×
21
      </nav>
×
22
    )
23
  }
×
24

25
  return (
×
26
    <nav className={styles.userMenu} aria-label={t('header.userMenu.title')}>
×
27
      <NavLink
×
28
        to="/credentials"
×
29
        aria-label={t('header.userMenu.profile')}
×
30
        aria-description={t('header.userMenu.profile.description')}
×
31
      >
32
        <User aria-hidden className="icon hidden-below-tablet" />
×
33

34
        <span className="hidden-below-tablet">{user.displayName}</span>
×
35
        <span className="hidden-above-tablet">
×
36
          {t('header.userMenu.shortLabel')}
×
37
        </span>
×
38
      </NavLink>
×
39

40
      <Link to="/logout">
×
41
        <LogOut className="icon" aria-hidden />
×
42
        <span className="sr-only">{t('credentials.logout.confirmButton')}</span>
×
43
      </Link>
×
44
    </nav>
×
45
  )
46
}
×
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