removed code that set error status and prevents redirect
Details
The D167 revision must be applied upfront for this test plan to work
Part 1
- go to Website & Content → Structure & Data section
- confirm that Up and Down buttons properly changes Order
- confirm that Approve and Decline buttons properly changes Status for categories and products
- go to Tools → Query Database section
- run SQL like: UPDATE inp_Categories SET l1_Name = '' WHERE l1_Name = 'Home' to break validation for some category in the middle of categories grid, displayed on Website & Content → Structure & Data section
- go to Website & Content → Structure & Data section
- confirm, that some category with status Active in the middle of the list have empty "Section Title" field
- select some categories with status Active, including category with empty "Section Title" field, some category before it and some category after it in the grid
- confirm that pressing Decline button do not change Status for category with empty name, and correctly change statuses for other selected categories, and no fatal error happens
- restore category name(s) and statuses, changed in this test
Part 2
- go to User Management → Users section
- create 4 users
- go to E-commerce → Affiliates section
- create an affiliate record for each of users, created above
- confirm that Approve and Decline buttons properly changes Status
- approve all affiliate records
- make sure there are 3+ affiliates in the grid, remember ID of some affiliate in the middle of the list
- go to Tools → Query Database section
- run SQL like: UPDATE inp_Affiliates SET SSN = '' WHERE AffiliateId = {remembered Id} to break validation for remembered affiliate in the middle of affiliates grid, displayed on E-commerce → Affiliates section
- go to E-commerce → Affiliates section
- open with Edit button remembered affiliate
- confirm, that SSN/Tax Id/VAT Number is empty
- go to E-commerce → Affiliates section
- select some affiliates including affiliate with empty SSN/Tax Id/VAT Number field, some affiliate before it and some affiliate after it in the grid
- confirm that pressing Decline button do not change Status for affiliate with empty SSN/Tax Id/VAT Number, and correctly change statuses for other selected affiliates, and no fatal error happens
- restore affiliate SSN/Tax Id/VAT Number and statuses, changed in this test
Part 3
- go to Website & Content → Structure & Data → Directory section
- click on Links tab
- add 4 links
- go to Directory → Link Validation section
- confirm that Approve and Decline buttons properly changes status icon in the Link Validation grid and Status field of related link
- approve all links
- make sure there are 3+ links in the grid, remember ID of some link in the middle of the list
- go to Tools → Query Database section
- run SQL like: UPDATE inp_Link SET Url = '' WHERE LinkId = {remembered Id} to break validation for remembered link in the middle of links grid, displayed on Directory → Link Validation section
- go to Directory → Link Validation section
- confirm, that Link URL is empty for remembered link
- select some links including link with empty Link URL field, some link before it and some link after it in the grid
- confirm that pressing Decline button do not change Status for link with empty Link URL, and correctly change statuses for other selected links, and no fatal error happens
- restore link Link URL and statuses, changed in this test
Part 4
- go to Website & Content → Structure & Data → Directory section
- click on Links tab
- confirm that Approve and Decline buttons properly changes status icon in the Links grid and Status field of related link
- approve all links
- make sure there are 3+ links in the grid, remember ID of some link in the middle of the list
- go to Tools → Query Database section
- run SQL like: UPDATE inp_Link SET Url = '' WHERE LinkId = {remembered Id} to break validation for remembered link in the middle of links grid, displayed on Website & Content → Structure & Data → Directory section
- go to Website & Content → Structure & Data → Directory section
- click on Links tab
- confirm, that Link URL is empty for remembered link
- select some links including link with empty Link URL field, some link before it and some link after it in the grid
- confirm that pressing Decline button do not change Status for link with empty Link URL, and correctly change statuses for other selected links, and no fatal error happens
- restore link Link URL and statuses, changed in this test
Part 5
- go to Directory → Paid Listings section
- add 4 listings using 4 links created before
- confirm that Approve and Decline buttons properly changes Status
- make all listings have status Active
- make sure there are 3+ listings in the grid, remember ID of some listing in the middle of the list
- go to Tools → Query Database section
- run SQL like: UPDATE inp_Listings SET ExpiresOn = NULL WHERE ListingId = {remembered Id} to break validation for remembered listing in the middle of listings grid, displayed on Directory → Paid Listings section
- go to Directory → Paid Listings section
- confirm, that Expires On is empty for remembered listing
- select some listings including listing with empty Expires On field, some listing before it and some listing after it in the grid
- confirm that pressing Decline button do not change Status for listing with empty Expires On, and correctly change statuses for other selected listings, and no fatal error happens
- restore listing Expires On and statuses, changed in this test
Diff Detail
- Repository
- rINP In-Portal
- Branch
- /in-portal/branches/5.2.x
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 259 Build 259: arc lint + arc unit
Event Timeline
- test plan is missing tests, that demonstrate, that problem, described in Confluence, no longer happen under same conditions
- please remove ShippingQuoteEngineEventHandler::iterateItems method because the only thing it does it rolling back event status change, that no longer happens in parent class method
- add temporary line "$event->status = kEvent::erFAIL;" to CategoriesEventHandler::OnBeforeItemUpdate
- confirm that Approve and Decline buttons do not change Status for categories, but also no fatal error happens
- remove temporary line "$event->status = kEvent::erFAIL;" from CategoriesEventHandler::OnBeforeItemUpdate
Following addition to the test plan does test something, but not the originally failing scenario, in which:
- several items were selected in grid (e.g. 5)
- only item in the middle (e.g. 3rd) had validation error
- only items before one with validation error were updated in db
After the fix all items (except one with validation error) must be updated in DB and test plan needs to cover that scenario.
... added Clear() calls to fit new plan.
Thanks for discovering, that without Clear() call before Load() call the validation errors are not reset and blocks upcoming updates. This unfortunately is out of the scope of this task and therefore:
- I've created a discussion about it specifically http://community.in-portal.org/x/2gH3 and a task in JIRA that I've assiged to you
- please do the following:
- undo latest changes (where Clear() method call was added)
- create differential revision for http://jira.in-portal.org/browse/INP-1514 task
- update test plan to say, that above created revision must be applied upfront for this test plan to work
Changed test plan
Test plan does include the needed test case with failed validation, but unfortunately this happens only for 1 of 4 changes places. It would be best to create mini test plans (for each section using sub-heading markup, see below) where complete test scenario (including relevant SQLs to emulate validation error) for following cases would be written:
- no validation error and selected records were updated
- validation error in non-last record and all but invalid records were updated
The sub-heading markup looks like this:
## sub-heading one # plan item 1 # plan item 2 ## sub-heading two # plan item 1 # plan item 2
modules/in-link/units/listings/listings_event_handler.php | ||
---|---|---|
611–612 | Please remove this line. Same changes was done in other, but not this place. |