This app uses GitHub APIs. Its functionalities include:
- log in
- view user info
- follow/unfollow user
- view repositories
- search user/repositories
- star/unstar repositories
- view users followed/following
- visualize repository stat
It is built with React-Native (create-react-native-app). Testing is done with Appium, wd, and mocha.
This is ejected from create-react-native-app, so to run on iOS go to ios/
and use XCode to build and run.
No Android support because some iOS-only components are used. Meh
A testing demo can be found here. Here's episode 2.
- For both simulator and real device tests, appium-desktop needs to be installed and the server needs to be running.
test/credentials.js
needs to exist and the values need to be filled.test/credentials.example.js
is provided as an example.
- Use XCode to open
ios/mobilegithub.xcodeproj
, run on the simulator to be tested. Here's where the magic happens: - Use the Activity Monitor on Mac to find the process running with the name 'mobile-github'.
- Double click on that activity, navigate to the 'Open Files and Ports' tab.
- Find the directory of the *.ipa file in the list and copy that file to
test/
- In
test/test.js
change theapp
string to 'http://localhost:3000/mobilegithub.app'. - Go to XCode, Window -> Devices and Similators. In the opened pane select 'Simulators' and copy the identifier of the simulator to be tested.
- Paste the identifier to
test/credentials.js
udid field and fill in thedeviceName
, which can also be found in XCode. - In terminal, with directory being this repo's root directory.
npm test
.
- Use XCode to open
ios/mobilegithub.xcodeproj
, switch the target to the real device connected to Mac, Product -> Scheme -> Edit Scheme. Change the scheme for Run to be release. Then run the app on device. - The above step is going to take a while. After it's done, go to the navigator of the file system to the left, expand Products, right click on
mobilegithub.app
and select 'Show in Finder' - Compress the
.app
file to.zip
and copy the.zip
file totest/
- In
test/test.js
change theapp
string to 'http://localhost:3000/mobilegithub.zip'. - Go to XCode, Window -> Devices and Similators. In the opened pane select 'Devices' and copy the identifier of the device to be tested.
- Paste the identifier to
test/credentials.js
udid field and fill in thedeviceName
, which can also be found in XCode. - In terminal, with directory being this repo's root directory.
npm test
.