Commit df66ffd
authored
chore(gen2-migration): e2e fixes (#14771)
* refactor(amplify-gen2-migration-e2e-system): auto-sanitize snapshots and add gen2-migration skill
Move sanitize and snapshot capture logic into the e2e-system
package so that sanitization runs automatically as part of the
E2E flow. Simplify the migration-apps sanitize.ts and snapshot.ts
to delegate to the shared implementation.
Add a gen2-migration development skill with context references
and a development loop for bug fixes and new features.
Minor fixes to gitignore generator and refactor output directory.
---
Prompt: we are working on the gen2-migration skill and e2e
snapshot capture improvements
* docs: refine gen2-migration skill and add E2E step to app workflows
Streamline the gen2-migration skill with structured Context and
Development Loop sections covering bug fix and feature workflows.
Add missing E2E snapshot capture step to "Adding an App" and
"Modifying an App" sections in the migration apps README.
---
Prompt: refine the gen2-migration skill and fix missing E2E step
in migration apps README
* refactor(amplify-gen2-migration-e2e-system): simplify App class
Remove git wrapper methods and call this.git.* directly. Move
migrate() next to the other migration methods. Reorganize class
sections (Tests, Hooks). Filter updateSnapshots to only copy
_snapshot directories.
---
Prompt: commit
* chore: add deploy scripts, fix docs, update PR template
Add deploy npm script to all migration apps. Fix snapshot.ts
usage string and README to match new argument signature. Add
JSDoc to new public members. Update PR template headings to h3.
Update AGENTS.md PR body instructions with grouping guidance.
---
Prompt: add deploy script to all apps, check for outdated
docstrings, update PR template and AGENTS.md
* feat(amplify-gen2-migration-e2e-system): add shared-data validation to e2e refactor flow
Add cross-generation data validation tests that verify stateful
resources (Cognito, AppSync/DynamoDB, S3) are correctly shared
between gen1 and gen2 after migration refactor.
Changes:
- New shared-data.test.ts for discussions app that tests both
gen1→gen2 and gen2→gen1 data access for auth, API, activity
tables, and storage.
- Generalize post-refactor script: extract addTableNameToTable
helper, add bookmarks table support, add uncommentS3BucketName.
- Make configureAmplify() lazy so tests can switch between gen1
and gen2 configs at runtime.
- Propagate ENV_NAME env var from e2e system to migration scripts
instead of using default parameter values.
- Add testSharedData step to the e2e deploy phase.
- Make Git.run public so App can cherry-pick files across branches.
---
Prompt: commit everything
* chore(amplify-gen2-migration-e2e-system): add test:shared-data script to all migration apps
Add a no-op test:shared-data script ("true") to every migration app
that doesn't already have one. This ensures the e2e system can
uniformly call the script across all apps without failures. Real
tests will be added per-app later.
---
Prompt: Add a "test:shared-data" script to all migration apps,
have it just be "true" for now, we'll add tests later.
* docs(amplify-gen2-migration-e2e-system): improve skill and app workflow docs
Update gen2-migration SKILL.md to clarify snapshot directory
inspection and to guide the agent to check for existing test app
coverage before fixing a bug. Update amplify-migration-apps
README.md to include validation test steps when adding or
modifying apps, and note that E2E failures require fixing the
bug before snapshots can be captured.
---
Prompt: made more changes. commit.
* feat(amplify-gen2-migration-e2e-system): add mood-board post-push hook and analytics test
Add post-push.ts for mood-board that updates KINESIS_STREAM_NAME
in src/constants.ts to match the deployed environment. Add a
Kinesis record/read test in analytics.test.ts that writes events
and polls getKinesisEvents to verify at least one is readable.
Move the getKinesisEvents parseable JSON test from analytics to
api.test.ts. Fix env name generation to always use length 10.
---
Prompt: made more changes. commit everything.1 parent 3daee12 commit df66ffd
25 files changed
Lines changed: 477 additions & 56 deletions
File tree
- .kiro/skills/gen2-migration
- amplify-migration-apps
- backend-only
- discussions
- migration
- tests
- fitness-tracker
- imported-resources
- media-vault
- mood-board
- migration
- tests
- product-catalog
- project-boards
- store-locator
- packages/amplify-gen2-migration-e2e-system/src/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | | - | |
60 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
301 | | - | |
302 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
308 | 313 | | |
309 | 314 | | |
310 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
311 | 318 | | |
312 | 319 | | |
313 | 320 | | |
314 | 321 | | |
315 | | - | |
316 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
317 | 326 | | |
318 | 327 | | |
319 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 37 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
17 | | - | |
| 23 | + | |
18 | 24 | | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | | - | |
21 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
22 | 32 | | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
26 | 36 | | |
27 | | - | |
28 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
29 | 53 | | |
30 | 54 | | |
31 | 55 | | |
32 | | - | |
33 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
34 | 61 | | |
35 | 62 | | |
36 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
0 commit comments