157 Commits

Author SHA1 Message Date
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
David Monllao
7e3f5e79d0 MDL-43450 behat: Checking the ->behat_* vars contents before showing the steps list 2014-01-29 14:28:37 +08:00
Eloy Lafuente (stronk7)
9fc25660c5 Merge branch 'MDL-43450_master' of git://github.com/dmonllao/moodle 2014-01-28 00:07:57 +01:00
David Monllao
b8c4d91ca0 MDL-43450 behat: Improving error messages 2014-01-24 16:45:27 +08:00
David Monllao
cca6f37389 MDL-43757 behat: Allowing the form field guesser to detect TinyMCE
It includes 2 more minor fixes:
- Escapes values sent to TinyMCE as it was breaking
  when values contained double quotes.
- Adding seconds to the screenshots directory to
  avoid using the same folder for multiple runs.
2014-01-24 15:06:12 +08:00
David Monllao
ff7139d6cb MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:11:07 +08:00
David Monllao
19a40b1468 MDL-43461 behat: Using linux-style directory separators when using cygwin 2014-01-14 13:10:40 +08:00
David Monllao
845ceaff9f MDL-43423 behat: Increasing the timeout to 6 seconds 2014-01-08 16:51:17 +08:00
Dan Poltawski
267d4927b4 Merge branch 'MDL-43173_master' of git://github.com/dmonllao/moodle 2014-01-08 08:21:06 +08:00
David Monllao
afe9f42adb MDL-43173 behat: Thowing an exception if the JS is not ready 2014-01-03 11:27:54 +08:00
Aaron Barnes
832530e2eb MDL-43394 behat: Fix checkbox action 2013-12-23 15:40:06 +13:00