36 Commits

Author SHA1 Message Date
Andrew Nicols
32f1542b5e
MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 13:28:55 +08:00
Anupama Sarjoshi
42f4b0a991 MDL-77406 core: Logs to record user file uploaded in draft area 2023-03-28 17:49:54 +01:00
Bas Brands
16c726cde7 MDL-71610 core_behat: use new edit mode step in feature files 2021-09-29 09:25:36 +02:00
Peter Dias
46daeb3ba1 MDL-70946 repository: Reenable and fix the disabled behat test 2021-09-20 08:01:15 +08:00
Marina Glancy
440073ff20 MDL-64554 user: make private files editor modal/ajax form 2021-02-17 18:06:57 +01:00
Shamim Rezaie
58994fe8bb MDL-68353 test: Update filemanager/filepicker xpath selector 2020-05-29 14:50:35 +10:00
Kathrin Osswald
4805a5b96f MDL-60975 behat tests: Added search for admin setting filepickers 2019-12-05 11:12:00 +01:00
Mihail Geshoski
e8edca25b8 MDL-65957 repository_upload: Throw exception if @_file_upload is missing 2019-10-01 09:35:53 +08:00
sam marshall
05a5d547b3 MDL-64979 Behat: Add option to increase timeouts 2019-03-19 17:17:55 +00: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
Mathew May
e3652936f3 MDL-58428 theme: Shift templates ready for Bootstrapbase removal
Move behat override steps from boost into their Moodle core locations &
Move the effected core behat steps into bootstrapbase as override steps.
2019-02-22 15:19:33 +08: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
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
John Okely
4887d15228 MDL-49983 navigation: Remove 'my' from user context navigation 2015-05-04 12:38:50 +08:00
Damyon Wiese
46a2fbc4b7 MDL-49412 Navigation: Remaining behat fixed for nav branch
Behat is passing after this change.

Part of MDL-45774.
2015-04-10 17:19:28 +08:00
Tim Hunt
16282275d1 MDL-48639 behat upload: support absolute paths & better errors
In a custom step I needed to be able to upload a file I had previously
saved to $CFG->dataroot/temp, but that was not possible.

Also, the failure was not at all obvious. I have made it throw a clear
exception if the file you are trying to upload does not exist.
2014-12-19 11:58:59 +00: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
Dan Poltawski
7f42ee92eb Merge branch 'MDL-44440_master' of git://github.com/dmonllao/moodle 2014-03-10 13:45:26 +08:00
David Monllao
759b323e0e MDL-43236 behat: Updating references to deprecated methods 2014-03-07 16:05:21 +08:00
David Monllao
a542553d42 MDL-44440 behat: Refactoring features to use I navigate to
Replacing multiple "I expand node" steps by the
new "I navigate to". Also fixing few I navigate to
when dealing with non-JS.
2014-03-07 14:46:54 +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
561e9bb92e MDL-43480 behat: Switching @_only_local and @_alerts to @_file_upload and @_alert 2014-01-17 10:41:37 +08:00
David Monllao
c1faf86bd1 MDL-42625 behat: Make behat pacient
* When looking for texts inside the page or inside
  other containers we should wait until the elements
  are visible.
* Same when expanding tree nodes.
* Normalizing loops to spin() function using
  behat_base::TIMEOUT and behat_base::EXTENDED_TIMEOUT,
  leaving TIMEOUT for DOM load processes and
  EXTENDED_TIMEOUT for long processes that involves JS
  too.
* Add page load waits between actions that involves
  reloading the page.
2013-12-09 11:08:42 +08:00
David Monllao
d1e55a47be MDL-42625 behat: Step definitions + related changes in features
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.

* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
  to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
  uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
  are ready to interact with
* Changing the select an option implementation to deal with the different
  drivers implementations when listening to JS events.
2013-12-06 13:10:24 +08:00
Marina Glancy
07622451a3 MDL-42174 behat: deprecate upload file to filepicker step in favour of filemanager 2013-12-05 21:00:25 +11:00
Marina Glancy
fcb6ed4776 MDL-42174 More behat tests for filepicker 2013-12-05 21:00:20 +11:00
Ankit Agarwal
93fe4d2a11 MDL-42293 behat: Add suport for custom admin paths to the behat upload repository step 2013-10-21 09:29:16 +08:00
David Monllao
3897608152 MDL-39635 behat: XPath cleanups
- Escaping steps arguments redirected to other steps
- Adding normalized-space() in all contains() assertions
- General xpaths review
- Convering provided xpath text strings to xpath literals
  to avoid problems with arguments containing both single
  quotes and double quotes
2013-07-19 10:02:36 +02:00
David Monllao
50eeae5906 MDL-40033 behat: Waiting until file manager is available 2013-06-21 15:37:33 +08:00
Frederic Massart
9b5e61ac1e MDL-39477 repository: Introducing data generators for repositories 2013-05-28 10:44:43 +08:00
David Monllao
5d7b6307b1 MDL-39586 behat: Closed list of stackeholders 2013-05-09 18:38:13 +08:00
David Monllao
550d842e3c MDL-39232 behat Normalize feature tags according to component names 2013-04-30 11:54:47 +08:00
David Monllao
2904bf9ddf MDL-38620 behat: New test
According to MDLQA-1175; test
removed from repository_upload as
is included in MDLQA-1175 test
2013-03-28 11:19:07 +08:00
David Monllao
e533d14f09 MDL-38184 behat: Fixing problem with Windows tests 2013-03-13 15:21:57 +08:00
David Monllao
4f07b654e1 MDL-38184 repository_upload: Adding tests 2013-03-11 06:56:02 +08:00
David Monllao
aa988a9a6c MDL-38184 repository_upload: New step definition 2013-03-08 11:57:56 +08:00