Skip to content

Empty viewUrl node: show error alert when directly navigating to node with empty viewUrl #5262

Description

@JohannesDoberer

Context

During e2e test migration from the original Luigi framework to the UI5 web component library (luigi-ui5-library-svelte), the test "Redirect to root path while reaching empty viewUrl node directly" (from navigation.cy.js) exposed a gap in the library's behavior.

Current behavior

When a user navigates directly to a node with an empty viewUrl (e.g. /projects/pr2/emptyViewUrl), the library:

  • ✅ Redirects to the root path (/home)
  • ❌ Does NOT show an error alert

Expected behavior (original Luigi framework)

The original framework:

  1. Shows an error alert (luigi-alert with fd-message-strip--error class and error icon)
  2. Redirects to the root path (/overview)

Reproduction

Config:

{
  pathSegment: 'emptyViewUrl',
  label: 'Empty viewUrl node',
  viewUrl: ''
}

Navigate directly to the path containing this node (e.g., /#/projects/pr2/emptyViewUrl).

Original test (navigation.cy.js:346)

it('Redirect to root path while reaching empty viewUrl node directly', () => {
  cy.visit('/projects/pr2/emptyViewUrl');

  cy.get('[data-testid=luigi-alert]').should('have.class', 'fd-message-strip--error');
  cy.get('[data-testid=luigi-alert]')
    .find('.fd-message-strip__icon-container span')
    .should('have.class', 'sap-icon--message-error');
  cy.expectPathToBe('/overview');
});

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions