adyen-ios icon indicating copy to clipboard operation
adyen-ios copied to clipboard

Only checking for .active on the `BrowserComponent`

Open goergisn opened this issue 1 year ago • 3 comments

Summary

  • "Reverting" to only checking if the app is .active instead of .active || .inactive

goergisn avatar May 03 '24 09:05 goergisn

Noe of our tests are failing so I assume there are no tests covering this flow?

Is it possible to add them?

Do you have a suggestion on how to change the application state of UIApplication so this could be tested?

goergisn avatar May 06 '24 13:05 goergisn

Noe of our tests are failing so I assume there are no tests covering this flow? Is it possible to add them?

Do you have a suggestion on how to change the application state of UIApplication so this could be tested?

The first approach that comes to my mind is:

  • extracting checkIfExternalAppDidOpen into a separate entity that takes UIApplication as dependency
  • hiding implementation details behind a new protocol like ExtenalAppDetecting with checkIfExternalAppDidOpen method (or maybe a simple closure dependency would do?)
  • replacing direct UIApplication.checkIfExternalAppDidOpen calls with the new dependency calls

Let me know if this works, we can think about other approaches

atmamont avatar May 06 '24 13:05 atmamont