259 Commits

Author SHA1 Message Date
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
Dan Poltawski
771a8d3394 Merge branch 'wip-mdl-55117' of https://github.com/rajeshtaneja/moodle 2016-09-19 11:39:41 +01:00
Rajesh Taneja
a396321e44
MDL-55117 behat: Re-initialise to ensure modified config is not used
As behat cli process is 1 run for features
Any modification in  will be reflected
in later runs on cli. In this case
- disabling enablebadges in block_badges.feature
- reflected while running cron in award_badges.feature
2016-09-14 10:46:19 +08:00
Dan Poltawski
3e6ac53831 Merge branch 'wip-mdl-55759' of https://github.com/rajeshtaneja/moodle 2016-09-12 11:36:18 +01:00
Rajesh Taneja
1b319d3d3b
MDL-55379 phpunit: Fix dir separator for cli commands 2016-09-12 09:48:40 +08:00
Rajesh Taneja
9b9afffe5b
MDL-55288 forms: Set data attribute to form fields 2016-09-05 14:10:24 +08:00
Rajesh Taneja
b9b1ca9ed1
MDL-55759 behat: No profile guided alloaction in phpunit 2016-08-30 14:49:08 +08:00
Rajesh Taneja
6c1cc55d92
MDL-55072 behat: Cache themesuite and theme contexts 2016-08-25 09:17:38 +08:00
Rajesh Taneja
3037458049 MDL-55072 behat: Fixed behat_selectors to be removed from contexts 2016-08-24 13:24:34 +08:00
Rajesh Taneja
b4bc4286bb
MDL-55072 behat: Allow behat_selectors to be overridden
if theme/tests/behat/behat_theme_{THEME_NAME}_behat_selectors.php
file exits, and has class with same file name then we will
call behat_theme_{THEME_NAME}_behat_selectors::register_moodle_selectors()
to register theme specific selectors. If they are different
then core then they will override
2016-08-24 09:13:13 +08:00
Rajesh Taneja
5aa9b5cee3
MDL-55072 behat: Added support for overriding theme tests 2016-08-24 08:57:15 +08:00
Rajesh Taneja
e99f0cbba6
MDL-55072 behat: refactor behat_config_manager 2016-08-19 06:49:13 +08:00
Dan Poltawski
5c602bf5bb MDL-54553 behat: check statuscode of http request 2016-05-18 11:15:58 +01:00
Mark Nelson
e45aac5f8e MDL-54019 core_behat: fixed typo 2016-05-02 18:09:39 +08:00
Rajesh Taneja
80c3b48409 MDL-52502 behat: Flush buffer to show differences 2016-04-07 09:29:50 +08:00
Rajesh Taneja
921faad9ad MDL-53571 behat: Use Escaper for escaping
xpathLiteral has been depreacted, use Escaper instead
2016-04-06 15:38:31 +08:00
Rajesh Taneja
e891c8381e MDL-52502 behat: Ensure php web and cli version is same 2016-04-05 11:46:44 +08:00
Rajesh Taneja
0e1c34e51a MDL-46891 behat: Added support for $CFG->behat_profiles
This config will be supported to avoid broken configuration
in future. As this is limited, we need will still use
->behat_config to set config values which can't be set by
behat_profiles
2016-03-11 10:51:17 +08:00
Rajesh Taneja
86055d11f9 MDL-46891 behat: Optimised login step and context helper 2016-03-11 10:51:15 +08:00
Rajesh Taneja
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
Rajesh Taneja
c2df9b3b90 MDL-52427 behat: Fixed question selectors
As class is changed, we need to convert selector
to check if class is contained, rather then checking
selecting with specific class.
2015-12-22 10:43:22 +08:00
Dan Poltawski
14248189b7 Merge branch 'wip-mdl-50163' of https://github.com/rajeshtaneja/moodle 2015-11-23 11:33:55 +00:00
Rajesh Taneja
8f76de32d9 MDL-50163 behat: Return subcontext from session
Creating a new context with new mink context
with different session was keeping the session
and was not returning proper session information
2015-11-17 13:27:10 +08:00
Dan Poltawski
950af0b4e0 MDL-51988 behat: select a table by <th> tag 2015-11-11 12:30:35 +00:00
Andrew Nicols
d78613701c MDL-49841 testing: Correct composer incantation 2015-08-14 10:27:53 +08:00
Luke Carrier
0897e19093 MDL-50611 test: use cURL extension to download Composer
The curl binary is nowhere near as common in Windows environments as it is
in Linux and Mac ones. In order to encourage more users to adopt Behat and
PHPUnit for their testing, we should avoid introducing unnecessary
hurdles.
2015-06-22 15:50:01 +01:00
Rajesh Taneja
b7861ddab3 MDL-49772 behat: Removed optimization as it's not required
This api is called very few times in behat
initilisation process, so such optimization
is an over engineer. Hence removing it.
2015-05-27 11:20:48 +08:00
Rajesh Taneja
91a96d402a MDL-49772 behat: Added support to updatestep file by parallel run 2015-05-21 13:24:29 +08:00
Rajesh Taneja
0fe86bbdbb MDL-49799 behat: replaced asd.com with example.com
asd.com is a valid domain, we should use reserved domain names for testing
2015-04-20 11:21:20 +08:00
Rajesh Taneja
f8b71928d2 MDL-49456 behat: Use proper dir separator to support different os 2015-04-17 11:48:37 +08:00
Rajesh Taneja
72bac0d3f2 MDL-49456 behat: Fixed following issues in parallel run
1. Parallel run without feature should exit with success
2. Updated exit codes to be more clear for each process
3. Fixed wwwroot and dataroot while executing with tags
4. Added support for running scenario/feature
5. Added support for or'ing tags
6. Added support for running single behat site
7. Fixed wrong example in help
8. Use parallel run only when parallel > 1
9. Exit showing behat site is not installed
10. Exit with error, if not a valid option
11. Added usage in help to explain how to use command
12. run.php should be able to run from any path
13. Pass all arguments to single run
2015-04-16 15:44:25 +08:00
Tim Hunt
5954a9de10 MDL-49445 behat: selectors should match the most specific tr or li
I also fixed the text rule, which already did this, to use the same
idiom. It is unnecessarily inefficient to count all the things and
compare to 0. Not exists should be faster.

Also, updated all the selectors here to consistently start relative to
the current node (.//, not //).
2015-03-13 14:28:13 +00:00
Dan Poltawski
9be958e2f0 MDL-39752 fix whitespace errors
(And some others unrelated to above issue, because its spring and i'm
cleaning).
2015-03-10 14:13:20 +00:00
Rajesh Taneja
17e675a7fc MDL-39752 behat: Return proper behat dir if config set 2015-03-10 13:51:37 +00:00
Rajesh Taneja
5b9e6b5526 MDL-39752 behat: Added support for behat_wwwroot and behat_dataroot 2015-03-09 07:49:25 +08:00
Rajesh Taneja
1bff616611 MDL-39752 behat: Added Fromrun and torun for running on multiple vms
https://circleci.com
2015-03-09 07:11:56 +08:00
Rajesh Taneja
ef95c163e4 MDL-39752 behat: Don't package default step count with moodle 2015-03-09 07:11:56 +08:00
Rajesh Taneja
027212b034 MDL-39752 behat: Use symfony2/process 2015-03-09 06:52:54 +08:00
Rajesh Taneja
3c71c15c26 MDL-39752 behat: Modified following for parallel run:
1. Create behat datadir within behat_dataroot not at same level
2. Define suffix for link and not use hard-coded values
3. Renamed ns_parallel to run.php
4. Rename variables to best understand them
5. Added support for each run to specify db, prefix, rerun and profile.
6. Showing number of steps in each line of parallel run.
2015-03-09 06:52:54 +08:00
Tony Levi
08e7f97ee4 MDL-39752 behat: Parallel execution support 2015-03-09 06:52:54 +08:00
Tim Hunt
92caa214ef MDL-49335 Behat: new question selector
So you can say things like
    And I click on "True" "radio" in the "First question" "question"
2015-03-03 11:19:48 +00:00
Tim Hunt
f70fbc05e1 MDL-49334 behat: sort selector lists 2015-03-03 11:13:31 +00:00
Ankit Agarwal
bbcd308340 MDL-48559 behat: Moving cronclionly to the installer 2015-02-17 14:33:56 +08:00
John Okely
102cfc4964 MDL-44520 behat: Add behat selectors for section, activity 2015-02-06 10:34:54 +08:00
Eloy Lafuente (stronk7)
4f6c2d9f8b MDL-48741 behat: add new moodle_list formatter (rerun compatible) 2015-01-16 03:13:58 +01:00
Sam Hemelryk
255501c900 Merge branch 'mdl48517' of https://github.com/tlevi/moodle 2014-12-09 15:15:51 +13:00
Tony Levi
064b8b7fe3 MDL-48517: behat: Fix reset ordering reversal (MDL-48302) 2014-12-07 23:58:24 +10:30