Closed staskus closed 10 months ago
@guarani the code can be reviewed but ideally, I would do some more manual testing myself, so I'm not targeting 23.6 for sure. If you'll have time to review the code or critique the solution overall - great, I'll finish after I come back. Thanks! 🙇
More context: https://github.com/wordpress-mobile/WordPress-iOS/issues/18497#issuecomment-1779361108 Related PR https://github.com/wordpress-mobile/WordPress-iOS/pull/21904
In rare cases, XML-RPC validation can fail and indicate that the site is not a WordPress site when it actually is.
To avoid this corner case, I added an additional
isWPSite
check afterguessXMLRPCURL
and before showing errors to the users:isWPSite
(connect/site-info
) API call confirms it, then we inform the user that the site is invalidisWPSite
(connect/site-info
) API suggests otherwise, we inform users about XML-RPC issues which they can then look for further assistanceImplementation details
I didn't want to change this fragile code before writing tests to it and to write tests I needed to split business logic from UI. I recommend reviewing commit by commit:
CHANGELOG.md
if necessary.