Skip to content

Commit 36c7904

Browse files
committed
Add token to form data
1 parent d13cd8b commit 36c7904

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

src/features/account/LinkedProviders.test.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ describe('LinkedProviders Component', () => {
144144
expect(screen.getByTestId('linkForm')).toBeInTheDocument();
145145
});
146146

147+
it('includes token input field in the link form', () => {
148+
render(<LinkedProviders />, { wrapper: TestWrapper });
149+
150+
const tokenInput = screen.getByTestId('token');
151+
expect(tokenInput).toBeInTheDocument();
152+
expect(tokenInput).toHaveAttribute('name', 'token');
153+
expect(tokenInput).toHaveAttribute('value', 'test-token');
154+
expect(tokenInput).toHaveAttribute('hidden');
155+
expect(tokenInput).toHaveAttribute('readOnly');
156+
});
157+
147158
it('handles link provider continuation flow', async () => {
148159
const mockLinkChoice = {
149160
provider: 'Google',

src/features/account/LinkedProviders.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,13 @@ export const LinkedProviders: FC<{ isContinueRoute?: boolean }> = ({
155155
value={redirectUrl.toString()}
156156
data-testid="redirecturl"
157157
/>
158+
<input
159+
readOnly
160+
hidden
161+
name="token"
162+
value={token.toString()}
163+
data-testid="token"
164+
/>
158165
</form>
159166
</Paper>
160167
</Stack>

0 commit comments

Comments
 (0)