Skip to content

Commit

Permalink
[ci] Move uploading _service file into previous scenario.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyukri committed Mar 23, 2016
1 parent 4bdc47b commit 4061b34
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions dist/t/spec/features/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,23 @@
expect(page).to have_content("Project 'home:Admin' was created successfully")
end

it "should be able to create a new package from OBS:Server:Unstable/build/build.spec" do
File.write("#{Dir.mktmpdir}/build.spec", Net::HTTP.get(URI.parse("https://api.opensuse.org/public/source/OBS:Server:Unstable/build/build.spec")))
it "should be able to create a new package from OBS:Server:Unstable/build/build.spec and _service files" do
dir = Dir.mktmpdir
File.write("#{dir}/build.spec", Net::HTTP.get(URI.parse("https://api.opensuse.org/public/source/OBS:Server:Unstable/build/build.spec")))
find('img[title="Create package"]').click
expect(page).to have_content("Create New Package for home:Admin")
fill_in 'name', with: 'obs-build'
find('input[name="commit"]').click #Save changes
expect(page).to have_content("Package 'obs-build' was created successfully")
find('img[title="Add file"]').click
expect(page).to have_content("Add File to")
attach_file("file", "build.spec")
attach_file("file", "#{dir}/build.spec")
find('input[name="commit"]').click #Save changes
expect(page).to have_content("Source Files")
end

it "should be able to attach _service file" do
File.write("#{Dir.mktmpdir}/_service", Net::HTTP.get(URI.parse("https://api.opensuse.org/public/source/OBS:Server:Unstable/build/_service")))
File.write("#{dir}/_service", Net::HTTP.get(URI.parse("https://api.opensuse.org/public/source/OBS:Server:Unstable/build/_service")))
find('img[title="Add file"]').click
expect(page).to have_content("Add File to")
attach_file("file", "_service")
attach_file("file", "#{dir}/_service")
find('input[name="commit"]').click #Save changes
expect(page).to have_content("Source Files")
end
Expand Down

0 comments on commit 4061b34

Please sign in to comment.