Commit 7522ff9c authored by Martin Wortschack's avatar Martin Wortschack Committed by Phil Hughes

(EE Port) Adds change event listener to project name input field

parent b734aad6
...@@ -153,7 +153,7 @@ const bindEvents = () => { ...@@ -153,7 +153,7 @@ const bindEvents = () => {
$projectMirror.attr('disabled', !$projectMirror.attr('disabled')); $projectMirror.attr('disabled', !$projectMirror.attr('disabled'));
}); });
$projectName.keyup(() => { $projectName.on('keyup change', () => {
onProjectNameChange($projectName, $projectPath); onProjectNameChange($projectName, $projectPath);
hasUserDefinedProjectPath = $projectPath.val().trim().length > 0; hasUserDefinedProjectPath = $projectPath.val().trim().length > 0;
}); });
......
---
title: Update project path on project name autofill
merge_request: 22016
author:
type: other
...@@ -21,8 +21,9 @@ describe 'Import/Export - project import integration test', :js do ...@@ -21,8 +21,9 @@ describe 'Import/Export - project import integration test', :js do
context 'when selecting the namespace' do context 'when selecting the namespace' do
let(:user) { create(:admin) } let(:user) { create(:admin) }
let!(:namespace) { user.namespace } let!(:namespace) { user.namespace }
let(:project_name) { 'Test Project Name' + SecureRandom.hex } let(:randomHex) { SecureRandom.hex }
let(:project_path) { 'test-project-path' + SecureRandom.hex } let(:project_name) { 'Test Project Name' + randomHex }
let(:project_path) { 'test-project-name' + randomHex }
context 'prefilled the path' do context 'prefilled the path' do
it 'user imports an exported project successfully' do it 'user imports an exported project successfully' do
...@@ -30,7 +31,6 @@ describe 'Import/Export - project import integration test', :js do ...@@ -30,7 +31,6 @@ describe 'Import/Export - project import integration test', :js do
select2(namespace.id, from: '#project_namespace_id') select2(namespace.id, from: '#project_namespace_id')
fill_in :project_name, with: project_name, visible: true fill_in :project_name, with: project_name, visible: true
fill_in :project_path, with: project_path, visible: true
click_import_project_tab click_import_project_tab
click_link 'GitLab export' click_link 'GitLab export'
...@@ -79,7 +79,6 @@ describe 'Import/Export - project import integration test', :js do ...@@ -79,7 +79,6 @@ describe 'Import/Export - project import integration test', :js do
select2(user.namespace.id, from: '#project_namespace_id') select2(user.namespace.id, from: '#project_namespace_id')
fill_in :project_name, with: project.name, visible: true fill_in :project_name, with: project.name, visible: true
fill_in :project_path, with: project.path, visible: true
click_import_project_tab click_import_project_tab
click_link 'GitLab export' click_link 'GitLab export'
attach_file('file', file) attach_file('file', file)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment