Closed cahirodoherty-learningpool closed 7 months ago
It is possible to use the boxmenu as a sub menu only. The whole test assumes that boxmenu is being used as the main menu, which won't always be the case. It would be better to navigate to a contentobject (course/menu) which is a boxmenu and then perform these tests.
It is possible to use the boxmenu as a sub menu only. The whole test assumes that boxmenu is being used as the main menu, which won't always be the case. It would be better to navigate to a contentobject (course/menu) which is a boxmenu and then perform these tests.
I agree with the sentiment here but I'm at a loss as to how/where that could be done. sorry. Could you point me in the right direction?
Using this code comment https://github.com/adaptlearning/adapt-contrib-boxMenu/blob/master/js/adapt-contrib-boxMenu.js#L13 we can see that it's possible to use a boxMenu view with _component: "boxMenu"
and _view: "boxMenu
or in the classic mode defined here https://github.com/adaptlearning/adapt-contrib-boxMenu/blob/master/js/adapt-contrib-boxMenu.js#L9-L10 with either _type: "course"
or _type: "menu"
.
After the cy.getData();
Do something like:
this.boxMenus = this.data.filter(item => item._component === 'boxMenu' || item._view === 'boxMenu');
if (!this.boxMenus.length) this.boxMenus = this.data.filter(item => ['course', 'menu'].includes(item._type));
Then run the tests on each this.boxMenus
only. Navigate to each menu. Waiting appropriately for some sign that the menu has finished rendering (as in that other issue with the cy.wait
problem).
:tada: This issue has been resolved in version 6.5.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Subject of the issue/enhancement/features
There isn't much in the tests to specifically identify that the landing page is a boxmenu content object