Commit 5feb36e
committed
test(e2e): strengthen mod happy-path test to cover the full clone flow
The previous version of this test verified `exitCode === 0` and that a
slug-prefix directory existed with a `package.json`. That assertion
would pass even if `dot mod` invented an arbitrary `package.json` from
thin air and silently skipped both setup.sh and the side effects of
the source-download step.
`dot mod`'s flow has three steps (see src/commands/mod/SetupScreen.tsx):
1. fetch app metadata
2. download source — extract tarball + writeDotJson + ignoreModLogs
+ stripPostinstall + createOptionalGitBaseline
3. run setup.sh (or warn if absent)
Steps 2's side effects and step 3 weren't observed at all. Strengthen
the test to assert on:
- multiple specific files from the upstream paritytech/Rock-Paper-
Scissors fixture (README.md, setup.sh, src/, vite.config.ts) — proves
the GitHub tarball was actually fetched and extracted, not invented.
- dot.json was written with the expected `domain` (relative slug-suffix
path, per writeDotJson()) and `name` fields.
- .gitignore contains the mod-log entries appended by ignoreModLogs().
- .dot-mod-setup.log exists with `[setup]`-prefixed content from the
fixture's setup.sh — proves step 3 ran, not just that the file was
copied across.
Bumped the per-test timeout 180s → 240s to give setup.sh's `npm
install` enough headroom on a cold cache. Same fixture, no new
registration needed.1 parent 1dee469 commit 5feb36e
1 file changed
Lines changed: 59 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
59 | 112 | | |
60 | 113 | | |
61 | 114 | | |
| |||
0 commit comments