summaryrefslogtreecommitdiffhomepage
path: root/android/test/mockapi/src
AgeCommit message (Collapse)AuthorFilesLines
2025-10-23Fix failing test due to time zone changeKalle Lindström3-4/+4
2025-06-19Use AlarmManager for notificationsKalle Lindström1-16/+45
Instead of scheduling system notifications from a flow we now schedule them independently from the app lifecycle via AlarmManager. This is done so that for example an expiry notification that the user dismissed won't get redisplayed if the app process gets killed and then restarted. When the account exiry time is fetched we schedule an alarm that will show a notification 3 days before the account time expires. This alarm then also schedules a new alarm to show the following notification and so on. To make this work this PR also introduces two new broadcast receivers; one on boot received listener and one on time time/timezone changed listener. Beause Android clears alarms when the devices is rebooted/the time is changed we need these listeners to re-trigger the alarm. To enable the broadcast receivers to re-trigger the alarm we also have to persist the expiry time in the DataStore preferences.
2025-05-21Supply IP address when using API overrideDavid Göransson1-1/+6
Previously we did a DNS lookup for Stagemole and Devmole however, this causes problem when starting the app with no internet and is different from how the app performs in production mode. This commit removes that logic in order to align closer to what we expect in prod.
2025-05-12Convert all test to use Page patternDavid Göransson9-164/+91
Converts all our last test to use the Page object pattern and clean up a bunch of old MockApi and E2E test logic.
2025-05-09Fix flaky device management testDavid Göransson1-14/+17
The device mangement test would fail because it expect the device to be removed however it was in a loading state while API request was being made. This commit allows it to be visible intiailly (loading) and then expects it to be removed.
2025-05-07Attempt to fix flakinessDavid Göransson1-0/+2
2025-04-30Move all test tags to new lib.ui.tag moduleKalle Lindström3-3/+4
2025-04-28Add mock api test for manage devices screenKalle Lindström2-0/+58
2025-04-16Replace Volley with ktorDavid Göransson1-18/+2
2025-03-07Offer to store accout number in password managerDavid Göransson1-0/+2
2025-03-03Add waitForIdle to device list testAlbin1-0/+3
Wait until the application is idle to avoid skipping input events that are filtered out depending on lifecycle state (dropUnlessResumed).
2025-02-26Remove Joda Time and use java.time package insteadKalle Lindström8-34/+34
Joda Time has been superseded by the Java 8 java.time package which has more or less the same API. This commit removes all usage of Joda Time and replaces it with the java.time classes. This is done so that we can remove the dependency on Joda Time.
2025-02-18Fix mockapi device list test wait conditionAlbin1-1/+1
2025-01-02Remove global API endpointEmīls1-6/+1
2024-10-08Suppress complex dispatch methodDavid Göransson1-0/+1
2024-10-08Fix print stacktrace warningDavid Göransson1-2/+1
2024-09-20Call dismissChangelogIfShown at the correct timeJonatan Rhodin6-9/+8
2024-09-16Rename test timeout constantsNiklas Berglund1-2/+2
2024-08-30Initialize mullvad daemon directly in vpn service on createJonatan Rhodin1-4/+4
As a consequence move the address resolve to the daemon
2024-08-28Reformat kotlin code using updated ktfmt pluginAlbin4-8/+8
This commit mostly adds trailing commas throughout the project, but also includes a few other formatting changes.
2024-06-26Migrate log calls to kermitAlbin3-11/+10
2024-06-12Format xml filesAlbin1-4/+2
2024-06-10Unify account number namingAlbin9-35/+35
Use variations of "account number" rather than "account token" throughout the kotlin code base.
2024-03-11Re-enable expiry textDavid Göransson1-5/+0
2024-02-07Fix flaky account history mockapi testJonatan Rhodin1-0/+1
Add some extra time to for the login page to show to improve stability of the test.
2024-02-06Remove common lib dependency from test mockapiJonatan Rhodin2-5/+5
2024-01-31Add account expiry mockapi testJonatan Rhodin2-2/+94
2024-01-25Unify ensure login assertionJonatan Rhodin3-3/+3
2024-01-25Add test for showing and using the account historyJonatan Rhodin1-0/+49
2024-01-25Update ktfmt to version 0.16.0 and reformat filesJonatan Rhodin1-10/+5
2024-01-19Add mockapi test for handling too many devicesJonatan Rhodin7-41/+179
2024-01-18Add support for stagemole partner account testsAlbin2-1/+4
2024-01-15Add mockapi tests for successful and failed account creationJonatan Rhodin4-0/+67
2024-01-11Migrate mockapi tests to junit5Jonatan Rhodin3-23/+14
2024-01-11Synchronize `mullvad-api` and `mullvad-daemon` when the `api-override`Markus Pettersson1-2/+1
feature is enabled Move the logic for using overridden API endpoints for API calls from `mullvad-api::rest` to `mullvad_daemon::api`. This is in line with how the interaction between the two crates work for a normal release build, i.e. when the `api-override` feature is disabled. This commit also removes references to `force_direct_connection` in the Android code. The flag does not exist in the `mullvad-*` rust crates anymore, so it would be erroneous to try to serialize/deserialize the value from the Android client.
2023-12-29Add automate logout ui tests using mockApisaber safavi1-0/+40
2023-12-18Fix changes dialog dismiss in mockapi testsAlbin1-0/+4
2023-10-16Refactor custom api endpoint configAlbin1-11/+7
2023-10-12Fix login uiautomator flakinessDavid Göransson1-1/+10
2023-10-02Fix data class issuesDavid Göransson1-0/+3
2023-10-02Add general Konsist testsDavid Göransson1-2/+1
2023-09-05Remove Android code dealing with forwarded portsLinus Färnstrand1-4/+0
2023-03-22Fix broken notification permission prompt testsaber safavi1-4/+4
2023-03-22Apply project-wide `kotlinLangStyle` formattingAlbin3-93/+79
2023-03-16Fix notification permission behavior and testAlbin1-0/+4
2023-03-01Fix mockapi localhost referenceAlbin2-4/+1
This fix results in the daemon getting "localhost" as hostname rather than "127.0.0.1".
2023-02-02Add logging to mocked web server used for testsAlbin2-1/+12
2023-02-02Fix mockapi time formatAlbin4-25/+32
Ensures mockapi timestamps are set to utc with offset zero and are strictly formatted according to both iso8601 and rfc3339.
2023-01-26Log mockapi web server port during testsAlbin1-0/+2
2023-01-25Extend login timeout during testAlbin1-0/+3