Skip to content

Commit 03cd085

Browse files
authored
Merge pull request #2315 from headlamp-k8s/namespace-create-button-label
frontend: Refactor labels for create namespace button
2 parents 63f6229 + 8becdd6 commit 03cd085

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

frontend/src/components/namespace/CreateNamespaceButton.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ export default function CreateNamespaceButton() {
9898
return (
9999
<AuthVisible item={Namespace} authVerb="create">
100100
<ActionButton
101+
data-testid="create-namespace-button"
101102
color="primary"
102-
description={t('translation|Create')}
103+
description={t('translation|Create Namespace')}
103104
icon={'mdi:plus-circle'}
104105
onClick={() => {
105106
setNamespaceDialogOpen(true);
@@ -143,15 +144,15 @@ export default function CreateNamespaceButton() {
143144
</DialogContent>
144145
<DialogActions>
145146
<Button
146-
aria-label="Cancel"
147+
data-testid="create-namespace-dialog-cancel-button"
147148
onClick={() => {
148149
setNamespaceDialogOpen(false);
149150
}}
150151
>
151152
{t('translation|Cancel')}
152153
</Button>
153154
<Button
154-
aria-label="Create"
155+
data-testid="create-namespace-dialog-create-button"
155156
disabled={!isValidNamespaceName}
156157
onClick={() => {
157158
createNewNamespace();

frontend/src/components/namespace/__snapshots__/NamespaceList.Regular.stories.storyshot

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class="MuiBox-root css-ldp2l3"
2222
>
2323
<button
24-
aria-label="Create"
24+
aria-label="Create Namespace"
2525
class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-whz9ym-MuiButtonBase-root-MuiIconButton-root"
2626
data-mui-internal-clone-element="true"
2727
tabindex="0"

0 commit comments

Comments
 (0)