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

UI Tests: Disable compliance popover for UI Tests #21868

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

staskus
Copy link
Contributor

@staskus staskus commented Oct 24, 2023

During a UI testing pairing with @tiagomar we got blocked by a compliance popover constantly showing up locally when running UI tests.

Solution

Set compliance popover as already shown if the app is launch with ui-testing arguments. Additionally, I grouped UITestConfiguration related code into a single file.

To test:

It could be tested locally in the EU, by confirming that the compliance popover is not displayed after the login epilogue is dismissed. Or by confirming that disableCompliancePopover gets called and value set.

Simulator.Screen.Recording.-.Clone.1.of.iPhone.15.-.2023-10-24.at.16.38.31.mp4

Regression Notes

  1. Potential unintended areas of impact

None

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

  2. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@staskus staskus added [Type] Enhancement Testing Unit and UI Tests and Tooling labels Oct 24, 2023
@staskus staskus requested a review from tiagomar October 24, 2023 13:56
@staskus staskus added this to the 23.6 milestone Oct 24, 2023
@wpmobilebot
Copy link
Contributor

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr21868-4d17f84
Version23.5
Bundle IDorg.wordpress.alpha
Commit4d17f84
App Center BuildWPiOS - One-Offs #7522
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr21868-4d17f84
Version23.5
Bundle IDcom.jetpack.alpha
Commit4d17f84
App Center Buildjetpack-installable-builds #6549
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.


private static func disableCompliancePopover() {
if CommandLine.arguments.contains("-ui-testing") {
UserDefaults.standard.didShowCompliancePopup = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, non-intrusive move! ;) 👍

Copy link
Contributor

@tiagomar tiagomar left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @staskus! Keeping UI Tests configurations in a separate file makes total sense.

@staskus staskus merged commit 436e02d into trunk Oct 25, 2023
@staskus staskus deleted the task/disable-compliance-popover-for-ui-tests branch October 25, 2023 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing Unit and UI Tests and Tooling [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants