-
Notifications
You must be signed in to change notification settings - Fork 6
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
GO-83 Save templates MessageDraft content to HTML visualization in order to be searchable #479
Merged
luciajanikova
merged 3 commits into
main
from
GO-83/index_template_message_drafts_content
Oct 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ draft_two: | |
message_object: ssd_main_general_draft_two_form | ||
blob: <GeneralAgenda xmlns="http://schemas.gov.sk/form/App.GeneralAgenda/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><subject>predmet</subject><text>text</text></GeneralAgenda> | ||
|
||
empty_draft: | ||
message_object: ssd_main_empty_draft_form | ||
blob: <GeneralAgenda xmlns="http://schemas.gov.sk/form/App.GeneralAgenda/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><subject></subject><text></text></GeneralAgenda> | ||
|
||
fs_one: | ||
message_object: ssd_main_fs_one_form | ||
blob: <n0:ElectronicOfficialDocument xmlns:n0="http://schemas.gov.sk/form/42499500.FS_EUD_v1_0.sk/1.6"> <n0:Sender> <n0:PersonData> <n0:CorporateBody> <n0:FinancialAdministrationAuthority>Daňový úrad Bratislava</n0:FinancialAdministrationAuthority> </n0:CorporateBody> <n0:PhysicalAddress> <n0:AddressLine>Ševčenkova 32, 850 00 Bratislava</n0:AddressLine> </n0:PhysicalAddress> </n0:PersonData> </n0:Sender> <n0:Document> <n0:DocumentReference>000000000/2022</n0:DocumentReference> <n0:ContactPerson>Mgr. X Y</n0:ContactPerson> <n0:PhoneNumber>02/00000000</n0:PhoneNumber> <n0:EmailAddress>[email protected]</n0:EmailAddress> <n0:IssuePlace>Bratislava</n0:IssuePlace> <n0:IssueDate>2022-04-19</n0:IssueDate> <n0:Subject>Rozhodnutie</n0:Subject> </n0:Document></n0:ElectronicOfficialDocument> |
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
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 |
---|---|---|
@@ -1,6 +1,59 @@ | ||
require "application_system_test_case" | ||
|
||
class MessageDraftsTest < ApplicationSystemTestCase | ||
setup do | ||
Searchable::MessageThread.reindex_all | ||
|
||
silence_warnings do | ||
@old_value = MessageThreadCollection.const_get("PER_PAGE") | ||
MessageThreadCollection.const_set("PER_PAGE", 1) | ||
end | ||
|
||
sign_in_as(:basic) | ||
end | ||
|
||
teardown do | ||
silence_warnings do | ||
MessageThreadCollection.const_set("PER_PAGE", @old_value) | ||
end | ||
end | ||
|
||
test "user can create message draft as reply on replyable message" do | ||
end | ||
|
||
test "templated message draft content is searchable" do | ||
message = messages(:ssd_main_empty_draft) | ||
thread = message_threads(:ssd_main_empty_draft) | ||
|
||
visit message_thread_path thread | ||
|
||
within "#body_upvs_message_draft_#{message.id}_form" do | ||
fill_in "message_draft_Text", with: "Pozdrav zo Slovensko.Digital! :)" | ||
fill_in "message_draft_Predmet", with: "Pozdravovacia sprava" | ||
end | ||
|
||
assert_text "Zmeny boli uložené" | ||
|
||
GoodJob.perform_inline | ||
|
||
# Search the draft content keywords | ||
visit message_threads_path | ||
|
||
assert_no_selector "#next_page_area" | ||
|
||
fill_in "search", with: "Slovensko.Digital" | ||
find("#search").send_keys(:enter) | ||
|
||
assert_no_selector "#next_page_area" | ||
|
||
thread_general = message_threads(:ssd_main_general) | ||
thread_issue = message_threads(:ssd_main_issue) | ||
|
||
within_thread_in_listing(thread) do | ||
assert_text "Slovensko.Digital" | ||
end | ||
|
||
refute_selector(thread_in_listing_selector(thread_general)) | ||
refute_selector(thread_in_listing_selector(thread_issue)) | ||
end | ||
end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Toto mi pride podozrive. preco sa to nedeje v tom build_message_from_template?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pravda, nebolo to tuto spravne, presunula som.