Skip to content

Commit

Permalink
Add email_sent event
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Dec 5, 2019
1 parent a339788 commit 628c7b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pre {
padding: 1em;
}

.App-header h1 {
.App-header h1, .App-header h1 span {
padding: 0.5em 0 0.5em 0;
margin: 0;
font-size: 20px;
font-size: 24px;
}

.App-source {
Expand Down
16 changes: 16 additions & 0 deletions src/components/TimelineEvent.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ it('renders appropriate summary for different event types', () => {
},
summary: "⚠️ I'm an error"
},
{
event: {
type: "email_created",
subject: "Hi there",
addresses: ["bob@nyaruka.com", "jim@nyaruka.com"]
},
summary: "✉️ email sent to bob@nyaruka.com, jim@nyaruka.com"
},
{
event: {
type: "email_sent",
subject: "Hi there",
to: ["bob@nyaruka.com", "jim@nyaruka.com"]
},
summary: "✉️ email sent to bob@nyaruka.com, jim@nyaruka.com with subject Hi there"
},
{
event: {
type: "failure",
Expand Down
2 changes: 2 additions & 0 deletions src/components/TimelineEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ export class TimelineEvent extends React.Component<Props, State> {
return ["☎️", <>URNs changed to {renderValList(event.urns)}</>];
case "email_created":
return ["✉️", <>email sent to {renderValList(event.addresses)}</>];
case "email_sent":
return ["✉️", <>email sent to {renderValList(event.to)} with subject <i>{event.subject}</i></>];
case "environment_refreshed":
return ["⚙️", <>environment refreshed on resume</>];
case "error":
Expand Down

0 comments on commit 628c7b5

Please sign in to comment.