Commit 2d1b71a
authored
feat: add routed frontend feed creation workflow (#963)
## Summary
- add hash-routed create/token/result workflow for the frontend
- remove strategy-era UI/hooks and move preview checks into
frontend-owned feed workflow state
- persist create draft state and harden access-token handling/navigation
recovery
---
This pull request refactors the frontend app's test suite to reflect
recent UI and workflow changes, focusing on a simplified
"radical-simple" feed creation flow. The strategy selection UI and logic
have been removed, token handling has moved to `sessionStorage`, and
utility actions have been consolidated. Test cases and mocks have been
updated to match these changes, and error handling and workflow state
assertions have been improved.
The most important changes are:
**Feed Creation Flow & Strategy Handling:**
- Removed all references to strategy selection from tests, including the
strategy combobox, related assertions, and mocks. Feed creation now only
requires a URL and (optionally) a token, and tests confirm that strategy
state is not persisted or exposed in the UI.
[[1]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L78-R105)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L119-R148)
[[3]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L159-R179)
[[4]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R189-R193)
[[5]](diffhunk://#diff-0f9368690552ac79a208dde6e3f09cf9f4e350e910d0de10c35dc2cc235479b1R77-R137)
**Token Management & Authentication:**
- Updated tests to use `sessionStorage` instead of `localStorage` for
access tokens, and ensured that token rejection and recovery flows work
correctly with structured error responses.
[[1]](diffhunk://#diff-0f9368690552ac79a208dde6e3f09cf9f4e350e910d0de10c35dc2cc235479b1L1-R40)
[[2]](diffhunk://#diff-0f9368690552ac79a208dde6e3f09cf9f4e350e910d0de10c35dc2cc235479b1R77-R137)
[[3]](diffhunk://#diff-0f9368690552ac79a208dde6e3f09cf9f4e350e910d0de10c35dc2cc235479b1L163-R149)
- Changed utility action from "Clear saved token" to "Logout" and
updated related assertions.
[[1]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L302-R342)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R368-L334)
**UI & Workflow State Assertions:**
- Added and updated assertions for new UI states and elements, such as
`data-state` attributes on `.form-shell` and `.result-shell`, to verify
correct workflow transitions (create, token prompt, result, etc.).
[[1]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L78-R105)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R189-R193)
[[3]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R240-R310)
- Updated link and utility button expectations to match the new UI,
including the presence of the "Bookmarklet" and "Logout" options.
[[1]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L78-R105)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R368-L334)
**Error & Warning Handling:**
- Updated test mocks and assertions to handle structured error objects
for conversion errors and preview failures, ensuring that error messages
and workflow states are surfaced correctly in the UI.
[[1]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14R240-R310)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L281-L287)
[[3]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L364-R407)
[[4]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L392-R441)
**Test Coverage & Miscellaneous:**
- Removed tests related to deprecated API metadata and strategy fallback
logic, and added/updated tests for deep linking, stale results, and
permissive URL input.
[[1]](diffhunk://#diff-0f9368690552ac79a208dde6e3f09cf9f4e350e910d0de10c35dc2cc235479b1R77-R137)
[[2]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L119-R148)
[[3]](diffhunk://#diff-1f633b86af4bf00bbb33177b2e1a51a960711d1bb9901ce853b34e53d6bd7d14L159-R179)
These changes ensure the test suite accurately reflects the streamlined
user experience and improved error handling in the updated frontend.1 parent dfca027 commit 2d1b71a
23 files changed
Lines changed: 1933 additions & 2351 deletions
File tree
- frontend
- e2e
- src
- __tests__
- mocks
- api
- components
- hooks
- routes
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | | - | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 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 | + | |
| 37 | + | |
13 | 38 | | |
14 | | - | |
15 | | - | |
| 39 | + | |
| 40 | + | |
16 | 41 | | |
17 | 42 | | |
18 | 43 | | |
| |||
27 | 52 | | |
28 | 53 | | |
29 | 54 | | |
30 | | - | |
| 55 | + | |
| 56 | + | |
31 | 57 | | |
32 | 58 | | |
33 | | - | |
| 59 | + | |
34 | 60 | | |
35 | 61 | | |
36 | 62 | | |
| |||
48 | 74 | | |
49 | 75 | | |
50 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
51 | 91 | | |
52 | 92 | | |
53 | 93 | | |
54 | 94 | | |
55 | 95 | | |
56 | | - | |
57 | 96 | | |
58 | | - | |
| 97 | + | |
59 | 98 | | |
| 99 | + | |
60 | 100 | | |
61 | 101 | | |
62 | 102 | | |
63 | | - | |
64 | 103 | | |
65 | 104 | | |
66 | 105 | | |
67 | 106 | | |
68 | 107 | | |
| 108 | + | |
69 | 109 | | |
70 | 110 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | 111 | | |
77 | | - | |
78 | 112 | | |
79 | | - | |
80 | 113 | | |
| 114 | + | |
81 | 115 | | |
82 | 116 | | |
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 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 117 | + | |
142 | 118 | | |
143 | 119 | | |
144 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
145 | 131 | | |
146 | 132 | | |
147 | 133 | | |
148 | 134 | | |
149 | 135 | | |
150 | | - | |
151 | 136 | | |
152 | | - | |
| 137 | + | |
153 | 138 | | |
154 | 139 | | |
155 | 140 | | |
| |||
160 | 145 | | |
161 | 146 | | |
162 | 147 | | |
163 | | - | |
164 | | - | |
| 148 | + | |
| 149 | + | |
165 | 150 | | |
166 | 151 | | |
0 commit comments