summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-08-07 19:24:14 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-08-07 19:24:14 +0000
commit4c8b666893aa9f5ab94b800489fd9e3240ad4f5e (patch)
tree4c499f649a9b3461963d9c084333259aad8a57be /spec/javascripts
parent4e2b630df716174ea9b07319a0fd5eda7b60cf8e (diff)
parentae5003a35ef47bbdafc51e3e9d0f27039f9d20a2 (diff)
downloadgitlab-ce-4c8b666893aa9f5ab94b800489fd9e3240ad4f5e.tar.gz
Merge branch 'zj-project-templates' into 'master'
Allow projects to be started from a template Closes #32420 See merge request !13108
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/projects/project_import_gitlab_project_spec.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/javascripts/projects/project_import_gitlab_project_spec.js b/spec/javascripts/projects/project_import_gitlab_project_spec.js
new file mode 100644
index 00000000000..2f1aae109e3
--- /dev/null
+++ b/spec/javascripts/projects/project_import_gitlab_project_spec.js
@@ -0,0 +1,25 @@
+import projectImportGitlab from '~/projects/project_import_gitlab_project';
+
+describe('Import Gitlab project', () => {
+ let projectName;
+ beforeEach(() => {
+ projectName = 'project';
+ window.history.pushState({}, null, `?path=${projectName}`);
+
+ setFixtures(`
+ <input class="js-path-name" />
+ `);
+
+ projectImportGitlab.bindEvents();
+ });
+
+ afterEach(() => {
+ window.history.pushState({}, null, '');
+ });
+
+ describe('path name', () => {
+ it('should fill in the project name derived from the previously filled project name', () => {
+ expect(document.querySelector('.js-path-name').value).toEqual(projectName);
+ });
+ });
+});