diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-06 15:06:44 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 12:22:57 +0300 |
commit | 85b0240c4b58a49b22c9dbff9451127ae817652a (patch) | |
tree | 1674729902e2c8a9041134e0ed581ad4c96d958a /spec/features/import | |
parent | 4cee5d2e8c78001a1affc53175833641253adbb0 (diff) |
Add feature specs for manifest import
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/import')
-rw-r--r-- | spec/features/import/manifest_import_spec.rb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/spec/features/import/manifest_import_spec.rb b/spec/features/import/manifest_import_spec.rb index 8f5416c4c27..a0bb1df6fe2 100644 --- a/spec/features/import/manifest_import_spec.rb +++ b/spec/features/import/manifest_import_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -feature 'Import multiple repositories by uploading a manifest file' do +feature 'Import multiple repositories by uploading a manifest file', :js do include Select2Helper let(:user) { create(:admin) } @@ -12,7 +12,7 @@ feature 'Import multiple repositories by uploading a manifest file' do group.add_owner(user) end - it 'parses manifest file and list repositories', :js do + it 'parses manifest file and list repositories' do visit new_import_manifest_path attach_file('manifest', Rails.root.join('spec/fixtures/aosp_manifest.xml')) @@ -21,4 +21,22 @@ feature 'Import multiple repositories by uploading a manifest file' do expect(page).to have_button('Import all repositories') expect(page).to have_content('https://android-review.googlesource.com/platform/build/blueprint') end + + it 'imports succesfully imports a project' do + visit new_import_manifest_path + + attach_file('manifest', Rails.root.join('spec/fixtures/aosp_manifest.xml')) + click_on 'Continue to the next step' + + page.within(first_row) do + click_on 'Import' + + expect(page).to have_content 'Done' + expect(page).to have_content("#{group.full_path}/build/make") + end + end + + def first_row + page.all('table.import-jobs tbody tr')[0] + end end |