(target = {})
| 19 | } |
| 20 | |
| 21 | function getActivationStrategy(target = {}) { |
| 22 | const tagName = normalizeTagName(target.tagName); |
| 23 | const type = normalizeType(target.type); |
| 24 | const pathname = normalizePathname(target.pathname); |
| 25 | const hasForm = Boolean(target.hasForm); |
| 26 | const isEmailVerificationRoute = /\/email-verification(?:[/?#]|$)/i.test(pathname); |
| 27 | const isSubmitButton = hasForm |
| 28 | && ( |
| 29 | (tagName === 'button' && (!type || type === 'submit')) |
| 30 | || (tagName === 'input' && type === 'submit') |
| 31 | ); |
| 32 | |
| 33 | if (isSubmitButton && isEmailVerificationRoute) { |
| 34 | return { method: 'requestSubmit' }; |
| 35 | } |
| 36 | |
| 37 | return { method: 'click' }; |
| 38 | } |
| 39 | |
| 40 | function isRecoverableStep9AuthFailure(statusText) { |
| 41 | const text = String(statusText || '').replace(/\s+/g, ' ').trim(); |
no test coverage detected