diff --git a/CHANGELOG b/CHANGELOG index cf00780d332e1d7b06a76dcb581f165396596437..854f5c88bc352fe7aa97a7555da09a3f6b240a11 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.10.0 (unreleased) + - Fix "Import projects from" button to show the correct instructions (Stan Hu) - Update poltergeist to version 1.6.0 to support PhantomJS 2.0 (Zeger-Jan van de Weg) - Fix cross references when usernames, milestones, or project names contain underscores (Stan Hu) - enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger) diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 173a3080b3159972479ba3f9b13b46f7b3071e07..9687c8ad87c1ea9cc393e5ec17f463490d8fc0c9 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -74,9 +74,9 @@ = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git' .alert.alert-info.prepend-top-10 %ul - %li + %li The repository must be accessible over HTTP(S). If it is not publicly accessible, you can add authentication information to the URL: https://username:password@gitlab.company.com/group/project.git. - %li + %li The import will time out after 4 minutes. For big repositories, use a clone/push combination. %li To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/migrating_from_svn.html"}. @@ -112,6 +112,6 @@ $ -> $('.how_to_import_link').bind 'click', (e) -> e.preventDefault() - import_modal = $(this).parent().find(".modal").show() + import_modal = $(this).next(".modal").show() $('.modal-header .close').bind 'click', -> $(".modal").hide() diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature new file mode 100644 index 0000000000000000000000000000000000000000..431dc4ccfcb258c50a042274bb53d40832049b3b --- /dev/null +++ b/features/dashboard/new_project.feature @@ -0,0 +1,13 @@ +@dashboard +Feature: New Project +Background: + Given I sign in as a user + And I own project "Shop" + And I visit dashboard page + + @javascript + Scenario: I should see New projects page + Given I click "New project" link + Then I see "New project" page + When I click on "Import project from GitHub" + Then I see instructions on how to import from GitHub diff --git a/features/steps/dashboard/new_project.rb b/features/steps/dashboard/new_project.rb new file mode 100644 index 0000000000000000000000000000000000000000..5e588ceb780c7f4196ad2702a0adbf6b81370662 --- /dev/null +++ b/features/steps/dashboard/new_project.rb @@ -0,0 +1,27 @@ +class Spinach::Features::NewProject < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedProject + + step 'I click "New project" link' do + click_link "New project" + end + + step 'I see "New project" page' do + page.should have_content("Project path") + end + + step 'I click on "Import project from GitHub"' do + first('.how_to_import_link').click + end + + step 'I see instructions on how to import from GitHub' do + github_modal = first('.modal-body') + github_modal.should be_visible + github_modal.should have_content "To enable importing projects from GitHub" + + all('.modal-body').each do |element| + element.should_not be_visible unless element == github_modal + end + end +end