show found submissions when searching on templates

This commit is contained in:
Alex Turchyn authored and Pete Matsyburka committed 2025-06-19 12:05:43 +03:00
1 parent 6f0e7c0ca8
commit 36331bb993
4 files changed
+51 -10

No files matched your search

+13
View File
@@ -49,5 +49,18 @@ RSpec.describe 'Dashboard Page' do
expect(page).to have_current_path(edit_template_path(Template.last), ignore_query: true)
end
end
it 'searches be submitter email' do
submission = create(:submission, :with_submitters, template: templates[0])
submitter = submission.submitters.first
SearchEntries.reindex_all
visit root_path(q: submitter.email)
expect(page).to have_content('Templates not Found')
expect(page).to have_content('Submissions')
expect(page).to have_content(submitter.name)
end
end
end