Skip to content

ZCU-DATA/Cherry-pick Fix duplicate id#1240

Merged
milanmajchrak merged 2 commits intocustomer/zcu-datafrom
zcu-data/duplicate-id-search-navbar-container
Mar 11, 2026
Merged

ZCU-DATA/Cherry-pick Fix duplicate id#1240
milanmajchrak merged 2 commits intocustomer/zcu-datafrom
zcu-data/duplicate-id-search-navbar-container

Conversation

@Kasinhou
Copy link

@Kasinhou Kasinhou commented Mar 10, 2026

Problem description

Found duplicate id in html

Error: Found duplicate IDs on http://dev-5.pc:89/home and many other subpages:
    search-navbar-container (2x)

    expect(received).toHaveLength(expected)

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

and

Error: Found duplicate IDs on http://dev-5.pc:89/workspaceitems/1240/edit:
    search-navbar-container (2x)
    license_option (34x)

    expect(received).toHaveLength(expected)

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

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

Fixes a duplicate HTML id used by the header search navbar by replacing it with a CSS class and updating test selectors accordingly, preventing duplicate-ID failures across pages where multiple search navbars can be rendered.

Changes:

  • Replaced id="search-navbar-container" with class="search-navbar-container" in the search navbar template.
  • Updated Angular unit test selectors to use the new class-based selector.
  • Removed the Cypress a11y exclusion comment that referenced the now-fixed duplicate ID.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/app/search-navbar/search-navbar.component.html Removes the duplicate id and introduces a class for styling/selection.
src/app/search-navbar/search-navbar.component.spec.ts Updates DOM queries from #search-navbar-container to .search-navbar-container.
cypress/e2e/header.cy.ts Removes an outdated comment excluding the old duplicate-ID selector from a11y tests.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

@Kasinhou Kasinhou requested a review from milanmajchrak March 11, 2026 09:35
@milanmajchrak milanmajchrak merged commit edcb00f into customer/zcu-data Mar 11, 2026
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