RTC Unit/System Tests bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
22 Jul 2026

follow-up discussion at pr #46657 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Refactor db_createCategory to dynamically set lft and rgt values based on existing categories. Update db_deleteCategory to adjust lft and rgt after deletion.

Testing Instructions

run the test suite

Actual result BEFORE applying this Pull Request

#__categories table don't respect nested set table

Expected result AFTER applying this Pull Request

#__categories table respect nested set table

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar alikon alikon - open - 22 Jul 2026
avatar alikon alikon - change - 22 Jul 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Jul 2026
Category JavaScript Unit Tests
avatar alikon alikon - change - 22 Jul 2026
Labels Added: Unit/System Tests PR-5.4-dev
avatar alikon alikon - change - 22 Jul 2026
The description was changed
avatar alikon alikon - edited - 22 Jul 2026
avatar alikon alikon - change - 22 Jul 2026
Title
Refactor category creation and deletion logic
[5.4][cypress]Refactor category creation and deletion logic
avatar alikon alikon - edited - 22 Jul 2026
avatar alikon alikon - change - 22 Jul 2026
The description was changed
avatar alikon alikon - edited - 22 Jul 2026
avatar muhme muhme - test_item - 22 Jul 2026 - Tested successfully
avatar muhme
muhme - comment - 22 Jul 2026

I have tested this item ✅ successfully on 2d207b4

* Tested with JBT using MariaDB

  • Created category grandmother, with child mother and grandchilds daughter and son
  • Before PR
    • Checked categories table entries with lft and rgt values
    • Running administrator/components/com_categories/Category.cy.js (with inserted cy.wait) and seen db_createCategory creates lft=1 and rgt=0 category
  • Applied PR with gh pr checkout 48133
    • ✅ Running administrator/components/com_categories/Category.cy.js (with inserted cy.wait) and seen db_createCategory creates lft=27 and rgt=28 and ROOT is set rgt=29
    • ✅ Ran each of the four modified tests twice without any problems, and no test categories were left behind
    • ✅ The ROOT, grandmother, mother, daughter and son categories are still intact with correct lft and rgt
      This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48133.
avatar muhme
muhme - comment - 22 Jul 2026

I have tested this item ✅ successfully on 2d207b4

* Tested with JBT using MariaDB

  • Created category grandmother, with child mother and grandchilds daughter and son
  • Before PR
    • Checked categories table entries with lft and rgt values
    • Running administrator/components/com_categories/Category.cy.js (with inserted cy.wait) and seen db_createCategory creates lft=1 and rgt=0 category
  • Applied PR with gh pr checkout 48133
    • ✅ Running administrator/components/com_categories/Category.cy.js (with inserted cy.wait) and seen db_createCategory creates lft=27 and rgt=28 and ROOT is set rgt=29
    • ✅ Ran each of the four modified tests twice without any problems, and no test categories were left behind
    • ✅ The ROOT, grandmother, mother, daughter and son categories are still intact with correct lft and rgt
      This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/48133.
avatar muhme
muhme - comment - 22 Jul 2026

@alikon Thank you very much for your contribution 👍

Could you please extend tests/System/README.md file? After line 237, in the list of available commands:

- **db_deleteMenuItem** - Deletes a menu item with the given title
- **db_deleteCategory** - Deletes a category with the given title
avatar alikon alikon - change - 23 Jul 2026
Labels Added: bug
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jul 2026
Category JavaScript Unit Tests Unit Tests Repository JavaScript
avatar muhme
muhme - comment - 23 Jul 2026

Set RTC as one maintainer review and one test successfully

avatar richard67 richard67 - change - 23 Jul 2026
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 23 Jul 2026

RTC


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

avatar richard67
richard67 - comment - 23 Jul 2026

RTC


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

avatar richard67 richard67 - change - 23 Jul 2026
Labels Added: RTC
avatar richard67 richard67 - change - 23 Jul 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-07-23 19:11:15
Closed_By richard67
avatar richard67 richard67 - close - 23 Jul 2026
avatar richard67 richard67 - merge - 23 Jul 2026
avatar richard67
richard67 - comment - 23 Jul 2026

Thanks @alikon for this PR, @laoneo for review, and @muhme for testing.

Add a Comment

Login with GitHub to post a comment