Skip to content

Commit

Permalink
Test add repository from distribution
Browse files Browse the repository at this point in the history
Skip old test as it is included in this one.

Co-authored-by: David Kang <dkang@suse.com>
  • Loading branch information
Ana06 and DavidKang committed Dec 10, 2018
1 parent a7bdc59 commit 28b7eee
Show file tree
Hide file tree
Showing 3 changed files with 696 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/api/spec/bootstrap/features/webui/repositories_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@
include_examples 'bootstrap tests for sections with flag tables'
end

describe 'Repositories' do
before do
login admin_user
end

scenario 'add repository from distribution' do
# Create interconnect
visit(repositories_distributions_path(project: admin_user.home_project))
click_button('Save changes')

visit(repositories_distributions_path(project: admin_user.home_project))
find("label[for='repo_openSUSE_Tumbleweed']").click
expect(page).to have_text("Successfully added repository 'openSUSE_Tumbleweed'")

visit(project_repositories_path(project: admin_user.home_project))

expect(page).to have_css('.repository-card')

within '.repository-card' do
expect(page).to have_link('openSUSE_Tumbleweed')
expect(page).to have_link('Edit Repository')
expect(page).to have_link('Add Repository Path')
expect(page).to have_link('Download Repository')
expect(page).to have_link('Delete Repository')
# Repository path
expect(page).to have_text('openSUSE.org/snapshot')
end
end
end

describe 'DoD Repositories' do
let(:project_with_dod_repo) { create(:project) }
let(:repository) { create(:repository, project: project_with_dod_repo) }
Expand Down

0 comments on commit 28b7eee

Please sign in to comment.