Commit e0b4d63
authored
Fix Aspire AppHost not building email templates before APIs become ready (#886)
### Summary & Motivation
After the localized-emails feature merged to main, starting Aspire on a
fresh clone (or any environment without a populated
`application/account/WebApp/emails/dist/` folder) returned HTTP 500 from
every email-sending endpoint with `System.IO.FileNotFoundException:
Email template 'StartSignup.en-US.html' not found`. The crash cascaded
through 11 of 14 e2e smoke tests. The dist folder is a gitignored build
artifact only populated by the `@repo/emails#build` turbo task; nothing
in the dev pipeline triggered that task before the AppGateway accepted
requests.
- Add `@repo/emails#build` to `dev:setup`'s `dependsOn` in
`application/turbo.json`. The Aspire AppHost's `frontendBuild` resource
runs `npm start` → `turbo dev`, and `dev` depends on `dev:setup`.
Hooking `@repo/emails#build` into `dev:setup` makes turbo block every
package's dev server until the email dist exists. The same flow protects
every entry point that funnels through `turbo dev` — `pp restart`, `pp
run`, `pp e2e`, `dotnet run --project AppHost`, and any IDE-launched
AppHost.
- Update the UnknownUser e2e assertions in
`application/account/WebApp/tests/e2e/localized-email-flows.spec.ts` to
match the Slack-style copy the email template was rewritten to use ("No
account found" / "Is this the right email address?" in English, "Ingen
konto fundet" / "Er det den rigtige e-mailadresse?" in Danish). The
previous strings ("Unknown user tried to login to PlatformPlatform" /
"You or someone else tried to login to PlatformPlatform") no longer
exist in the rendered emails.
### Checklist
- [x] I have added tests, or done manual regression tests
- [x] I have updated the documentation, if necessary2 files changed
Lines changed: 7 additions & 7 deletions
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
| 241 | + | |
| 242 | + | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
| 264 | + | |
| 265 | + | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
0 commit comments