Skip to content

VSB-TUO/Fix duplicate id#1245

Merged
milanmajchrak merged 1 commit intocustomer/vsb-tuofrom
vsb-tuo/duplicate-id-fix
Mar 11, 2026
Merged

VSB-TUO/Fix duplicate id#1245
milanmajchrak merged 1 commit intocustomer/vsb-tuofrom
vsb-tuo/duplicate-id-fix

Conversation

@Kasinhou
Copy link

@Kasinhou Kasinhou commented Mar 10, 2026

Problem description

Found duplicity ids in html:

Error: Found duplicate IDs on http://dev-6.pc:8563/home and other subpages:
    search-navbar-container (2x)
    loginDropdownMenu (2x)

    expect(received).toHaveLength(expected)

    Expected length: 0
    Received length: 2
    Received array:  ["search-navbar-container (2x)", "loginDropdownMenu (2x)"]

Sync verification

If en.json5 or cs.json5 translation files were updated:

  • Run yarn run sync-i18n -t src/assets/i18n/cs.json5 -i to synchronize messages, and changes are included in this PR.

Manual Testing (if applicable)

Copilot review

  • Requested review from Copilot

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR resolves duplicate HTML id attributes detected on /home (and other pages) by removing the duplicated IDs from the login/logout dropdown menus and the search navbar container, replacing them with class selectors and updating affected styling/tests accordingly.

Changes:

  • Replace id="loginDropdownMenu", id="logoutDropdownMenu", and id="search-navbar-container" with equivalent CSS classes to eliminate duplicate IDs.
  • Update SCSS selectors from #... to .... in both default and custom theme components.
  • Update the AuthNavMenu unit test selector to match the new class-based markup.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.scss Switch dropdown styling selectors from IDs to classes in the custom theme.
src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.html Remove duplicated dropdown IDs (use classes instead) in the custom theme template.
src/themes/custom/app/search-navbar/search-navbar.component.html Remove duplicated search navbar container ID (use class instead) in the custom theme template.
src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts Update test DOM query to use the new class selector.
src/app/shared/auth-nav-menu/auth-nav-menu.component.scss Switch dropdown styling selectors from IDs to classes in the default theme.
src/app/shared/auth-nav-menu/auth-nav-menu.component.html Remove duplicated dropdown IDs (use classes instead) in the default theme template.
src/app/search-navbar/search-navbar.component.html Add a class to the search navbar container (aligning with the themed template, avoiding IDs).

@Kasinhou Kasinhou self-assigned this Mar 10, 2026
@Kasinhou Kasinhou changed the title Fix duplicate id search-navbar-container and loginDropdownMenu VSB-TUO/Fix duplicate id Mar 10, 2026
@Kasinhou Kasinhou requested a review from milanmajchrak March 11, 2026 09:35
@milanmajchrak milanmajchrak merged commit f86c1a1 into customer/vsb-tuo Mar 11, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants