diff options
author | Phil Hughes <me@iamphill.com> | 2018-10-02 07:46:41 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-10-02 07:46:41 +0000 |
commit | de21a2b566560bba9802243b44263e556da1aae0 (patch) | |
tree | e39f7238487396c3f962fb7d83a281d07ffc730e | |
parent | 1883e97e7c8645f4305e7c9094050e10930a900c (diff) | |
parent | 5d709e7e865652d795f90bfd3166abe0455df3cb (diff) | |
download | gitlab-ce-de21a2b566560bba9802243b44263e556da1aae0.tar.gz |
Merge branch '52035-selecting-an-autofill-suggestion-for-project-name-will-not-update-the-project-slug' into 'master'
Resolve "Selecting an autofill suggestion for project name will not update the project slug"
Closes #52035
See merge request gitlab-org/gitlab-ce!22016
3 files changed, 9 insertions, 5 deletions
diff --git a/app/assets/javascripts/projects/project_new.js b/app/assets/javascripts/projects/project_new.js index 8a079b4b38a..ebe18b47e4e 100644 --- a/app/assets/javascripts/projects/project_new.js +++ b/app/assets/javascripts/projects/project_new.js @@ -147,7 +147,7 @@ const bindEvents = () => { $projectImportUrl.keyup(() => deriveProjectPathFromUrl($projectImportUrl)); - $projectName.keyup(() => { + $projectName.on('keyup change', () => { onProjectNameChange($projectName, $projectPath); hasUserDefinedProjectPath = $projectPath.val().trim().length > 0; }); diff --git a/changelogs/unreleased/52035-selecting-an-autofill-suggestion-for-project-name-will-not-update-the-project-slug.yml b/changelogs/unreleased/52035-selecting-an-autofill-suggestion-for-project-name-will-not-update-the-project-slug.yml new file mode 100644 index 00000000000..d56c814b139 --- /dev/null +++ b/changelogs/unreleased/52035-selecting-an-autofill-suggestion-for-project-name-will-not-update-the-project-slug.yml @@ -0,0 +1,5 @@ +--- +title: Update project path on project name autofill +merge_request: 22016 +author: +type: other diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index 65c68277167..28ae90bc0de 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -21,8 +21,9 @@ describe 'Import/Export - project import integration test', :js do context 'when selecting the namespace' do let(:user) { create(:admin) } let!(:namespace) { user.namespace } - let(:project_name) { 'Test Project Name' + SecureRandom.hex } - let(:project_path) { 'test-project-path' + SecureRandom.hex } + let(:randomHex) { SecureRandom.hex } + let(:project_name) { 'Test Project Name' + randomHex } + let(:project_path) { 'test-project-name' + randomHex } context 'prefilled the path' do it 'user imports an exported project successfully' do @@ -30,7 +31,6 @@ describe 'Import/Export - project import integration test', :js do select2(namespace.id, from: '#project_namespace_id') fill_in :project_name, with: project_name, visible: true - fill_in :project_path, with: project_path, visible: true click_import_project_tab click_link 'GitLab export' @@ -79,7 +79,6 @@ describe 'Import/Export - project import integration test', :js do select2(user.namespace.id, from: '#project_namespace_id') fill_in :project_name, with: project.name, visible: true - fill_in :project_path, with: project.path, visible: true click_import_project_tab click_link 'GitLab export' attach_file('file', file) |