@@ -522,11 +522,11 @@ function renderDefault(): string {
522522}
523523
524524describe ( 'renderLoginPage email form readiness gate' , ( ) => {
525- it ( 'renders the email OTP form as not ready until JavaScript enables it ' , ( ) => {
525+ it ( 'renders the email OTP form without a readiness dataset marker ' , ( ) => {
526526 const html = renderDefault ( )
527- expect ( html ) . toContain (
528- '<form id="form-send-otp" data-epds-login-ready="false">' ,
529- )
527+ expect ( html ) . toContain ( '<form id="form-send-otp">' )
528+ expect ( html ) . not . toContain ( ' data-epds-login-ready' )
529+ expect ( html ) . not . toContain ( 'epdsLoginReady' )
530530 } )
531531
532532 it ( 'renders the email submit button disabled with the existing label' , ( ) => {
@@ -536,17 +536,13 @@ describe('renderLoginPage email form readiness gate', () => {
536536 )
537537 } )
538538
539- it ( 'marks the form ready and enables the button after handler setup' , ( ) => {
539+ it ( 'enables the button after handler setup' , ( ) => {
540540 const html = renderDefault ( )
541541 const lastHandlerIdx = html . lastIndexOf ( "addEventListener('click'" )
542- const readyIdx = html . indexOf (
543- "sendOtpForm.dataset.epdsLoginReady = 'true';" ,
544- )
545- const enableIdx = html . indexOf ( 'sendOtpBtn.disabled = false;' , readyIdx )
542+ const enableIdx = html . indexOf ( 'sendOtpBtn.disabled = false;' )
546543
547544 expect ( lastHandlerIdx ) . toBeGreaterThan ( 0 )
548- expect ( readyIdx ) . toBeGreaterThan ( lastHandlerIdx )
549- expect ( enableIdx ) . toBeGreaterThan ( readyIdx )
545+ expect ( enableIdx ) . toBeGreaterThan ( lastHandlerIdx )
550546 } )
551547
552548 it ( 'does not use a blind timeout for readiness' , ( ) => {
0 commit comments