Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3bd191
commit c3a6033
Showing
5 changed files
with
104 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe "Package" do | ||
before(:context) do | ||
login | ||
end | ||
|
||
after(:context) do | ||
logout | ||
end | ||
|
||
it "should be able to create new" do | ||
within("div#subheader") do | ||
click_link('Home Project') | ||
end | ||
click_link('Create package') | ||
fill_in 'name', with: 'ctris' | ||
fill_in 'title', with: 'ctris' | ||
fill_in 'description', with: 'ctris' | ||
click_button('Save changes') | ||
expect(page).to have_content("Package 'ctris' was created successfully") | ||
end | ||
|
||
it "should be able to upload files" do | ||
within("div#subheader") do | ||
click_link('Home Project') | ||
end | ||
click_link('ctris') | ||
click_link('Add file') | ||
attach_file("file", File.expand_path('../../fixtures/ctris.spec', __FILE__)) | ||
click_button('Save changes') | ||
expect(page).to have_content("The file 'ctris.spec' has been successfully saved.") | ||
|
||
# second line of defense ;-) | ||
click_link('Add file') | ||
attach_file("file", File.expand_path('../../fixtures/ctris-0.42.tar.bz2', __FILE__)) | ||
click_button('Save changes') | ||
expect(page).to have_content("The file 'ctris-0.42.tar.bz2' has been successfully saved.") | ||
end | ||
|
||
it "should be able to branch" do | ||
within("div#subheader") do | ||
click_link('Home Project') | ||
end | ||
click_link('Branch existing package') | ||
fill_in 'linked_project', with: 'openSUSE.org:OBS:Server:Unstable' | ||
fill_in 'linked_package', with: 'build' | ||
# Do not wait for autocomplete | ||
page.execute_script("$('input[type=\"submit\"]').prop('disabled', false)") | ||
click_button('Create Branch') | ||
expect(page).to have_content('Successfully branched package') | ||
end | ||
|
||
it 'should be able to delete' do | ||
click_link('Delete package') | ||
expect(page).to have_content('Do you really want to delete this package?') | ||
click_button('Ok') | ||
expect(page).to have_content('Package was successfully removed.') | ||
end | ||
|
||
it "should be able to successfully build" do | ||
100.downto(1) do |counter| | ||
visit("/package/show/home:Admin/ctris") | ||
# wait for the build results ajax call | ||
sleep(5) | ||
puts "Refreshed build results, #{counter} retries left." | ||
succeed_build = page.all('td', class: 'status_succeeded') | ||
if succeed_build.length == 1 | ||
break | ||
end | ||
end | ||
end | ||
end |
74 changes: 0 additions & 74 deletions
74
dist/t/spec/features/0040_prepare_package_building_spec.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Name: ctris | ||
Summary: Console based tetris clone | ||
URL: http://www.hackl.dhs.org/ctris/ | ||
Group: Amusements/Games/Action/Arcade | ||
License: GPL | ||
Version: 0.42 | ||
Release: 1 | ||
Source0: %{name}-%{version}.tar.bz2 | ||
BuildRequires: ncurses-devel | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-build | ||
|
||
%description | ||
ctris is a colorized, small and flexible Tetris(TM)-clone for the console. Go play! | ||
|
||
%prep | ||
%setup -q | ||
|
||
%build | ||
make CFLAGS="$RPM_OPT_FLAGS" | ||
|
||
%install | ||
make install DESTDIR=$RPM_BUILD_ROOT | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT; | ||
|
||
%files | ||
%defattr (-,root,root) | ||
%doc AUTHORS COPYING README TODO | ||
%doc %{_mandir}/man6/ctris.6.gz | ||
/usr/games/ctris |