Skip to content

Commit

Permalink
Merge pull request #1581 from entando/ENG-5354_uniqueIDs
Browse files Browse the repository at this point in the history
ENG-5354 fix pages and widgets dropdown IDs
  • Loading branch information
riccardo-fadda authored Dec 12, 2023
2 parents dc56e37 + 1d49863 commit 7003560
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ui/pages/common/PageTreeActionMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class PageTreeActionMenu extends Component {

return (
<div onClick={e => e.stopPropagation()} role="none" data-testid={`${page.code}-actions`}>
<DropdownKebab pullRight id="WidgetListRow-dropown">
<DropdownKebab pullRight id={`WidgetListRow-dropdown-${page.code}`}>
<MenuItem
className="PageTreeActionMenuButton__menu-item-add"
onSelect={this.handleClick(onClickAdd)}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/config/WidgetFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class WidgetFrame extends Component {

actionsMenu = (
<DropdownKebab
id="WidgetFrame__menu-button"
id={`WidgetFrame__menu-button-${frameName.replace(/\s/g, '_')}`}
className="WidgetFrame__menu-button"
pullRight
>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/detail/DetailWidgetElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const DetailWidgetElement = ({ widgetInfo }) => {
</td>
<td className="DetailWidgetElement__td text-center">{data[info].frameDraft}</td>
<td className="DetailWidgetElement__td text-center">
<DropdownKebab pullRight id="DetailWidgetElement-dropown">
<DropdownKebab pullRight id={`DetailWidgetElement-dropdown-${info}`}>
<LinkMenuItem
id={`go-page-detail-${info}`}
to={routeConverter(ROUTE_PAGE_CONFIG, { pageCode: info })}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/widgets/list/WidgetListTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const WidgetListTableBody = ({
const { values: { code }, original: { locked, hasConfig } } = cellinfo;
return (
<div data-testid={`${code}-actions`}>
<DropdownKebab pullRight id={`WidgetListRow-dropown-${code}`}>
<DropdownKebab pullRight id={`WidgetListRow-dropdown-${code}`}>
{hasConfig && (
<MenuItem
className="WidgetListRow__menu-item-addwidget"
Expand Down

0 comments on commit 7003560

Please sign in to comment.