diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-23 01:20:20 +0300 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-03-24 22:44:14 +0300 |
commit | cd26d79ca4531a95eb165191ec84ef86914665f4 (patch) | |
tree | 7b2c5b9c67f0b413ea63d002c17c917c8344b9fe /features | |
parent | 325cedebe321a75594db4a97826e3742e309b37d (diff) |
Merge branch 'fix-import-from-modal' into 'master'
Fix "Import projects from" button to show the correct instructions
Closes #1267
See merge request !422
Conflicts:
app/views/projects/new.html.haml
Diffstat (limited to 'features')
-rw-r--r-- | features/dashboard/new_project.feature | 13 | ||||
-rw-r--r-- | features/steps/dashboard/new_project.rb | 27 |
2 files changed, 40 insertions, 0 deletions
diff --git a/features/dashboard/new_project.feature b/features/dashboard/new_project.feature new file mode 100644 index 00000000000..431dc4ccfcb --- /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 00000000000..5e588ceb780 --- /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 |