Skip to content
Snippets Groups Projects

Feature/dummy data pdp

Merged Carlos Vega requested to merge feature/dummy_data_pdp into master
1 unresolved thread

I think it would be a good idea to merge this since the dummy data script is useful for different branches.

Changes in smash/web/templates/doctors/breadcrumb.html and smash/web/views/worker.py are cherry picks from other branch.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 1 <li><a href="{% url 'web.views.appointments' %}"><i class="fa fa-dashboard"></i> Dashboard</a></li>
2 <li class="active"><a href="{% url 'web.views.workers' worker_type %}">Workers</a></li>
  • Are you sure this is not reintroducing this error #241 (closed)?

    Edited by Piotr Gawron
  • If this reintroduce the error then we should think about a test that checks if the bug wouldn't come back in the future.

  • This is the cherrypicked commit already merged on master from the daily_planning branch. How can we do this test?

  • we can check if rendering this template works without problem

    Edited by Piotr Gawron
  • I think it is already tested here but without a worker_type. I can add another one with a worker_type.

    class WorkerViewTests(LoggedInTestCase):
        def test_render_workers_list_request(self):
            create_worker()
    
            response = self.client.get(reverse('web.views.workers'))
            self.assertEqual(response.status_code, 200)

    The templates/doctors/breadcrum.html file is then rendered after the call to this function

    def worker_list(request, worker_type=WORKER_STAFF):
        doctors_list = Worker.get_workers_by_worker_type(worker_type, study_id=GLOBAL_STUDY_ID, ).order_by('-last_name')
        context = {
            'doctors_list': doctors_list,
            'worker_type': worker_type
        }
    
        return wrap_response(request, "doctors/index.html", context)
  • I added some tests in this commit 2c9140d8

        def test_render_worker_type_request(self):
            create_worker()
            response = self.client.get(reverse('web.views.workers', kwargs={'worker_type': WORKER_STAFF}))
            self.assertEqual(response.status_code, 200)
            response = self.client.get(reverse('web.views.workers', kwargs={'worker_type': WORKER_HEALTH_PARTNER}))
            self.assertEqual(response.status_code, 200)
            response = self.client.get(reverse('web.views.workers', kwargs={'worker_type': WORKER_VOUCHER_PARTNER}))
            self.assertEqual(response.status_code, 200)
  • Carlos Vega changed this line in version 6 of the diff

    changed this line in version 6 of the diff

  • Please register or sign in to reply
  • Piotr Gawron assigned to @carlos.vega

    assigned to @carlos.vega

  • Carlos Vega added 1 commit

    added 1 commit

    • 2c9140d8 - added tests for different worker_type in 'web.views.workers'

    Compare with previous version

  • Carlos Vega added 2 commits

    added 2 commits

    Compare with previous version

  • Carlos Vega assigned to @carlos.vega

    assigned to @carlos.vega

  • Carlos Vega added 64 commits

    added 64 commits

    Compare with previous version

  • merged

  • Piotr Gawron mentioned in commit d0152cb0

    mentioned in commit d0152cb0

  • mentioned in issue #257 (closed)

  • Please register or sign in to reply
    Loading