Skip to content

[ObjectPageTitle / Toolbar]: Unit tests fail with Syntax error: > :nth-last-child(n + 2) is invalid coming from ObjectPageTitle/index.js #7045

@arijitpatra-sap

Description

@arijitpatra-sap

Describe the bug

Issue during unit tests with ObjectPageTitle... The selector > :nth-last-child(n + 2) is in @ui5/webcomponents-react/dist/components/ObjectPageTitle/index.js

usage:

<ObjectPageTitle
                    actionsBar={
                        <Toolbar design={ToolbarDesign.Transparent}>
                            <CreateTemplateButton
                                dispatchHostRefresh={remount}
                            />
                        </Toolbar>
                    }
                    header={
                        <Title
                            data-testid="vm-header-title"
                            wrappingType={WrappingType.None}
                        >
                            {t('variantManagement.title')}
                        </Title>
                    }
                ></ObjectPageTitle>

removing the Toolbar component solves the issue (just keeping the CreateTemplateButton

Image

, so maybe some issue with the Toolbar component here under ObjectPageTitle

Isolated Example

No response

Reproduction steps

...

Expected Behaviour

No response

Screenshots or Videos

No response

UI5 Web Components for React Version

^2.7.1

UI5 Web Components Version

^2.7.1

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityIssues related to conflicts or problems with other independent projects or tools.consulting

    Type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions