Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hardcoded ClientToken in UITests #431

Merged
merged 9 commits into from
Nov 3, 2023
Merged

Conversation

scannillo
Copy link
Contributor

@scannillo scannillo commented Oct 23, 2023

Summary of changes

  • This PR updates our demo app settings to support using hard-coded/static ClientToken values versus fetching them in our UI tests
  • The goal of this PR is to reduce UI test flakiness on CI by eliminating the client-token fetch network request
  • Introduce DemoAuthType enum to mirror braintree_ios test setup

Checklist

  • Added a changelog entry

Authors

@jaxdesmarais @scannillo

scannillo and others added 6 commits October 23, 2023 11:53
…ts; mirror braintree_ios UserDefaults setup

Signed-off-by: Jax DesMarais-Leder <jdesmarais@paypal.com>
… DemoSetting bool property

Signed-off-by: Jax DesMarais-Leder <jdesmarais@paypal.com>
…tTokenWithoutCustomerID since UITests expect different values
@scannillo scannillo requested a review from a team as a code owner October 23, 2023 21:21
@scannillo
Copy link
Contributor Author

Failing after 46m

Gonna 🦵 kick the UI tests again just to see how long it takes

@scannillo
Copy link
Contributor Author

UI tests expected to fail

@jaxdesmarais
Copy link
Contributor

It seems like the tests with the client tokens with customer IDs are failing with an "invalid auth fingerprint" error (such as the BraintreeDropIn_EditMode_UITests tests). I wonder if there is a different validation that happens when validating an auth fingerprint that includes a client ID? We may need to work with the authy team to get a long lived client token for UI tests that includes a customer ID or poke around at how Android/Web handles these UI tests. Alternatively we can go back to fetching a client token for the customer ID case, but I assume that'd still result in flaky tests.

… appropriately; fetch clientID for tests that requried it
@scannillo
Copy link
Contributor Author

scannillo commented Nov 3, 2023

@jaxdesmarais It seems like the tests with the client tokens with customer IDs are failing with an "invalid auth fingerprint" error (such as the BraintreeDropIn_EditMode_UITests tests). I wonder if there is a different validation that happens when validating an auth fingerprint that includes a client ID? We may need to work with the authy team to get a long lived client token for UI tests that includes a customer ID or poke around at how Android/Web handles these UI tests. Alternatively we can go back to fetching a client token for the customer ID case, but I assume that'd still result in flaky tests.

Great catch! I was also able to replicate that locally. So I removed the DemoAuthType.uiTestHardcodedClientTokenWithCustomerID option and replaced the tests that used it with regular -ClientToken setting. The tests are now passing locally!

Copy link
Contributor

@jaxdesmarais jaxdesmarais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@scannillo scannillo merged commit 1928bdc into main Nov 3, 2023
3 of 4 checks passed
@scannillo scannillo deleted the use-hardcoded-client-id-tests branch November 3, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants