forked from moodle-an-hochschulen/moodle-theme_boost_union
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise Smart menu behat features for dynamic courses and rules (moo…
…dle-an-hochschulen#765). This performs several optimisations to make these tests a lot faster. Creation of smart menus and menu item has been changed to use generators, rather than filling the forms each time. Manual navigation has been replaced with `I am on the 'identifier' 'type' page` as much as possible. The assertions being made have been optimised. Previously, every assertion of what was in a menu was opening each menu location and checking for each item. Given that there's no option to display different items when a menu is in different location, a lot of this is redunant, and actually opening each menu takes time. I have optimised this so that one scenario does a check that the menu opens and the items are actually visible. Then each scenario tests than an expected item exists in each menu (without opening the menu) and checks for subsequent items just check existance in a single menu. This balances coverage of the different functionality with speed and conciseness of tests.
- Loading branch information
1 parent
cbead11
commit 4d719ac
Showing
7 changed files
with
425 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
371 changes: 179 additions & 192 deletions
371
tests/behat/theme_boost_union_smartmenusettings_menuitems_dynamiccourses.feature
Large diffs are not rendered by default.
Oops, something went wrong.
431 changes: 192 additions & 239 deletions
431
tests/behat/theme_boost_union_smartmenusettings_menuitems_rules.feature
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters