Commit graph

155 commits

Author SHA1 Message Date
Mathew May
b259b8bd7a MDL-58428 phpunit: PHPUnit will mock the theme config in testing.
Other fixes to the require paths, correct the class names in fixtures for 'nofeatures' mock theme.
2019-02-26 16:24:46 +08:00
Andrew Nicols
4aefaf653b MDL-58428 behat: Check parent themes for Behat override steps.
Behat will now look at the current themes' parents for Behat ovveride steps.
If found we will use the steps replacing the Moodle core steps.
2019-02-26 16:21:23 +08:00
sam marshall
3e42f121f2 MDL-63977 Behat: Read config.json version from running Ionic server 2019-02-12 11:18:21 +00:00
sam marshall
ff3ccab52e MDL-63977 Behat: Rename Ionic config variables for consistency 2019-02-11 16:40:56 +00:00
sam marshall
1959e16412 MDL-63977 Behat: Allow Behat testing of the Moodle mobile app
This change allows you to write and run Behat tests that cover the
mobile app. These should have the @app tag. They will be run in the
Chrome browser using an Ionic server on the local machine.

See config-dist.php for configuration settings, or full docs here:
https://docs.moodle.org/dev/Acceptance_testing_for_the_mobile_app
2019-02-11 16:20:42 +00:00
Ryan Wyllie
f074d6f086 MDL-63303 message: remove behat tests for messaging 2018-11-15 14:43:21 +08:00
Jonathan Champ
b2f349a433 MDL-54035 accesslib: separate role definition cache clear
Thanks to MDL-49398, we can separate the combined user session and role
definition cache clearing function into two separate functions. At the
same time, we want to identify and remove mark_dirty() calls that were
added for role definition changes but were incorrectly left behind.

Change highlights:
 - Remove unnecessary mark_dirty() calls performed after
   assign_capability(), unassign_capability(), delete_role(),
   deleted contexts, brand new contexts
 - Move role definition cache clear from the user-centric
   accesslib_clear_all_caches() to the newly created,
   role-dedicated accesslib_reset_role_cache()
2018-09-21 09:17:42 -04:00
cescobedo
8d2432f543 MDL-55365 behat: Remove deprecated api's in behat_config_mananger.php 2018-07-20 09:34:26 +02:00
Mark Johnson
104fc7fd0d MDL-62408 behat: Correct PHPUNIT_TEST checks in behat_config_util 2018-05-15 09:09:25 +01:00
Bas Brands
3ec69c2ece MDL-56511 theme_boost: Update to Bootstrap 4 stable
Behat fixes by David Monllao <davidm@moodle.com>
    - Blocks
    - Modals
    - Messaging styling
    - Breadcrumb
    - Pagination
    - Course & categories management
2018-04-18 09:31:53 +08:00
Shamim Rezaie
1b63ff10f9 MDL-61380 behat: Added autocomplete_suggestions name selector 2018-03-07 06:52:01 +11:00
Andrew Nicols
dd4ac3d2ce MDL-60078 tool_usertours: Adjust accessibility checks for all themes 2018-01-25 12:45:56 +08:00
KietLy
26872a8006 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:36:25 +07:00
Adrian Greeve
ab2095fb0f MDL-60515 groups: Behat test for viewing the group description. 2017-11-01 15:24:38 +08:00
Eloy Lafuente (stronk7)
9376583e4f Merge branch 'MDL-59883-master' of git://github.com/andrewnicols/moodle 2017-10-03 20:58:23 +02:00
Andrew Nicols
1e815600d8 MDL-59883 behat: Check aria-label for button content 2017-10-02 13:05:15 +08:00
Andrew Nicols
434d7869df MDL-59882 behat: Add newer modal type to selectors 2017-10-02 12:43:16 +08:00
Damyon Wiese
8857c715d1 MDL-40759 icons: Behat fixes for font-awesome 2017-03-17 15:52:18 +08:00
Eloy Lafuente (stronk7)
5c73061bb9 Merge branch 'wip-mdl-57765' of https://github.com/rajeshtaneja/moodle 2017-02-21 23:53:39 +01:00
Rajesh Taneja
1dc320f140
MDL-57765 behat: Allow exact selectors to be used
In Blocks with boost theme selector to
find block with name is partial match
it might fail in some cases. It would
be nice to use exact match to avoid
unexpected failures
2017-01-30 11:37:34 +08:00
Rajesh Taneja
36cc9f8e37
MDL-54628 behat: Set behat dir for each run under behat_dataroot
Before this patch behat_dataroot for parallel runs
were created at same level as ->behat_dataroot
After this patch, it will be created 1 level under
->behat_dataroot with BEHAT_PARALLEL_SITE_NAME
prefix and run number as suffix. This will allow
common files as test enabled and parallel run info
to be saved in parent directory and access it easily.
2017-01-30 08:51:53 +08:00
Rajesh Taneja
1d37f50ee0
MDL-54628 behat: Show parallel run command with proper rerun option 2017-01-23 10:37:19 +08:00
Rajesh Taneja
1024f6d1ec
MDL-57531 behat: Set noreplyaddress to valid address
noreplyaddress should be a valid address, else
it will not be saved. For behat we don't send
email, so set it to noreply@example.com, to
avoid failing validation on localhost
2017-01-05 14:40:16 +08:00
Rajesh Taneja
54348ea6d7
MDL-57232 behat: Add blocks in boost theme
Currently behat in boost depend on blocks
so make sure we have them.
2016-12-02 22:48:13 +08:00
Rajesh Taneja
65eb39c0b4
MDL-56898 behat: Increase autosavefrequency for behat tests
We don't need editor to autosave, as this cause
unwanted ajax request
2016-11-21 09:25:35 +08:00
Damyon Wiese
737b54fe9e MDL-55215 lesson: JS is required for some lesson behats
Lesson is using the searchselector which only supports JS - so some
tests need javascript tags.

Also fixed support for filling a passwordunmask field with JS enabled by
id.
2016-11-07 14:23:46 +08:00
Rajesh Taneja
d87dac7e70 MDL-56006 behat: Load proper context by helper 2016-10-25 11:21:53 +08:00
Rajesh Taneja
4422ffc55e MDL-56006 behat: Get proper feature and context for default theme
No matter which theme is default theme, overridden
context and blacklisted features should be respected
2016-10-25 10:15:20 +08:00
David Monllao
48f43096e0 Merge branch 'MDL-55074-master' of git://github.com/damyon/moodle 2016-10-24 12:33:51 +08:00
Andrew Nicols
ca25005c69 MDL-53048 form: Rewrite passwordunmask
This version:
* should work with the Behat Goutte driver
* should not suffer from password autofill anxiety
* should allow unmasking (and masking) of a password
* should allow editing of passwords in either masked, or unmasked form

AMOS BEGIN
 MOV [revealpassword,core_form],[passwordunmaskrevealhint,core_form]
AMOS END
2016-10-24 09:24:39 +08:00
Damyon Wiese
0f73f3ab42 MDL-55074 blocks: navigation and settings blocks optional
This is a theme config setting.
They are forced on for behat always.
2016-10-21 12:37:33 +08:00
Dan Poltawski
ad2eba780a Merge branch 'MDL-55926-master-3' of git://github.com/ryanwyllie/moodle 2016-10-18 16:31:42 +01:00
Dan Poltawski
c0b1f18930 MDL-55924 behat: fix misleading comment 2016-10-18 13:24:08 +01:00
Ryan Wyllie
f05c1013de MDL-55926 message: add behat tests for message ui 2016-10-18 00:26:21 +00:00
Rajesh Taneja
e1ad3a959d
MDL-55924 behat: Add core features to specified theme's 2016-10-07 10:55:41 +08:00
Rajesh Taneja
95e1d5e50f
MDL-55746 behat: Support blacklist theme features by tags 2016-10-07 09:05:26 +08:00
Rajesh Taneja
904306389f
MDL-55713 behat: Include named and partial behat selector files 2016-10-06 07:55:51 +08:00
Andrew Nicols
d98217550b MDL-55713 behat: Bad rebase conflict resolution fix 2016-10-05 15:19:07 +08:00
Andrew Nicols
4187b3e521 MDL-55713 behat: Correct all references to selectortype 2016-10-05 14:10:26 +08:00
Andrew Nicols
b31984d5a2 MDL-55713 2016-10-05 11:46:49 +08:00
Andrew Nicols
6ee51d010f MDL-55713 behat: Correct copy/paste error 2016-10-05 11:04:56 +08:00
Eloy Lafuente (stronk7)
b976e22a7e Merge branch 'MDL-55713-master-3' of git://github.com/andrewnicols/moodle 2016-10-05 00:34:01 +02:00
Andrew Nicols
520071f0bd MDL-55713 behat: Adjust how NamedPartials are loaded 2016-10-04 09:18:02 +08:00
Rajesh Taneja
a1d92ef25d
MDL-55986 behat: Fix unit tests to use fixtures 2016-10-03 15:38:24 +08:00
Rajesh Taneja
b04ca8c8a1
MDL-55986 behat: Added option to optimize parallel runs by tags
run.php should only be used for running behat
before this patch if tags were passed, then behat.yml
was being re-written with features havings tags.
As this is not ideal, this option is now removed and
features with tags will be optimally split
by init.php when --optimize-run option is passed
2016-10-03 15:38:04 +08:00
Rajesh Taneja
c2b0213b08
MDL-55986 behat: Re-factor exiting api's
Return all features and contexts, so they can
be filtered well at one place
2016-09-30 13:32:20 +08:00
Frédéric Massart
a82c49473b MDL-55071 behat: Adapting form_row selector to reflect recent changes
Labels are no longer used for static elements. The form row selector
has been changed to include "labels" from static elements.
2016-09-28 11:13:53 +02:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
This is a squash of many small fixes.
The list of changes are:

Initial set of behat selectors overrides required for new theme.

set core behat selectors if not overridden by theme

Remove pause

Fix for checkboxes not saving properly

Custom override for click in the user menu

Fix for behat guessing the field type.

Behat fix for guessing the correct field type.

Fix for missing closeElementBefore mforms mess.

Fix for textareas not displaying their contents.

Fix availability form element

Fix action menu selectors for activities in a course page

Fix textareas not retaining their values

Fix selector for blocks

I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.

Fix for frozen attribute in form elements

Use input instead of button while behat is still broken

Fix for navigation selector override

Behat selector fixes and multi-select fixes for templated select

Fix for configure blocks selector + booleans for autocomplete

Fixes for course_summary behat tests

Allow optgroups in single_select

Behat fixes for block_navigation

Fixes for url form element and activity chooser selectors

blocks_social - fix specific selector for behat

Fix export_for_template for selectgroups element.

Dont set empty id on the form

Fix direct call to behat_navigation in backup context

Checkbox empty value fix

Fix for assign grading panel popouts

file picker overrides to find a file manager in the page

Fix chat tests to use element name

Make selectors in mod_data behat less specific

MDL-55839: recent activity behat test relies on time()

SQUASH Honour mform element "class" attribute on the container

SQUASH Fixes for behat in mod_forum

SQUASH search form template showing value as text next to the button

SQUASH undo double selectgroup fix

SQUASH - The slightly different structure to action menus breaks course drag and drop

SQUASH Wrap loading icon in a span so the selector still works.

SQUASH Fix fragile javascript in report_loglive

SQUASH Fix tabtree, and selectgroups for mod_feedback

Also - do-not enhance the action menu - we are dropping support for this.

SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.

SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)

SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.

SQUASH Fix lti behat tests - they were cheating and using a context step from quiz

SQUASH Behat fixes for quiz with new theme

SQUASH behat fixes for mod_wiki

SQUASH Workshop behat fixes

SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.

SQUASH Fixes for grades behat tests

SQUASH behat fixes for groups

SQUASH blacklist action menu tests

SQUASH Fix for tag form element missing "manage standard tags" link

SQUASH Incomplete fixes for course behat tests

SQUASH behat fixes for badges

SQUASH Tags fixes for behat

SQUASH filepicker fixes for behat

SQUASH Abort guessing field type when we hit 'html'

SQUASH Fix for admin/tool/behat tests

SQUASH fix for admin tool behat tests

SQUASH fix for availabilty conditions hiding "aria-hidden" elements

SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view

SQUASH Blocks fixed

Fix behaviour of unchecked checkboxes

SQUASH Remove incorrect step in user test

SQUASH behat fixes for course tests

Part of MDL-55071
2016-09-23 10:55:16 +01:00
Rajesh Taneja
544de35bc3
MDL-55379 phpunit: Preserve config option if passed 2016-09-22 10:45:47 +08:00
Eloy Lafuente (stronk7)
0f4b338fbb Merge branch 'wip-mdl-55379' of https://github.com/rajeshtaneja/moodle 2016-09-20 02:06:32 +02:00