show found submissions when searching on templates

This commit is contained in:
Alex Turchyn
2025-06-14 00:05:36 +03:00
committed by Pete Matsyburka
parent 6f0e7c0ca8
commit 36331bb993
4 changed files with 51 additions and 10 deletions
+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