Skip to content

test: added test case for subnavigation#6595

Open
mfranzke wants to merge 4 commits into
mainfrom
6594-testnavigation-item-add-test-for-opened-sub-navigation-item
Open

test: added test case for subnavigation#6595
mfranzke wants to merge 4 commits into
mainfrom
6594-testnavigation-item-add-test-for-opened-sub-navigation-item

Conversation

@mfranzke
Copy link
Copy Markdown
Collaborator

@mfranzke mfranzke commented Apr 30, 2026

Proposed changes

we're visually testing the sub–navigation inside a drawer, so we should add a test-case for that

resolves #6594

Types of changes

  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (improvements to existing components or architectural decisions)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Further comments

🔭🐙🐈 Test this branch here: https://design-system.deutschebahn.com/core-web/review/6594-testnavigation-item-add-test-for-opened-sub-navigation-item

we're visually testing the sub–navigation inside a drawer, so we should add a test-case for that
@mfranzke mfranzke requested a review from Copilot April 30, 2026 12:29
@mfranzke mfranzke self-assigned this Apr 30, 2026
@mfranzke mfranzke added the 🧪test Improvements/bugs for testing-framework label Apr 30, 2026
@mfranzke mfranzke linked an issue Apr 30, 2026 that may be closed by this pull request
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

⚠️ No Changeset found

Latest commit: b61182a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

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

Adds a Playwright Component Test case to visually cover an expanded (nested) sub-navigation state for DBNavigationItem when rendered inside a DBDrawer, addressing the regression gap noted in #6594.

Changes:

  • Imported DBDrawer and DBNavigation into the DBNavigationItem CT spec.
  • Added a nested sub-navigation fixture mounted inside an open drawer.
  • Added a screenshot test that clicks to expand 2 levels of sub-navigation and snapshots the drawer.

mfranzke and others added 2 commits May 1, 2026 10:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

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 1 out of 1 changed files in this pull request and generated 1 comment.

await expect(subNavigationItemButton).toHaveAttribute('aria-expanded', 'true');

const drawer = page.locator('.db-drawer');
await expect(drawer).toHaveAttribute('data-transition', 'open');
Copy link
Copy Markdown
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

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 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +89 to +91
const drawer = page.locator('.db-drawer');
await expect(drawer).toHaveAttribute('data-transition', 'open');
await expect(drawer).toHaveScreenshot();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏘components 🧪test Improvements/bugs for testing-framework

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

test(navigation-item): add test for opened sub-navigation-item

2 participants