Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

[Unit test] Several external links are not mocked during unit test #3870

Closed
3 tasks done
ndegendogo opened this issue Nov 21, 2021 · 2 comments
Closed
3 tasks done

[Unit test] Several external links are not mocked during unit test #3870

ndegendogo opened this issue Nov 21, 2021 · 2 comments
Labels
bug Something isn't working Fix 2.15 Fix is planned for 2.15

Comments

@ndegendogo
Copy link
Contributor

ndegendogo commented Nov 21, 2021

Avoid duplicates

  • Bug is not mentioned in the FAQ
  • Bug is specific for iOS only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
  • Bug is not already reported in another issue

Technical details

  • Device name: Xcode simulator / iPhone 8
  • iOS version: Xcode simulator / iOS 15
  • App version: current latest under development / branch release/2.15.x

Describe the bug

In the unit tests for UITesting, the external links are usually mocked. They don't open the given URL, but show a message box instead. The reason for this mock is to reduce external dependencies, especially to the network infrastructure, and to make the unit tests more robust.

However, during analysis of #2179 I found several links that are not mocked in the unit test.
To be more precise, I found the following:

  • informations in easy language and sign language from App information / About the app - AppStrings.AppInformation.aboutLink
  • contact form on the Imprint page - AppStrings.AppInformation.imprintSectionContactFormLink
  • link to the Blog from info page for statistics tiles - AppStrings.Links.statisticsInfoBlog
  • FAQ from notification settings (only with active notifications) - AppStrings.Links.notificationSettingsFAQ
  • FAQ from info page for the QR code of a vaccination certificate - AppStrings.CovPass.Information.faqLink
  • two links from health certificate, scroll down to the bottom - "https://reopen.europa.eu/de" and "https://reopen.europa.eu/en"
  • another two links from certificate validation info page - AppStrings.Links.healthCertificateValidationFAQ and AppStrings.Links.healthCertificateValidationEU
  • FAQ for booster vaccination - AppStrings.Links.healthCertificateBoosterFAQ

Steps to reproduce the issue

Expected behaviour

During unit testing, the links should be mocked. This will increase robustness of the unit tests

Possible Fix

Additional context

I am volunteering to submit a PR with a fix.

@ndegendogo ndegendogo added the bug Something isn't working label Nov 21, 2021
@ndegendogo ndegendogo changed the title [Unit test] Several links on the pages are not mocked [Unit test] Several external links are not mocked during unit test Nov 21, 2021
@ndegendogo
Copy link
Contributor Author

@dsarkar I have prepared PR #3877 with a fix - please apply the labels.
Thanks!

@ndegendogo
Copy link
Contributor Author

The PR was expected and is already merged.
Closing as fixed.

@dsarkar dsarkar added the Fix 2.15 Fix is planned for 2.15 label Nov 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Fix 2.15 Fix is planned for 2.15
Projects
None yet
Development

No branches or pull requests

2 participants