General Guidelines https://trello.com/c/IX6n2xmz/73-general-guidelines https://trello.com/c/DHKrU6mA/81-data-sync-general-guidelines Prerequisites Follow the steps in this card to configure mobile services in OpenShift and install Ionic Showcase App locally Steps Below steps should be done with example app on both Android and iOS real devices. 1. Run npm run ionic:android/npm run ionic:ios You should be redirected to a Keycloak Login page 2. Login as a user you've created in the Keycloak configuration step 3. Go to Manage tasks section Subscriptions 1. Keep Manage Tasks app opened on your mobile device 2. In OpenShift, open your Sync App's URL and with '/graphql' endpoint (e.g. https://yourapp.openshift.com/graphql) 3. Create a task in the graphql playground (following mutation should work for ionic-showcase-server app)
mutation{createTask(title: "mytitle", description: "my desc"){id, version, title, description}} |
Check your application on mobile device. The new task should appear there immediately 4. Change the task's title or description
mutation edit{updateTask(id:"<TASK_ID>", version: 1, title: "change"){id}} |
Check your application on mobile device. The change in the task should appear timmediately 5. Delete the task in graphql playground The task should disappear from the app Offline mutations Start with device online. 1. create few items while offline 2. try to update/delete some of them 3. create item "toBeUpdated" and "toBeDeleted" 3. go offline 4. create item "created" 5. update item "toBeUpdated" 6. delete item "toBeDeleted" 7. go online 8. offline mutations counter should be "0" and your changes should be still visible Restarting app Follow steps above, just replace step "7" with: 1. kill app 2. go online 3. open app Create then update functionality 1. go offline 2. create item A and B 3. update item A 4. delete item B 5. go back online 6. offline mutations counter should be "0" and your changes should be still visible Server down Not yet implemented - https://issues.jboss.org/browse/AEROGEAR-8447 1. kill server 2. create item A and B 3. update item A 4. delete item B 5. start the server again 6. offline mutations counter should be "0" and your changes should be still visible Trello link |