Skip to content

Commit

Permalink
Correct the feature test picking the project in the filter
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp-work committed Jun 3, 2024
1 parent e994f0c commit ff83f6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
%h6.px-3.py-2
%b Projects
.dropdown.px-3.py-1.form-multi-select{ 'data-name': 'projects' }
%button.form-select.text-start{ type: 'button', data: { 'bs-toggle': 'dropdown' } }
%button.form-select.text-start#filter-projects-button{ type: 'button', data: { 'bs-toggle': 'dropdown' } }
Select the projects
.dropdown-menu
- @projects_for_filter.each do |project_name|
Expand All @@ -89,7 +89,7 @@
%h6.px-3.py-2
%b Groups
.dropdown.px-3.py-1.form-multi-select{ 'data-name': 'groups' }
%button.form-select.text-start{ type: 'button', data: { 'bs-toggle': 'dropdown' } }
%button.form-select.text-start#filter-groups-button{ type: 'button', data: { 'bs-toggle': 'dropdown' } }
Select the groups
.dropdown-menu
- @groups_for_filter.each do |group_title|
Expand Down
8 changes: 7 additions & 1 deletion src/api/spec/features/webui/users/notifications_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,19 @@
visit my_notifications_path
end

# rubocop:disable RSpec/ExampleLength
it 'shows all unread project notifications' do
find_by_id('notifications-dropdown-trigger').click if mobile? # open the filter dropdown
within('#filters') { check(project.name) }
within('#filters') do
click_button('filter-projects-button') # open the filter
check(project.name)
click_button('filter-projects-button') # close the filter
end
click_button('filter-button') # apply the filters

expect(page).to have_text(notification_for_projects_comment.notifiable.commentable_type)
end
# rubocop:enable RSpec/ExampleLength
end

context 'when having less notifications than the maximum per page' do
Expand Down

0 comments on commit ff83f6c

Please sign in to comment.