Commit 42a4388
authored
Group e2e tests (tldraw#7129)
Add some basic group e2e tests. There's a ton more we could add, but
went for the most basic ones for now as they do tend to be on the slow
side.
### Change type
- [x] `other`
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds end-to-end tests and fixtures for groups (CRUD, reorder, file
ops, sharing) with supporting test utilities and minor test-id/DO route
adjustments.
>
> - **E2E Tests**:
> - Add `tests/groups.spec.ts` covering group create/rename/delete,
expand/collapse persistence, reordering via drag, file
create/move/drag/pin/unpin/duplicate/delete, move-to-home, and
sharing/invitation flows with cross-user propagation.
> - **Fixtures/Helpers**:
> - New `GroupInviteDialog` fixture; register in `tla-test.ts` and
`helpers.ts`.
> - Extend `Sidebar` fixture with group operations, file operations
within groups, drag-and-drop utilities, and invite-link copy methods;
add `createGroupButton` selector.
> - `Database` fixture: add `enableGroupsFrontend()` and simplify
cleanup to hit `prepare-for-test` without legacy header.
> - Remove init-mode code from `HomePage`.
> - **App UI**:
> - Change sidebar create-group button test id to `tla-create-group` in
`TlaSidebar.tsx`.
> - **Sync Worker (test utilities)**:
> - Simplify `__test__prepareForTest`: always set `groups_backend`,
clear all user groups, and recreate home group; update
`/app/__test__/user/:userId/prepare-for-test` route accordingly.
> - **Cleanup**:
> - Remove `run-both-modes.sh` and `init-mode-verification.spec.ts`.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
18c142a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 3e7a4a6 commit 42a4388
12 files changed
Lines changed: 1046 additions & 154 deletions
File tree
- apps/dotcom
- client
- e2e
- fixtures
- tests
- src/tla/components/TlaSidebar
- sync-worker/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 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 | + | |
67 | 92 | | |
68 | 93 | | |
69 | 94 | | |
| |||
73 | 98 | | |
74 | 99 | | |
75 | 100 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 101 | | |
80 | 102 | | |
81 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 19 | | |
32 | 20 | | |
33 | 21 | | |
| |||
0 commit comments