Mahara webservice testclient needs to indicate what are the required fields

Bug #1804907 reported by Robert Lyon on 2018-11-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Robert Lyon

Bug Description

Some of the fields are required when calling Mahara webservice functions but it is not obvious when using the test client which ones they are

Robert Lyon (robertl-9) wrote :
Changed in mahara:
importance: Undecided → Wishlist
milestone: none → 19.04.0
status: New → In Progress
assignee: nobody → Robert Lyon (robertl-9)
Steven (stevens-q) wrote :

Environment tested: Master
Browser tested: Chrome

Preconditions:
----------------------------------
1. Site admin user exists
2. Web services is configured as follows
--- a. Allow outgoing web service requests: Yes
--- b. Accept incoming web service requests: Yes
3. Enable protocols supported as a web services provider:
--- a. XML-RPC: Yes
--- b. REST: Yes
--- c. OAuth: Yes
4. Network service group has been set up
5. Access tokens and allocated users to service groups have been set up
a. Token = 84f1a3b6ca3553b6ccec28f6c74306e1 for
6. Service group = "Some service group"

Test Steps:
----------------------------------
1. Log in as Site admin
2. Browse to Admin menu > Web services > Test client
3. Set the following fields to
--- a. Protocol = Rest
--- b. Authentication type = Token
--- c. Service = "Some service group"
--- d. Functions = "mahara_group_get_groups_by_id"
4. Click the next button
5. Verify that the following fields are displayed
--- a. id
--- b. shortname
--- c. Institution
--- d. wstoken
6. Do not fill anything in the fields and click Execute button

Expected result: Error messages are displayed and fields are highlighted

Actual result: After clicking the next button no fields were displayed and I received an error message

[WAR] 05 (lib/errors.php:535) [PieformException]: Could not find rule "oneof"

Call stack (most recent first):
exception(object(PieformException)) at Unknown:0

Catalyst QA Failed Testing ✘

Steven (stevens-q) wrote :

Preconditions:
----------------------------------
1. Site admin user exists
2. Web services is configured
3. Enable protocols supported is configured
4. Network service group is configured
5. Access tokens and allocated users to service groups have been set up
6. Service group has been created and set up

Test Steps:
----------------------------------
1. Site admin log in
2. Browse to Admin menu > Web Services > Test client
3. Set the following fields to
 a. Protocol = Rest
 b. Authentication type = Token
 c. Service = "Some service group"
 d. Functions = "mahara_group_get_groups_by_id"
4. Click the next button
5. Verify that the following fields are displayed
 a. id
 b. shortname
 c. Institution
 d. wstoken
6. Do not fill anything in the fields mentioned in the previous step and click Execute button
7. Verify 'required' fields in webservice testclient Indicated ✔
8. Highlights those fields that are required including those that one or more are required ✘

BUGS

1. Error messsage should only display after the "Execute" button has been clicked
2. Error messages are located at the top of the page - but this is scrolled out of the visible screen (messages need to be visible on reload of page)
3. The color of the error message "Fields marked by '#' require one of them to be filled in." needs to meet Accessibility AA standard
--- a. current values BG = #FFFFFF | FG = #eea135 (2.15:1 - this needs to be 1.5:1 to meet AA standard)
5. Fields where at least one needs to be filled in need to be highlighted as errors if they are not filled in

Recommendations : Display help text near the fields where at least one is required - (required fields are fin when indicated with an asterix *)

Catalyst QA Failed Testing ✘

Steven (stevens-q) wrote :

Bugs Fixed
-------------
1. Error message should only display after the "Execute" button has been clicked ✔

2. Error messages are located at the top of the page - but this is scrolled out of the visible screen (messages need to be visible on reload of page)✔

5. Fields where at least one needs to be filled in need to be highlighted as errors if they are not filled in ✔

======================== Still needs fixing ===========================

Bugs not fixed yet
-------------------
3. The color of the error message "Fields marked by '#' require one of them to be filled in." needs to meet Accessibility AA standard
--- a. current values BG = #FFFFFF | FG = #eea135 (2.15:1 - this needs to be 1.5:1 to meet AA standard)

New Bugs
-------------
1) The light grey background of fields where at least one option needs to be selected is not consistent across all themes
2) required fields asterix "*" size is not correct when displayed on Modern theme

Recommendations : Display help text near the fields where at least one is required - (required fields are fin when indicated with an asterix *)

Steven (stevens-q) wrote :

New Bugs cont'd
-------------
3) Styling issues displayed viewing the test client pages when the institution theme is set to Custom theme configuration

Steven (stevens-q) wrote :

I am still seeing some styling issues on different themes

1) required fields asterix "*" size is not correct when displayed on Modern theme ✘

2) after executing form without the field filled in - I am seeing error messages that have 2 colours yellow and red on the Raw and Institution configurable themes - the other themes display only red coloured error message text ✘

NOTE: error and warning messages must remain consistent across the site to provide better UX

Catalyst QA Failed Testing ✘

Robert Lyon (robertl-9) wrote :

For point 1) required fields asterix "*" size is not correct when displayed on Modern theme

This is an issue with the font that Modern theme uses, called Raleway.
See https://fonts.google.com/specimen/Raleway and notice that the asterix is small and thin compared to other fonts.

For point 2) after executing form without the field filled in - I am seeing error messages that have 2 colours yellow and red on the Raw and Institution configurable themes

I do not see the two colours (only red) so I suspect that is a css caching issues as they used to be yellow

Steven (stevens-q) wrote :

Point 1
- not much we can do other than changing the font (Catalyst QA)

Point 2
- I am now seeing only red coloured messages after clearing the cache with a hard refresh

Catalyst QA Approved ✔

Reviewed: https://reviews.mahara.org/9332
Committed: https://git.mahara.org/mahara/mahara/commit/a35d1e477a61382830fca79a481fd11982dd4839
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit a35d1e477a61382830fca79a481fd11982dd4839
Author: Robert Lyon <email address hidden>
Date: Sat Nov 24 14:22:57 2018 +1300

Bug 1804907: Indicate 'required' fields in webservice testclient

Highlights those fields that are required

Also highlights the scenario where one of a few fields must be
filled in

behatnotneeded

Change-Id: I8b804d9cd5f81c39f63011d60b1d79f30ceaf8a7
Signed-off-by: Robert Lyon <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
summary: - Mahara webservice testclient needs to indicate what are the requied
+ Mahara webservice testclient needs to indicate what are the required
fields
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers