From d2e7bc9eb902e1aa7a2d45a9a4440d7b75eecd09 Mon Sep 17 00:00:00 2001 From: Oleksii Orel Date: Wed, 10 Oct 2018 14:41:06 +0300 Subject: [PATCH] CHE-10659 Fix the regular expression for a workspace name Signed-off-by: Oleksii Orel --- .../workspace-overview/workspace-details-overview.html | 4 ++-- .../che-edit-mode-overlay.directive.spec.ts | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html index ba8ef0d802..4e35f5fd28 100644 --- a/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html +++ b/dashboard/src/app/workspaces/workspace-details/workspace-overview/workspace-details-overview.html @@ -13,12 +13,12 @@ required ng-minlength="3" ng-maxlength="100" - ng-pattern="/^[A-Za-z0-9_\-\.]+$/" + ng-pattern="/^[A-Za-z0-9]{1}[A-Za-z0-9_\-\.]+[A-Za-z0-9]{1}$/" custom-validator="workspaceDetailsOverviewController.isNameUnique($value)"> -
The name should not contain special characters like space, dollar, etc.
The name has to be less than 101 characters long.
The name has to be more than 3 characters long.
+
The name should not contain special characters like space, dollar, etc.
This workspace name is already used.
diff --git a/dashboard/src/components/widget/edit-mode-overlay/che-edit-mode-overlay.directive.spec.ts b/dashboard/src/components/widget/edit-mode-overlay/che-edit-mode-overlay.directive.spec.ts index 57022dd91b..021f8f5255 100644 --- a/dashboard/src/components/widget/edit-mode-overlay/che-edit-mode-overlay.directive.spec.ts +++ b/dashboard/src/components/widget/edit-mode-overlay/che-edit-mode-overlay.directive.spec.ts @@ -186,11 +186,6 @@ describe(`cheEditModeOverlay >`, () => { expect($scope.config.applyButton.action).not.toHaveBeenCalled(); }); - it(`shouldn't call a callback when 'cancelButton' is clicked >`, () => { - cancelButtonEl.click(); - expect($scope.config.cancelButton.action).not.toHaveBeenCalled(); - }); - }); });