? ? ? Maintainers Checked Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
25 Apr 2022

Everywhere that we have an empty trash button it asks you to confirm before the trash is emptied as this is a destructive change.

Fields was missing this.

Testing Instructions

Create and trash a field
Filter the fields by status trashed
select the field
click on empty trash inn the toolbar

Actual result BEFORE applying this Pull Request

fields are immediately deleted

Expected result AFTER applying this Pull Request

popup message is displayed to confirm before deletion

Documentation Changes Required

avatar brianteeman brianteeman - open - 25 Apr 2022
avatar brianteeman brianteeman - change - 25 Apr 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2022
Category Administration com_fields
avatar richard67
richard67 - comment - 25 Apr 2022

@brianteeman The system tests are failing for this PR, and I think it could be related to your changes so the tests might need some changes, too. See the log here https://ci.joomla.org/joomla/joomla-cms/53603/1/30 :

 I delete field "Field title","Field deleted"
   I am on page "/administrator/index.php?option=com_fie..."
  [GET] http://localhost/mysql/administrator/index.php?option=com_fields&view=fields&context=com_content.article
   I get config "timeout"
   I wait for element {"id":"filter_search"},90
   I execute js "[].forEach.call(document.querySelectorA..."
   I select option "//*[@id="filter_state"]","-2"
   I wait 2
   I fill field {"id":"filter_search"},"Field title"
   I click {"id":"filter_search"}
   I check all results 
  Selecting Checkall button
   I wait 2
   I click toolbar button "Empty trash"
   I get config "timeout"
   I wait for text "Field deleted",90,{"id":"system-mess...}
  Screenshot and page source were saved into '/********/src/tests/Codeception/_output/' dir
 ERROR 

The screenshot then looks like this: https://ci.joomla.org/artifacts/joomla/joomla-cms/4.1-dev/37650/system-tests/53603/ContentFieldListCest.Field.mysql.fail.png

avatar richard67
richard67 - comment - 25 Apr 2022

Will try to get someone to advise with the system tests.

avatar laoneo
laoneo - comment - 25 Apr 2022

The system test needs to be adapted of fields. Something like here shuould probably work https://github.com/joomla/joomla-cms/blob/4.1-dev/tests/Codeception/_support/Step/Acceptance/Administrator/Content.php#L229.

avatar brianteeman
brianteeman - comment - 25 Apr 2022

will take a look this afternoon

avatar richard67
richard67 - comment - 25 Apr 2022

@brianteeman I think it needs to replace this line here

https://github.com/joomla/joomla-cms/blob/4.1-dev/tests/Codeception/_support/Step/Acceptance/Administrator/Field.php#L121

by these 2 lines:

$I->wait(2);
$I->acceptPopup();
avatar brianteeman brianteeman - change - 25 Apr 2022
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2022
Category Administration com_fields Administration com_fields Unit Tests
avatar richard67
richard67 - comment - 25 Apr 2022

It seems to work.

avatar brianteeman
brianteeman - comment - 25 Apr 2022

This PR brings the behaviour of Empty Trash in Fields to be consistent with all other uses. The test has also been updated to be consistent with all the other tests for Empty Trash.

If the test is incomplete then it is incomplete eveyrwhere and should be updated in its own pull request.

avatar richard67
richard67 - comment - 25 Apr 2022

This PR brings the behaviour of Empty Trash in Fields to be consistent with all other uses. The test has also been updated to be consistent with all the other tests for Empty Trash.

If the test is incomplete then it is incomplete eveyrwhere and should be updated in its own pull request.

I would be ok with that.

avatar toivo
toivo - comment - 26 Apr 2022

I have tested this item successfully on 36524df

Tested successfully in Joomla 4.1.3-dev of 25 April.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37650.

avatar toivo toivo - test_item - 26 Apr 2022 - Tested successfully
avatar beefcakefu
beefcakefu - comment - 26 Apr 2022

I have tested this item successfully on 36524df


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37650.

avatar beefcakefu beefcakefu - test_item - 26 Apr 2022 - Tested successfully
avatar Quy Quy - change - 26 Apr 2022
Status Pending Ready to Commit
avatar Quy
Quy - comment - 26 Apr 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37650.

avatar brianteeman brianteeman - change - 29 Apr 2022
Labels Added: ?
avatar brianteeman brianteeman - change - 29 Apr 2022
Labels Added: ?
avatar richard67
richard67 - comment - 29 Apr 2022

@laoneo Now as your suggested change has been implemented, please approve the changes on GitHub so the it does not show any requested changes anymore. Thanks in advance.

avatar richard67 richard67 - alter_testresult - 29 Apr 2022 - beefcakefu: Tested successfully
avatar richard67 richard67 - alter_testresult - 29 Apr 2022 - toivo: Tested successfully
avatar richard67
richard67 - comment - 29 Apr 2022

Previous human test results and RTC status are still valid since the commit after that only changed the system tests, which are still passing.

avatar bembelimen bembelimen - close - 30 Apr 2022
avatar bembelimen bembelimen - merge - 30 Apr 2022
avatar bembelimen bembelimen - change - 30 Apr 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-04-30 02:51:18
Closed_By bembelimen
Labels Added: Maintainers Checked
avatar bembelimen
bembelimen - comment - 30 Apr 2022

Thx

avatar brianteeman
brianteeman - comment - 30 Apr 2022

thanks

Add a Comment

Login with GitHub to post a comment