Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.1.20](https://github.com/multiversx/mx-sdk-dapp-ui/pull/304)] - 2026-02-11

- [Fied `data-testid`s](https://github.com/multiversx/mx-sdk-dapp-ui/pull/303)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There appears to be a typo in the changelog entry. "Fied" should likely be "Fixed".

Suggested change
- [Fied `data-testid`s](https://github.com/multiversx/mx-sdk-dapp-ui/pull/303)
- [Fixed `data-testid`s](https://github.com/multiversx/mx-sdk-dapp-ui/pull/303)


## [[0.1.19](https://github.com/multiversx/mx-sdk-dapp-ui/pull/302)] - 2026-01-29

- [Fix duplicated `data-testid` on `mvx-button` host and inner `<button>`](https://github.com/multiversx/mx-sdk-dapp-ui/pull/302)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-dapp-ui",
"version": "0.1.19",
"version": "0.1.20",
"description": "A library to hold UI components for a dApp on the MultiversX blockchain",
"author": "MultiversX",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { h } from '@stencil/core';
import classNames from 'classnames';
import { Icon } from 'common/Icon';
import { DataTestIdsEnum } from 'constants/dataTestIds.enum';

// prettier-ignore
const styles = {
Expand Down Expand Up @@ -57,6 +58,7 @@ export function SidePanelHeader({
<div
class={{ [styles.sidePanelHeadingRight]: true, [styles.sidePanelHeadingRightVisible]: hasRightButton }}
onClick={handleRightIconClick}
data-testid={DataTestIdsEnum.sidePanelCloseButton}
>
{hasRightButton && (rightIcon || <Icon name="close" />)}
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/visual/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export class Button {
@Prop() size?: `${ButtonSizeEnum}` = 'large';
@Prop() variant?: `${ButtonVariantEnum}` = 'primary';

private handleClick = (event: MouseEvent) => {
private readonly handleClick = (event: MouseEvent) => {
this.buttonClick.emit(event);
};

render() {
return (
<ButtonComponent
class={this.class}
data-testid={this.dataTestId}
// data-testid={this.internalDataTestId} // This is handled by the `data-testid` prop with `reflect: false`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Commenting out the data-testid attribute here means that the dataTestId prop passed to <mvx-button> will no longer be applied to the underlying <button> element. This breaks the intended functionality of providing a data-testid for testing purposes. The ButtonComponent (from common/Button/Button.tsx) correctly accepts and applies the data-testid prop, so it should be passed through.

Suggested change
// data-testid={this.internalDataTestId} // This is handled by the `data-testid` prop with `reflect: false`
data-testid={this.dataTestId}

disabled={this.disabled}
size={this.size}
variant={this.variant}
Expand Down
1 change: 1 addition & 0 deletions src/constants/dataTestIds.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ export enum DataTestIdsEnum {
signTransactionsAdvancedDataWrapper = 'signTransactionsAdvancedDataWrapper',
signTransactionsAdvancedDataText = 'signTransactionsAdvancedDataText',
signTransactionsAdvancedDataHighlight = 'signTransactionsAdvancedDataHighlight',
sidePanelCloseButton = 'side-panel-close-button',
}