Detox icon indicating copy to clipboard operation
Detox copied to clipboard

(WIP) App data clear API

Open d4vidi opened this issue 5 years ago • 7 comments

Add support for Application clear-data, so that apps wont have to be reinstalled on Android (clearing the data is much faster).

d4vidi avatar Dec 15 '20 14:12 d4vidi

Isn't this supported by adb? I thought we are already using it.

LeoNatan avatar Dec 16 '20 10:12 LeoNatan

Sort of, but it's not as simple as running a single command. In any case, we might want to consider an API that would do this seamlessly on Android and iOS (e.g. a resetApp() call that would clear data on android, and reinstall on iOS)... does that make sense?

d4vidi avatar Dec 16 '20 13:12 d4vidi

Reinstall in iOS doesn’t guarantee data clearance in some cases. I prefer not to offer API that cannot do what the users explicitly is asking for.

LeoNatan avatar Dec 16 '20 13:12 LeoNatan

Yes you are right. My aim was to try to avoid spreading if (isIos) device.launchApp({delete: true}) else device.clearData() being implemented over and over out there.

d4vidi avatar Dec 16 '20 13:12 d4vidi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

stale[bot] avatar May 25 '22 23:05 stale[bot]

This will be introduced indirectly via #2534

d4vidi avatar May 26 '22 12:05 d4vidi

The #3497 did not enter the master, so I think it is totally fine to keep this issue open for a while.

noomorph avatar Jan 11 '23 12:01 noomorph