Skip to content

Commit 18e225b

Browse files
chore: add data-cy attributes for Cypress
1 parent 04d6168 commit 18e225b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

client/src/components/buttons/Button.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ interface ButtonWithMenuV2Props {
125125
children?: React.ReactNode;
126126
className?: string;
127127
color?: string;
128+
dataCy?: string;
128129
default: React.ReactNode;
129130
direction?: "up" | "down" | "start" | "end";
130131
disabled?: boolean;
@@ -139,6 +140,7 @@ export function SplitButtonWithMenu({
139140
children,
140141
className,
141142
color,
143+
dataCy,
142144
default: defaultButton,
143145
direction,
144146
disabled,
@@ -168,7 +170,7 @@ export function SplitButtonWithMenu({
168170
className={cx("border-start-0", "dropdown-toggle-split")}
169171
data-bs-toggle="dropdown"
170172
color={color ?? "primary"}
171-
data-cy="button-with-menu-dropdown"
173+
data-cy={dataCy ?? "button-with-menu-dropdown"}
172174
disabled={isDisabledDropdownToggle ?? disabled}
173175
/>
174176
<DropdownMenu end>{children}</DropdownMenu>

client/src/features/ProjectPageV2/ProjectPageContent/ProjectInformation/ProjectInformation.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ export default function ProjectInformation({
160160
title="Namespace:"
161161
>
162162
<p className="mb-0">
163-
<Link to={namespaceUrl}>{namespaceName}</Link>
163+
<Link data-cy="project-namespace-link" to={namespaceUrl}>
164+
{namespaceName}
165+
</Link>
164166
</p>
165167
</ProjectInformationBox>
166168
<ProjectInformationBox icon={<Eye className="bi" />} title="Visibility:">

client/src/features/dataConnectorsV2/components/DataConnectorActions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ function DataConnectorActionsInner({
490490
) : (
491491
<ButtonWithMenuV2
492492
color="outline-primary"
493+
dataCy="data-connector-menu-dropdown"
493494
default={
494495
<Button
495496
color="outline-primary"

0 commit comments

Comments
 (0)