Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: REST Services #1864

Merged
merged 204 commits into from
Oct 3, 2018
Merged

Feature: REST Services #1864

merged 204 commits into from
Oct 3, 2018

Conversation

magicznyleszek
Copy link
Member

@magicznyleszek magicznyleszek commented Jul 12, 2018

Description

Designs with initial idea: https://app.atomic.io/d/PjCNF93XD8wm

Screenshots for general idea:

screen shot 2018-08-02 at 10 14 31

screen shot 2018-08-02 at 10 14 39

screen shot 2018-08-15 at 16 40 13

screen shot 2018-08-15 at 16 39 43

Testing

Preparations:

  • You need to use REST-UI branch in kpi and kpi_rest_services branch in kobocat
  • Run migrations with ./manage.py makemigrations and ./manage.py migrate in both containers
  • Remember to docker-compose build kpi and docker-compose build kobocat
  • Run project

To cover all the changes few tests (copied from #1868):

Add REST Service

  1. Have at least one deployed project
  2. Go to project landing, then Settings and REST Services
  3. Use REGISTER A NEW SERVICE button. You can use http://mockbin.com/request as endpoint for tests
  4. Fill up the form and CREATE
  5. Verify that the service appears on the list

Edit REST Service

  1. Have at least one deployed project with a service added
  2. Go to project landing, then Settings and REST Services
  3. Use Edit button on a service
  4. Change name in the form and SAVE
  5. Verify that the service appears on the list with name changed

Delete REST Service

  1. Have at least one deployed project with a service added
  2. Go to project landing, then Settings and REST Services
  3. Use Delete button on a service
  4. CONFIRM prompt
  5. Verify that the service does not appear on the list

Count number of REST Service submissions

  1. Have at least one deployed project with a service added
  2. Go to project landing, then Settings and REST Services
  3. Remember the Count column number for the service
  4. Open the form in Enketo Express and create a new submission in a new window or tab
  5. Refresh REST Services view
  6. Verify that the Count column number for the service changed by +1

Retry failed REST Service submission

  1. Have at least one deployed project with a service added
  2. Go to project landing, then Settings and REST Services
  3. Edit your Rest Service by changing its endpoint to something wrong such as http://dummy.endpoint.local. You can still use Mockbin.org to create a bin with 500 responses
  4. Open the form in Enketo Express and create a new submission in a new window or tab
  5. Open service logs view
  6. Verify that the submission has failed (status code)
  7. Revert back the endpoint of your service to one that works.
  8. Use Retry submission button on failed submission
  9. Wait
  10. Verify that the submission is not failed anymore (status code)

Related issues

Fixes #1764
Fixes #1682
Fixes #1681
Fixes #1674
Fixes #1686
Fixes #1668
Fixes #1669
Fixes #1671
Fixes #1687

@noliveleger
Copy link
Contributor

noliveleger commented Sep 27, 2018

@jnm: All changes for BE have been made.
One of the changes is in another branch. #2008 (just in case the solution does not please you :-) )

@jnm jnm merged commit 0563544 into master Oct 3, 2018
jnm added a commit that referenced this pull request Nov 5, 2018
Amends #1864. Mongo and Postgres queries now respect that multiple users may
have forms with the same `id_string`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants