Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Fixes #1169: Add a test for the no internet connection page #1644
This PR contains a fix for #1164.
I added a XCUI test for this page. I learned that there is no way to turn off network on iOS Simulator programatically, so in order to use this test, you should turn off network on your computer, where you run the project.
Also, I added a check for the internet connectity. If there is no internet connectivity – test runs. In order to implement it, I referenced this article.
@farhanpatel does Firefox iOS have any UI tests that check how the app handles connectivity issues? I'm not sure that such a test would be helpful since it requires manually turning off connectivity on the physical device (and thus would never be run on BuddyBuild) based on the info in this PR. How has Firefox iOS handled it or do you have advice for how we could handle it here?
Hey @oliviabrown9 , So sorry I saw this late. We don't have any tests that I know of that test no network connectivity. We have tests to test things like FxA being down or Pocket not returning trending stories. But these are usually done by stubbing the API. Blocking all internet traffic to simulate offline isn't something we've tried.
I wonder if you could use NSAppTransportSecurity in the info.plist to do this. You might need a different scheme just for these offline tests.