Skip to content

Commit 8cbeb10

Browse files
committed
test(ui): Assert webauthn autocomplete in the mocked passkey autofill test
1 parent 5f02b5e commit 8cbeb10

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

‎packages/ui/src/components/SignIn/__tests__/SignInStart.test.tsx‎

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -162,25 +162,6 @@ describe('SignInStart', () => {
162162
screen.getByText('Use passkey instead');
163163
});
164164

165-
it('puts webauthn after the field name when passkey autofill is on', async () => {
166-
const { wrapper } = await createFixtures(f => {
167-
f.withEmailAddress();
168-
f.withPasskey();
169-
f.withPasskeySettings({
170-
allow_autofill: true,
171-
show_sign_in_button: false,
172-
});
173-
});
174-
175-
render(<SignInStart />, { wrapper });
176-
await waitFor(() => {
177-
expect(screen.getByRole('textbox', { name: /email address/i })).toHaveAttribute(
178-
'autocomplete',
179-
'email webauthn',
180-
);
181-
});
182-
});
183-
184165
it('enables login with passkey via autofill', async () => {
185166
const { wrapper, fixtures } = await createFixtures(f => {
186167
f.withEmailAddress();
@@ -202,6 +183,10 @@ describe('SignInStart', () => {
202183
flow: 'autofill',
203184
});
204185
});
186+
expect(screen.getByRole('textbox', { name: /email address/i })).toHaveAttribute(
187+
'autocomplete',
188+
'email webauthn',
189+
);
205190
});
206191

207192
it('does not display related-origin errors from passkey autofill', async () => {

0 commit comments

Comments
 (0)