mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Add data-testid attributes for improved testing in modals
This commit is contained in:
@@ -63,6 +63,7 @@ const CreateWorkspaceModal: React.FC<CreateWorkspaceModalProps> = ({
|
||||
<TextInput
|
||||
label="Workspace Name"
|
||||
placeholder="Enter workspace name"
|
||||
data-testid="workspace-name-input"
|
||||
value={name}
|
||||
onChange={(event) => setName(event.currentTarget.value)}
|
||||
mb="md"
|
||||
@@ -74,10 +75,15 @@ const CreateWorkspaceModal: React.FC<CreateWorkspaceModalProps> = ({
|
||||
variant="default"
|
||||
onClick={() => setCreateWorkspaceModalVisible(false)}
|
||||
disabled={loading}
|
||||
data-testid="cancel-create-workspace-button"
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button onClick={() => void handleSubmit} loading={loading}>
|
||||
<Button
|
||||
onClick={() => void handleSubmit}
|
||||
loading={loading}
|
||||
data-testid="confirm-create-workspace-button"
|
||||
>
|
||||
Create
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
@@ -28,10 +28,18 @@ const DeleteWorkspaceModal: React.FC<DeleteUserModalProps> = ({
|
||||
permanently deleted.
|
||||
</Text>
|
||||
<Group justify="flex-end" mt="xl">
|
||||
<Button variant="default" onClick={onClose}>
|
||||
<Button
|
||||
variant="default"
|
||||
onClick={onClose}
|
||||
data-testid="cancel-delete-workspace-button"
|
||||
>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button color="red" onClick={() => void onConfirm}>
|
||||
<Button
|
||||
color="red"
|
||||
onClick={() => void onConfirm}
|
||||
data-testid="confirm-delete-workspace-button"
|
||||
>
|
||||
Delete Workspace
|
||||
</Button>
|
||||
</Group>
|
||||
|
||||
Reference in New Issue
Block a user