aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/src
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/src')
-rw-r--r--apps/files/src/components/NewNodeDialog.vue7
-rw-r--r--apps/files/src/utils/newNodeDialog.ts2
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/src/components/NewNodeDialog.vue b/apps/files/src/components/NewNodeDialog.vue
index 1ac65421dfe..d73e363e39f 100644
--- a/apps/files/src/components/NewNodeDialog.vue
+++ b/apps/files/src/components/NewNodeDialog.vue
@@ -3,13 +3,15 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
- <NcDialog :name="name"
+ <NcDialog data-cy-files-new-node-dialog
+ :name="name"
:open="open"
close-on-click-outside
out-transition
@update:open="onClose">
<template #actions>
- <NcButton type="primary"
+ <NcButton data-cy-files-new-node-dialog-submit
+ type="primary"
:disabled="!isUniqueName"
@click="onCreate">
{{ t('files', 'Create') }}
@@ -17,6 +19,7 @@
</template>
<form @submit.prevent="onCreate">
<NcTextField ref="input"
+ data-cy-files-new-node-dialog-input
:error="!isUniqueName"
:helper-text="errorMessage"
:label="label"
diff --git a/apps/files/src/utils/newNodeDialog.ts b/apps/files/src/utils/newNodeDialog.ts
index 53d4fe4d00f..a81fa9f4e17 100644
--- a/apps/files/src/utils/newNodeDialog.ts
+++ b/apps/files/src/utils/newNodeDialog.ts
@@ -23,7 +23,7 @@ interface ILabels {
* @param defaultName Default name to use
* @param folderContent Nodes with in the current folder to check for unique name
* @param labels Labels to set on the dialog
- * @return string if successfull otherwise null if aborted
+ * @return string if successful otherwise null if aborted
*/
export function newNodeName(defaultName: string, folderContent: Node[], labels: ILabels = {}) {
const contentNames = folderContent.map((node: Node) => node.basename)