Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide 1-click install option #1110

Open
apinter opened this issue Dec 3, 2021 · 0 comments
Open

Hide 1-click install option #1110

apinter opened this issue Dec 3, 2021 · 0 comments

Comments

@apinter
Copy link

apinter commented Dec 3, 2021

Hi,

Didn't want to make a PR with this after reading the contribution guidelines so I open an issue first to avoid violating those.
The 1-click install button can cause quite some issues on systems by adding repos that are not required or adding a repo that is already present or adding the wrong repo. I can't fix the behavior, but I think I was able to hide the button until someone comes along who has the knowledge I lack: https://github.com/apinter/software-o-o/tree/1-click-hide. My goal is to not cause issues to users who use this method to install a package from OBS.
I simply commented out the button in app/views/package/_download_rows.html.erb, which hopefully does the trick, but I have less than limited knowledge of Ruby dev.

Disclaimer 1: I don't have an OBS API key so I couldn't visually clarify that this actually works nice, and can only rely the unit tests below.
Disclaimer 2: Again, I have no idea what am I doing, but eager to help. Dangerous combo so.. Don't hold back ^_^

Test results:

--- git/1-click-remove ‹1-click-hide› » bundle exec rails test                        

WARNING: `Faraday::Connection#basic_auth` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:basic_auth, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.
Run options: --seed 2823

# Running:

....................

Finished in 6.668573s, 2.9991 runs/s, 7.7978 assertions/s.
20 runs, 52 assertions, 0 failures, 0 errors, 0 skips

Had some issues here, and also the link to FF headless mode is not loading the desired content:

--- git/1-click-remove ‹1-click-hide› » bundle exec rails test:system

WARNING: `Faraday::Connection#basic_auth` is deprecated; it will be removed in version 2.0.
While initializing your connection, use `#request(:basic_auth, ...)` instead.
See https://lostisland.github.io/faraday/middleware/authentication for more usage info.
Run options: --seed 25687

# Running:

Capybara starting Puma...
* Version 5.5.0 , codename: Zawgyi
* Min threads: 0, max threads: 4
* Listening on http://127.0.0.1:32971
[Screenshot]: tmp/screenshots/failures_test_package_information.png
E

Error:
PackageInformationTest#test_package_information:
Capybara::ExpectationNotMet: expected to find text "Multiprotocol Instant Messaging Client" in "Software\nDownload\nDocumentation\nWiki\nForums\nALL Distributions\nopenSUSE Tumbleweed\nopenSUSE Leap 15.2\nopenSUSE Leap 15.1\nopenSUSE Leap 15.1 ARM\nopenSUSE Leap 15.1 PowerPC\nopenSUSE Factory ARM\nopenSUSE Factory PowerPC\nopenSUSE Factory zSystems\nopenSUSE Backports for SLE 15 SP1\nopenSUSE Backports for SLE 15\nopenSUSE Backports for SLE 12 SP5\nopenSUSE Backports for SLE 12 SP4\nopenSUSE Backports for SLE 12 SP3\nopenSUSE Backports for SLE 12 SP2\nopenSUSE Backports for SLE 12 SP1\nopenSUSE Backports for SLE 12 SP0\nSUSE SLE-15-SP1\nSUSE SLE-15\nSUSE SLE-12-SP5\nSUSE SLE-12-SP4\nSUSE SLE-12-SP3\nSUSE SLE-12-SP2\nSUSE SLE-12-SP1\nSUSE SLE-12\nSUSE SLE-11 SP 4\nSUSE SLE-10\nArch Extra\nArch Community\nRaspbian 10\nRaspbian 9.0\nDebian Unstable\nDebian Testing\nDebian 10\nDebian 9.0\nDebian 8.0\nDebian 7.0\nFedora Rawhide (unstable)\nFedora 32\nFedora 31\nFedora 30\nFedora 29\nScientificLinux 7\nScientificLinux 6\nRedHat RHEL-7\nRedHat RHEL-6\nRedHat RHEL-5\nCentOS CentOS-8-Stream\nCentOS CentOS-8\nCentOS CentOS-7\nCentOS CentOS-6\nUbuntu 20.04\nUbuntu 19.10\nUbuntu 19.04\nUbuntu 18.04\nUbuntu 16.04\nUbuntu 14.04\nUnivention UCS 4.4\nUnivention UCS 4.3\nUnivention UCS 4.2\nUnivention UCS 4.1\nUnivention UCS 4.0\nMageia Cauldron (unstable)\nMageia 7\nMageia 6\nUnivention UCS 3.2\nIBM PowerKVM 3.1\nAppImage\nSearch\n/home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:54: syntax error, unexpected local variable or method, expecting => ...package: @pkgname), class: 'btn btn-sm btn-secondary' do @ou... ... ^~~ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:54: syntax error, unexpected local variable or method, expecting `do' or '{' or '(' ...kgname), class: 'btn btn-sm btn-secondary' do @output_buffer... ... ^~~ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:54: syntax error, unexpected string literal, expecting `do' or '{' or '(' ...ass: 'btn btn-sm btn-secondary' do @output_buffer.safe_appen... ... ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:55: syntax error, unexpected '<', expecting `end' <span class=\"typcn typcn-downl... ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:55: syntax error, unexpected '<' ...typcn typcn-download-outline\"></span> ... ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:59: unknown regexp options - dv </div><!-- /.col- --> ^~~~ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:59: syntax error, unexpected '<' </div><!-- /.col- --> ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:60: unknown regexp options - dv </div><!-- /.card-body --> ^~~~ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:60: syntax error, unexpected '<' </div><!-- /.card-body --> ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:61: unknown regexp options - dv </div><!-- /.card --> ^~~~ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:61: syntax error, unexpected '<' </div><!-- /.card --> ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:66: unterminated regexp meets end of file end ^ /home/apinter/Project/git/1-click-remove/app/views/package/_download_rows.html.erb:66: syntax error, unexpected end-of-input, expecting `end'\nDevelopers\nDocumentation\nBuild service\nBugzilla\nGithub\nInformation\nNews\nRelease notes\nEvents\nPlanet\nShop\nCommunity\nForums\nConnect\nFacebook group\nMail lists\nIRC channels\nSocial Media\nFacebook\nTwitter\nYouTube\nTelegram\n© 2011–2021 openSUSE contributors\nContribute!\nReport Bugs\nLanguage\nEnglish"
    test/system/package_information_test.rb:10:in `block in test_package_information'
    test/system/package_information_test.rb:7:in `test_package_information'


bin/rails test test/system/package_information_test.rb:6

....

Finished in 11.488342s, 0.4352 runs/s, 0.0000 assertions/s.
5 runs, 0 assertions, 0 failures, 1 errors, 0 skips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant