Closed muhme closed 1 month ago
i was able to reproduce on 2nd run
": "Save failed with the following error: Joomla\\Component\\Menus\\Administrator\\Table\\MenuTable::_getNode(1, id) failed.",
and the #__menu table is messed up for lft, rgt
__menu
table 👍 __menu
shows that there is no entry with id 1
and therefore the used parent_id 1
fails, hardwired the parent_id
was changed to (at this moment) existing id 2
the test run was successful several timesparent_id
But the more important question is, why is the so importand looking __menu entry id=1 title=Menu_Item_Root alias=root
deleted in a fresh instance with running only sytem tests? The obvious suspect is the test case can delete a site menu item
in the same file. And with this question, the approach of getting the first menu entry and using its id
sound more like a work around and does not fix the main cause that menu entry #1 being deleted.
please test #43456
on fresh macOS-docker-4.4-dev installation
SiteMenuItems.cy.js
deletes one more entry from the __menu
table, starting with id=1
can create a site menu item
fails because there is no longer a parent menu entry id=1INSERT INTO `jos44_menu` (`id`, `menutype`, `title`, `alias`, `note`, `path`, `link`, `type`, `published`, `parent_id`, `level`, `component_id`, `checked_out`, `checked_out_time`, `browserNav`, `access`, `img`, `template_style_id`, `params`, `lft`, `rgt`, `home`, `language`, `client_id`, `publish_up`, `publish_down`) VALUES
(1, '', 'Menu_Item_Root', 'root', '', '', '', '', 1, 0, 0, 0, NULL, NULL, 0, 0, '', 0, '', 0, 43, 0, '*', 0, NULL, NULL);
gh pr checkout 43456
tests/System/integration/api/com_menus/SiteMenuItems.cy.js
has changed to beforeEach
SiteMenuItems.cy.js
__menu
entries are deleted :white_check_mark: Thank you for fixing 😄
Steps to reproduce the issue
npm run cypress:run -- --spec 'tests/System/integration/api/com_menus/SiteMenuItems.cy.js'
Expected result
all 6 tests are successfull
Actual result
the one test 'can create a site menu item' fails with 'Status: 400 - Bad Request'
System information (as much as possible)
Additional comments