Add uniqueness check to "Create project" command (#5100)
* Add failing playwright test * Make create generate a unique name if the given one collides * Add a new consolidated getUniqueProjectName function with tests * Use getUniqueProjectName * Replace "New project" button text with "Create project" cc @pierremtb * Extend the e2e test to show the incrementing behavior cc @lf94
This commit is contained in:
@ -52,6 +52,7 @@ function CommandComboBox({
|
||||
className="w-5 h-5 bg-primary/10 dark:bg-primary text-primary dark:text-inherit"
|
||||
/>
|
||||
<Combobox.Input
|
||||
data-testid="cmd-bar-search"
|
||||
onChange={(event) => setQuery(event.target.value)}
|
||||
className="w-full bg-transparent focus:outline-none selection:bg-primary/20 dark:selection:bg-primary/40 dark:focus:outline-none"
|
||||
onKeyDown={(event) => {
|
||||
@ -85,6 +86,7 @@ function CommandComboBox({
|
||||
value={option}
|
||||
className="flex items-center gap-4 px-4 py-1.5 first:mt-2 last:mb-2 ui-active:bg-primary/10 dark:ui-active:bg-chalkboard-90 ui-disabled:!text-chalkboard-50"
|
||||
disabled={optionIsDisabled(option)}
|
||||
data-testid={`cmd-bar-option`}
|
||||
>
|
||||
{'icon' in option && option.icon && (
|
||||
<CustomIcon name={option.icon} className="w-5 h-5" />
|
||||
|
Reference in New Issue
Block a user