Page MenuHomeIn-Portal Phabricator

INP-1527 User's profile update via AJAX support
ClosedPublic

Authored by glebs on Jan 22 2016, 2:32 AM.

Details

Test Plan
NOTE: Make all tests in advanced theme.
  • in IDE:
    1. open /themes/advanced/platform/my_account/my_profile.tpl template for editing
    2. locate <input type="hidden" ... name="events[u][OnUpdate]"/> hidden field
    3. replace OnUpdate with OnUpdateAjax in that hidden field
  • in Admin Console:
    1. go to User ManagementUsers section
    2. create new user with Active status
  • on Front-End
    1. login using above created user
    2. go to profile editing page on /platform/my_account/my_profile.html url
    3. fill all form fields, but E-mail field
    4. press Update button
    5. confirm, that page after reload displays correct JSON data - {"status": "FAILED","uploader_info": {"PrimaryImage": {"urls": "","names": "","sizes": ""}},"field_errors": {"Email": "Field is required"}}
    6. go to profile editing page (url /platform/my_account/my_profile.html) again
    7. open browser development tools and clear session cookie
    8. press Update button
    9. confirm, that redirect to user registration happens

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.3.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 302
Build 302: arc lint + arc unit

Event Timeline

glebs updated this revision to Diff 456.Jan 22 2016, 2:32 AM
glebs retitled this revision from to INP-1527 User's profile update via AJAX support.
glebs updated this object.
glebs edited the test plan for this revision. (Show Details)
glebs added 1 JIRA issue(s): INP-1527.
alex requested changes to this revision.Jan 22 2016, 2:58 AM
alex edited edge metadata.

Please also update test plan to include:

  • scenario, when Guests are updating their profile
  • steps how to create user
  • URL of mentioned "My Profile" page or steps how to get to it
core/units/users/users_event_handler.php
189

In here we also should allow OnUpdate* events.

This revision now requires changes to proceed.Jan 22 2016, 2:58 AM
glebs updated this revision to Diff 457.Jan 22 2016, 3:03 AM
glebs edited edge metadata.

Replace second OnUpdate match in UsersEventHandler::checkPermissions

glebs edited the test plan for this revision. (Show Details)Jan 22 2016, 3:11 AM
glebs edited edge metadata.
alex requested changes to this revision.Jan 22 2016, 3:41 AM
alex edited edge metadata.

Some more issues with test plan:

  1. in the front-end profile editing change event under "Update" button from OnUpdate to OnUpdateAjax

I guess this should say:

  • open /path/to/template.tpl template in the editor
  • locate <input type="hidden" ... name="events[u][OnUpdate]"/> hidden field
  • replace OnUpdate with OnUpdateAjax

Be consistent with test item formatting:

  • either start with capital letter and end with dot
  • or start with small letter and don't place dot at the end (this is what I do)

Right now there is a mix of both.

  1. Approve user as admin in admin console

This is not self explanatory for tester that isn't aware, where user management is made in Admin Console.

in front-end

  • no lowercase please - Front-End and Admin Console
  • in Admin Console, but on the Front-End
  1. Confirm, that you redirected to user registration

Replace that you redirected with that you are redirected.

This revision now requires changes to proceed.Jan 22 2016, 3:41 AM
glebs edited the test plan for this revision. (Show Details)Jan 22 2016, 5:22 AM
glebs edited edge metadata.
glebs requested a review of this revision.Jan 22 2016, 5:32 AM
glebs edited edge metadata.
alex edited edge metadata.Mar 10 2016, 6:02 AM
alex added a project: Restricted Project.
alex edited the test plan for this revision. (Show Details)Nov 20 2016, 12:12 PM
alex accepted this revision.Nov 20 2016, 12:21 PM
alex edited edge metadata.
This revision is now accepted and ready to land.Nov 20 2016, 12:21 PM
This revision was automatically updated to reflect the committed changes.