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

Migrate ConnectionTest e2e tests to use POP #7283

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

niklasberglund
Copy link
Collaborator

@niklasberglund niklasberglund commented Dec 4, 2024

Migrated the e2e test cases in ConnectionTest to follow Page Object Pattern, similar to how we implemented it in LoginTests. The changes can be tested by running all test cases under ConnectionTest.

Also implemented Wireguard obfuscation set to automatic with UDP traffic to relay blocked connection test(testWireGuardObfuscationAutomatic).

Fixes DROID-1600, DROID-1622


This change is Reviewable

@niklasberglund niklasberglund added the Android Issues related to Android label Dec 4, 2024
@niklasberglund niklasberglund requested review from kl, Rawa and Pururun December 4, 2024 16:36
@niklasberglund niklasberglund self-assigned this Dec 4, 2024
@niklasberglund niklasberglund force-pushed the migrate-connectiontest-tests-to-use-pop-droid-1622 branch 2 times, most recently from 2f226a7 to 6ed0f4c Compare December 4, 2024 17:04
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 12 files at r1, all commit messages.
Reviewable status: 4 of 12 files reviewed, 2 unresolved discussions (waiting on @niklasberglund)


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 176 at r1 (raw file):

            on<SystemVpnConfigurationAlert> { clickOk() }

            var relayIpAddress: String? = null

Ping me and we can talk about this, I would like to avoid the var's


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 215 at r1 (raw file):

            clickLocalNetworkSharingSwitch()
            pressBack()
            pressBack()

A bit misleading because this pressBack is probably on SettingsPage rather than VpnSettingsPage.

Copy link
Collaborator Author

@niklasberglund niklasberglund left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 12 files reviewed, 2 unresolved discussions (waiting on @Rawa)


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 176 at r1 (raw file):

Previously, Rawa (David Göransson) wrote…

Ping me and we can talk about this, I would like to avoid the var's

Perfect. Me too 👍


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 215 at r1 (raw file):

Previously, Rawa (David Göransson) wrote…

A bit misleading because this pressBack is probably on SettingsPage rather than VpnSettingsPage.

True! Actually the pressBack() function in Page is maybe a bit misleading, because it uses the Android back functionality, it doesn't press the back arrow in the settings view. I'm torn. On one hand it's nice to shorten the syntax, on the other hand it's misleading and maybe more descriptive to do uiDevice.pressBack(), on the third hand maybe the tests should actually press the back button instead of using the Android back functionality.

Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 12 files reviewed, 1 unresolved discussion


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 176 at r1 (raw file):

Previously, niklasberglund (Niklas Berglund) wrote…

Perfect. Me too 👍

Seems like we are a bit limited by the type system. 😢

@niklasberglund niklasberglund force-pushed the migrate-connectiontest-tests-to-use-pop-droid-1622 branch from 6ed0f4c to 1c30be0 Compare December 5, 2024 11:44
Copy link
Collaborator Author

@niklasberglund niklasberglund left a comment

Choose a reason for hiding this comment

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

Reviewable status: 4 of 14 files reviewed, 1 unresolved discussion (waiting on @Rawa)


android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/ConnectionTest.kt line 215 at r1 (raw file):

Previously, niklasberglund (Niklas Berglund) wrote…

True! Actually the pressBack() function in Page is maybe a bit misleading, because it uses the Android back functionality, it doesn't press the back arrow in the settings view. I'm torn. On one hand it's nice to shorten the syntax, on the other hand it's misleading and maybe more descriptive to do uiDevice.pressBack(), on the third hand maybe the tests should actually press the back button instead of using the Android back functionality.

We talked about this over a Slack huddle. Have removed pressBack() from Page and using device.pressBack() instead, and also moved them out of the page scopes.

@niklasberglund niklasberglund force-pushed the migrate-connectiontest-tests-to-use-pop-droid-1622 branch from 1c30be0 to 2121e3b Compare December 6, 2024 10:18
Copy link
Contributor

@Rawa Rawa left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 12 files at r1, 7 of 8 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@niklasberglund niklasberglund force-pushed the migrate-connectiontest-tests-to-use-pop-droid-1622 branch from 2121e3b to 3fe2615 Compare December 6, 2024 10:26
@Pururun Pururun merged commit 15fc4f9 into main Dec 6, 2024
30 checks passed
@Pururun Pururun deleted the migrate-connectiontest-tests-to-use-pop-droid-1622 branch December 6, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues related to Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants