@@ -249,6 +249,18 @@ private function interpretAuthenticatedResponse(string $body, string $finalUrl,
249249 ];
250250 }
251251
252+ // The same checkup, but served with only a client-rendered form carrying no
253+ // named inputs. There is nothing to post back, so it cannot be dismissed from
254+ // here; report it distinctly so the caller can skip rather than fail on what is
255+ // account state rather than a regression.
256+ if (GitHubHtml ::isTwoFactorCheckupPage ($ selector , $ finalUrl )) {
257+ return [
258+ 'status ' => 'two_factor_checkup_blocked ' ,
259+ 'checkup_url ' => $ finalUrl ,
260+ 'body ' => $ body ,
261+ ];
262+ }
263+
252264 $ isTwoFactorPage = GitHubHtml ::findTwoFactorForm ($ selector ) !== null
253265 || str_contains ($ finalUrl , 'two-factor ' )
254266 || str_contains ($ title , 'Two-factor authentication ' );
@@ -506,6 +518,14 @@ public function testOAuthLogin(): array {
506518 $ loginResult = $ this ->dismissTwoFactorCheckup ($ loginResult ['body ' ], $ loginResult ['checkup_url ' ] ?? $ authorizeUrl );
507519 }
508520
521+ if ($ loginResult ['status ' ] === 'two_factor_checkup_blocked ' ) {
522+ $ this ->markTestSkipped (
523+ 'GitHub is showing the two-factor authentication checkup page for the CI account at '
524+ . ($ loginResult ['checkup_url ' ] ?? $ authorizeUrl ) . ' and served no dismissable delay form. '
525+ . 'Sign in as the CI account once and complete or postpone the checkup to re-enable this test. '
526+ );
527+ }
528+
509529 if ($ loginResult ['status ' ] === 'invalid_credentials ' ) {
510530 $ this ->fail ('Invalid GitHub credentials ' );
511531 }
0 commit comments