-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable Bootstrap project show to all beta users
Align the old UI with the new Bootstrap UI for specs: - Update project feature specs - Maintenance workflow feature specs - Watchlist feature specs These include fixes to existing feature specs to make them pass when testing the new bootstrap UI. Specs that can't be written for both UIs got ported to the spec/bootstrap/* directory. Fix Submit as Update link condition Co-authored-by: Björn Geuken <bgeuken@suse.de> Co-authored-by: Dany Marcoux <dmarcoux@suse.com> Co-authored-by: Eduardo Navarro <enavarro@suse.com> Co-authored-by: Victor Pereira <vpereira@suse.com>
- Loading branch information
Showing
18 changed files
with
1,633 additions
and
22 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
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
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
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
2 changes: 1 addition & 1 deletion
2
src/api/app/views/webui2/webui/project/bottom_actions/_submit_as_update.html.haml
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
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
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
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,56 @@ | ||
require 'browser_helper' | ||
|
||
RSpec.feature 'Bootstrap_Watchlists', type: :feature, js: true, vcr: true do | ||
let(:user) { create(:confirmed_user, login: 'kody') } | ||
let(:project) { create(:project, name: 'watchlist_test_project') } | ||
let(:user_with_watched_project) do | ||
other_user = create(:confirmed_user, login: 'brian') | ||
other_user.watched_projects << create(:watched_project, | ||
project: create(:project, name: "#{other_user.login}_s_watched_project")) | ||
other_user | ||
end | ||
|
||
scenario 'add projects to watchlist' do | ||
login user | ||
visit project_show_path(user.home_project) | ||
|
||
click_on('Watchlist') | ||
expect(page).to have_content('List of projects you are watching') | ||
expect(page).to have_css('a.dropdown-item.project-link', count: 0) | ||
|
||
expect(page).to have_css('#toggle-watch', text: 'Add this project to Watchlist') | ||
find('#toggle-watch').click | ||
|
||
click_on('Watchlist') | ||
expect(page).to have_css('a.dropdown-item.project-link', text: user.home_project_name) | ||
expect(page).to have_css('a.dropdown-item.project-link', count: 1) | ||
|
||
visit project_show_path(project: project.name) | ||
click_on('Watchlist') | ||
expect(page).to have_css('#toggle-watch', text: 'Add this project to Watchlist') | ||
find('#toggle-watch').click | ||
|
||
click_on('Watchlist') | ||
expect(page).to have_css('a.dropdown-item.project-link', text: user.home_project_name) | ||
expect(page).to have_css('a.dropdown-item.project-link', text: project.name) | ||
expect(page).to have_css('a.dropdown-item.project-link', count: 2) | ||
end | ||
|
||
scenario 'remove projects from watchlist' do | ||
login user_with_watched_project | ||
visit project_show_path(project: 'brian_s_watched_project') | ||
|
||
click_on('Watchlist') | ||
expect(page).to have_content('List of projects you are watching') | ||
expect(page).to have_css('a.dropdown-item.project-link', text: 'brian_s_watched_project') | ||
expect(page).to have_css('a.dropdown-item.project-link', count: 1) | ||
expect(page).to have_css('#toggle-watch', text: 'Remove this project from Watchlist') | ||
|
||
find('#toggle-watch').click | ||
|
||
visit project_show_path(project: 'brian_s_watched_project') | ||
click_on('Watchlist') | ||
expect(page).to have_css('a.dropdown-item.project-link', count: 0) | ||
expect(page).to have_css('#toggle-watch', text: 'Add this project to Watchlist') | ||
end | ||
end |
143 changes: 143 additions & 0 deletions
143
src/api/spec/cassettes/Bootstrap_Projects/branching/a_non-existing_package.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.