1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-27 11:02:38 +01:00

167 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
4f6c2d9f8b MDL-48741 behat: add new moodle_list formatter (rerun compatible) 2015-01-16 03:13:58 +01:00
Eloy Lafuente (stronk7)
c0d8831ae7 MDL-45699 behat: Don't use behat/lib.php functions in core.
behat/lib.php script should not be usually included, neither any of its functions
used within mooodle code at all. It's for exclusive use of behat and
moodle setup.php. For places requiring a different/special behavior
needing to check if are being run  as part of behat tests, use:
    if (defined('BEHAT_SITE_RUNNING')) { ...
2014-12-23 12:29:44 +01:00
Eloy Lafuente (stronk7)
093c161d46 Merge branch '45699-29' of git://github.com/samhemelryk/moodle
Conflicts:
	cache/upgrade.txt
2014-12-23 02:01:36 +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
Sam Hemelryk
a52c5e63eb MDL-45699 behat: can now use alt cache config 2014-12-06 12:09:48 +13:00
Tim Hunt
4e4c8d3a27 MDL-48373 behat: new container selector for list items. 2014-12-05 12:22:26 +00:00
Rajesh Taneja
ef1d45b394 MDL-48302 behat: Reset cache before scenario 2014-11-21 10:22:56 +08:00
Rajesh Taneja
ac19f245bf MDL-48174 core_lang: support for ->skiplangupgrade in lang cron task
Similar to upgrade_language_pack(), update_langpacks_task should
respect skiplangupgrade config. Also, this should be added to behat
whitelist, so it can be disabled during on-sync period, when lang
pack for master is not available.
2014-11-11 16:52:20 +08:00
sam marshall
002ccdcf49 MDL-44725 Add Behat support for setting grouping condition (14)
Makes it possible to add a grouping condition when creating an
activity, using the Behat field type API. You can set the field
using a syntax 'Grouping: NAME' (at present, only groupings are
supported, obviously we could potentially extend this to add
support for other conditions if needed).

Tested in Firefox and Chrome in JS mode, and in non-JS mode.
2014-09-02 13:03:35 +01:00
Rajesh Taneja
7d1c6a6e62 MDL-46817 behat: Table selector support css
Previously table selector supported id and caption only.
But in few cases we don't have proper id, so added support
for css
2014-08-15 13:11:33 +08:00
Rajesh Taneja
955118d831 MDL-43835 behat: Fixed matches for select form field 2014-06-25 12:54:52 +08:00
Damyon Wiese
e3adee555b MDL-44871 Atto: Move custom select text step to atto specific step definition. 2014-06-11 15:29:20 +08:00
Damyon Wiese
7d8f825bbf MDL-44871 Atto behat tests: Modified the tests to work around focus bugs with workspaces
The main changes here are that the "select the text in" step was modified to select only the
first text node in the editor field, and to focus on it's parent instead of the entire editable div.

Some tests had to be modified to match the new behaviour, and another "real" bug was found in the table plugin.
2014-06-11 14:34:48 +08:00
Damyon Wiese
457a9fa6c5 MDL-44871 Behat: Add tests for Atto functionalities (some of them) 2014-06-10 14:42:00 +08:00
Rajesh Taneja
1bce3a70d9 MDL-44839 admin: Moved all system executable paths to config
AMOS BEGIN
 MOV ['gspath','assignfeedback_editpdf'],['pathtogs','admin']
 MOV ['gspath_help','assignfeedback_editpdf'],['pathtogs_help','admin']
AMOS END
2014-06-03 17:33:49 +08:00
Marina Glancy
f06daff29d MDL-45320 behat: change to block selector 2014-05-20 20:43:37 +08:00
David Monllao
28c86221ac MDL-45294 behat: Updating block references to aria label value
Also improving moodle selectors xpath expressions
readability.
2014-05-20 20:43:36 +08:00
David Monllao
02a61c6461 MDL-45294 behat: Supporting an aria-label as a block ref 2014-05-20 20:43:36 +08:00
Sam Hemelryk
cfd97e02f7 MDL-45231 theme_clean: navbar is absolute when running behat in IE 2014-05-07 09:42:07 +12:00
Sam Hemelryk
31a8eddc24 MDL-45231 theme_clean: default navbar to absolute when running behat 2014-05-05 08:11:46 +12:00
David Monllao
560fc52dca MDL-45284 behat: Replace wrongly triggered not found exception 2014-04-27 11:55:47 +07:00
Dan Poltawski
63476b0f6f Merge branch 'MDL-44619_master' of git://github.com/dmonllao/moodle 2014-04-17 17:02:04 +08:00
David Monllao
25a49eb660 MDL-44621 behat: Adding text selector
Same behaviour than I should see step,
it looks for the text in the node + descendants,
but, to get the lower level match discards the
nodes with children that also contains the
same text.
2014-04-15 20:13:44 +07:00
David Monllao
af4830a257 MDL-44619 behat: Converting MDLQA-8
In a standard forum, students can start discussions
add replies and attach files to their posts.
2014-04-09 19:34:11 +07:00
David Monllao
9bc60e016b MDL-44619 behat: filemanager field manager
Enough to allow attachments use in multi-field steps.
2014-04-09 19:03:26 +07:00
David Monllao
020cf9aeef MDL-44619 behat: Helper to init contexts outside behat 2014-04-09 15:12:09 +07:00
sam marshall
07ba4070e4 MDL-44837 Behat: 'dialogue' selector only works for confirm dialogues
The dialogue selector in Behat (used only in one place) didn't work for
other types of standard Moodle notification dialogue.
2014-03-27 16:45:04 +00:00
Damyon Wiese
786ced9925 MDL-43883 Behat: Fix deprecation and move custom matches to the editor field only. 2014-03-27 12:36:37 +08:00
Rajesh Taneja
3e469992a1 MDL-44084 behat: Fixed setting value for form editor 2014-03-27 12:12:09 +08:00
Rajesh Taneja
b033c16390 MDL-44084 behat: Fixed behat set_value for atto editor 2014-03-26 15:56:21 +08:00
Rajesh Taneja
3233f32dfb MDL-44557 behat: Resize window only possible with javascript 2014-03-26 14:45:30 +08:00
Marina Glancy
f2bf88130d Merge branch 'wip-mdl-44557' of git://github.com/rajeshtaneja/moodle 2014-03-26 14:10:53 +08:00
Rajesh Taneja
3b0b5e570d MDL-44557 behat: Allow nehat to resize window
Run all behat with medium (1024x768) screen size to
avoid failures with small screen size. Also, added
feature to let scenario chnage screen size if need be.
2014-03-26 13:59:14 +08:00
Damyon Wiese
b725a0eb19 MDL-43883 Atto behat: Make the set_field js handle atto or simple textarea 2014-03-26 10:01:49 +08:00
Damyon Wiese
5f3ea8cf66 MDL-43883 Atto behat: Rubrics are expecting magic tweaking in text from tinymce. 2014-03-26 10:01:49 +08:00
Damyon Wiese
9f07f05a48 MDL-43883 Behat: Make Atto the default text editor and adjust behat to use it. 2014-03-26 10:01:49 +08:00
Jerome Mouneyrac
9e103d6e15 MDL-42025 assignfeedback_editpdf: add behat tests 2014-03-18 17:14:31 +08:00
Eloy Lafuente (stronk7)
1700bec3c6 Merge branch 'MDL-43266_master-last-fixes' of git://github.com/dmonllao/moodle
Conflicts:
	lib/phpunit/classes/util.php
2014-03-13 19:12:25 +01:00
Dan Poltawski
7f42ee92eb Merge branch 'MDL-44440_master' of git://github.com/dmonllao/moodle 2014-03-10 13:45:26 +08:00
David Monllao
c51c3b5575 MDL-43236 behat: Deprecate old steps
Correcting grammar errors and deprecating
the previous steps definitions:
- behat_data_generators::the_following_exists()
- behat_general::should_exists()
- behat_general::should_not_exists()
2014-03-07 16:05:21 +08:00
David Monllao
370e88d4fe MDL-44440 behat: Other fixes to make clean work properly
- Update the step to follow links inside a treeview
  to work also when JS is disabled.
- Make regions accept header and footer.
- Change some locators refering to non-clean compatible
  regions.
- Restricting click to the table row in forum tracking
  because seems to conflict with the navigation bar when
  using narrow window sizes.
2014-03-07 14:27:52 +08:00
David Monllao
8aff0eec9d MDL-43738 behat: Refactoring the field type guesser
The previous behaviour delegates the responsability
of overwriting the 3 public methods to the child
classes, now the field type or moodleform field is
guessed earlier in the execution flow.

Other changes introduced here:
- Fix wrong moodleform detection when there is a form
  in the page but the field we are dealing with is
  not inside it.
- Updating the last week feature files to these new
  step definitions.
- Some coding style changes.
2014-02-27 18:43:20 +08:00
David Monllao
a525414125 MDL-43738 behat: Updating steps definitions and deprecating methods 2014-02-27 18:22:05 +08:00
David Monllao
c3f1e9532d MDL-43738 behat: Normalization and major refactoring of getters and setters
Every single step that sets or gets a value from a field
has been updated to follow the same behaviour both when
using it through a single step or through generic steps
like "I fill the moodle form with:", to resume all the
changes:
- Created a behat_form_group to re-guess the field type
  and act appropriately setting and getting it's value
- Normalize all getters and setters to use behat_form_field
  children
- Complete behat_form_checkbox to trigger the appropiate JS
  event needed to perform some JS scripts that are listening
- Refactor MDL-43713 multi-select changes and remove
  the two new steps introduced there as that behaviour can
  be managed from the generic getter
- Added a new step definition to check a capability permission
  as we changed the way radio buttons gets it's value
2014-02-27 18:22:03 +08:00
Eloy Lafuente (stronk7)
5f66d46e22 MDL-43713 behat: improve multi-select support
This patch implements:

1) Normalization of options. Before the patch options
in a select were being returned as "op1 op2 op3" by selenium
and "op1 op2 op3" by goutte. With the patch, those lists
are always returned like "op1, op2, op3". If real commas are
needed when handling multiple selects they should
be escaped with backslash in feature files.

2) Support for selecting multiple options. Before the patch
only one option was selected and a new selection was cleaning the
previous one. With the patch it's possible to pass "op1, op2" in
these steps:
  - I fill the moodle form with (table)
  - I select "OPTION_STRING" from "SELECT_STRING"

3) Ability to match multiple options in this steps. Before the
patch matching of multiple was really random, now every every
passed option ("opt1, opt2") is individually verified. It applies
to these 2 steps:
  - the "ELEMENT" select box should contain "OPTIONS"
  - the "ELEMENT" select box should not contain "OPTIONS"

4) Two new steps able to verify if a form have some options selected or no:
  - the "ELEMENT" select box should contain "OPTIONS" selected
  - the "ELEMENT" select box should contain "OPTIONS" not selected

5) Change get_value from xpath search to Mink's getValue() that is immediate
(does not need form submission) and works for all browsers but Safari, that
fails because of the extra ->click() issued.

Note all the changes 1-4 only affect to multi-select fields. Single
selects should continue working 100% the same.

The change 5) causes Safari to fail. The problem has been traced down to
the extra ->click() present there. Anyway there are not test cases
requiring that "immediate" evaluation right now. Only the special feature
file attached verifies it.
2014-02-27 18:21:43 +08:00
Jerome Mouneyrac
c78f19d153 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:47:25 +08:00
David Monllao
74c78e7483 MDL-43837 behat: Adding reduced timeouts
There are steps where we want to check that
"something" does not appear in the page
or does not exist. We still have to spin
but we don't need to spin for 6 seconds.
2014-02-24 09:43:24 +08:00
David Monllao
e39a7f886e MDL-42404 behat: Adding yui-dialog to dialogue selector 2014-02-12 15:42:05 +08:00
David Monllao
405cdd0441 MDL-43951 behat: Fixing random failure
NodeElement->hasAttribute() (JS enabled) queries selenium
about whether it has any attribute or not, if due to an
AJAX request the field node changed selenium can not access
that node and throws an exception.
2014-02-03 13:59:12 +08:00