Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
735 stars 336 forks source link

Adding Test App and E2E tests #174

Closed reime005 closed 4 years ago

reime005 commented 5 years ago

This PR adds a very basic app setup for testing this repository. To make this app work, I had to disable the automatic dependency linking. Server-side I've created a simple express.js server, that has to be started separately, see README.

The Android tests do not fully work, but iOS work fine for me.

The App has two buttons that do calls against a server (upload with response 200 and 502). This could be extended in the future.

TSMMark commented 5 years ago

Thanks @reime005 please consider merging with https://github.com/Vydia/ReactNativeBackgroundUploadExample or update readme if not obvious enough in the readme to know it exists https://github.com/Vydia/react-native-background-upload#faqs

reime005 commented 5 years ago

@TSMMark Oh, I haven't seen that. Should have read the readme more I guess. But anyway, don't you think that tests should be included in the main repository, so that you don't have to use a separate codebase just for testing?

TSMMark commented 5 years ago

I didn't see any tests in this PR but I could have missed them? Or you mean just having an app to test with manually?

I'd be happy to merge an example app with this repo, certainly. If you get a chance check out the existing example app and see if your test app is missing any features that exist already

reime005 commented 5 years ago

This file: TestApp/e2e/upload.e2e.js includes some very simple tests. I will merge the example app into this branch

reime005 commented 4 years ago

@TSMMark I've merged the example app into this repo, added E2E tests for both platforms and added Github Actions CI/CD with semantic-release. Would be great if you could check it out and configure the NPM_TOKEN (Settings -> Secrets) as well as enable Github branch-protection to require successful checks for a pull request

github-actions[bot] commented 4 years ago

:tada: This PR is included in version 5.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: