Skip to content
Snippets Groups Projects
Unverified Commit b561b011 authored by Ngoc Khuat's avatar Ngoc Khuat Committed by GitHub
Browse files

Add inbox as testing context to debug flaky pulse tests (#43570)

parent 44fb3171
No related branches found
No related tags found
No related merge requests found
......@@ -394,15 +394,16 @@
:assert
{:email
(fn [_ _]
(is (= (into {} (map (fn [user-kwd]
(mt/email-to user-kwd {:subject "Pulse: Pulse Name"
:bcc #{"rasta@metabase.com" "crowberto@metabase.com"}
:body [{"Pulse Name" true}
pulse.test-util/png-attachment
pulse.test-util/png-attachment]
:bcc? true}))
[:rasta :crowberto]))
(mt/summarize-multipart-email #"Pulse Name"))))}})))
(testing @mt/inbox
(is (= (into {} (map (fn [user-kwd]
(mt/email-to user-kwd {:subject "Pulse: Pulse Name"
:bcc #{"rasta@metabase.com" "crowberto@metabase.com"}
:body [{"Pulse Name" true}
pulse.test-util/png-attachment
pulse.test-util/png-attachment]
:bcc? true}))
[:rasta :crowberto]))
(mt/summarize-multipart-email #"Pulse Name")))))}})))
(deftest two-cards-in-one-pulse-test
(testing "1 pulse that has 2 cards, should contain two query image attachments (as well as an icon attachment)"
......@@ -618,9 +619,10 @@
:assert
{:email
(fn [_ _]
(is (= (rasta-alert-email "Alert: Test card has reached its goal"
[test-card-result pulse.test-util/png-attachment pulse.test-util/png-attachment])
(mt/summarize-multipart-email test-card-regex))))}})))
(testing @mt/inbox
(is (= (rasta-alert-email "Alert: Test card has reached its goal"
[test-card-result pulse.test-util/png-attachment pulse.test-util/png-attachment])
(mt/summarize-multipart-email test-card-regex)))))}})))
(deftest below-goal-alert-test
(testing "Below goal alert"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment