Commit Graph

7 Commits

Author SHA1 Message Date
Pea Tyczynska
2fab363253 Link to user services on User Information page 2018-07-16 17:37:26 +01:00
Pea Tyczynska
b3d99507bd Fix displaying of services on User Information page 2018-07-16 17:37:26 +01:00
Pea Tyczynska
8258de084c Change part of the tests to use client_request
Two tests retained the old syntax because of mocker conflict:
when logging in as a user through client_request, it sets up a
side_effect on user_api_client.get_user to the user you log in
as. If you later want to set return_value for get_user to
something else, problems start :d.
2018-07-16 15:37:53 +01:00
Pea Tyczynska
4cd465753a Add view that displays user information, including:
- name
- email
- phone number
- services
- last login
- failed login attempts if any

The view can be accessed from results of find_users_by_email

logged_in_at added to User serialization on admin frontend as
a part of this work
2018-07-13 16:01:52 +01:00
Pea Tyczynska
57e9c1d6e6 Validate against empty form submission for find_users_by_email
This included:
- creating a new form SearchUsersByEmailForm with validation
on its search field

- introducing 400 status to the view  if the form does not validate

- fixing the POST request data structure in the tests (it was
incorrect before and uncaught due to lack of validation and mocking
the response from the API.
2018-07-13 11:58:29 +01:00
Pea Tyczynska
d1a05e2ec5 find_users_by_email view calls API and feeds results to template
Template then displays the results.

Page displays a message if no results found
2018-07-13 11:58:29 +01:00
Pea Tyczynska
ea6a5b6e7d find_users_by_email view loads a page with search form and is linked to 2018-07-13 11:58:28 +01:00