44 Commits

Author SHA1 Message Date
Mark Nielsen
b095b36c02 MDL-58948 behat: capture DriverException
Other drivers may throw a DriverException when the popup
or iframe disappears.
2017-06-28 14:34:08 -07:00
Mark Nielsen
f46a2dd913 MDL-58948 behat: Fix spin method when callback throws exception
Was preventing the sleep statements from running.  This caused
steps to fail too early when it was just waiting for something
to change in the browser.
2017-06-28 14:33:51 -07:00
Mark Nielsen
b5be387556 MDL-58948 behat: conditionally execute MoodleSelenium2Driver
There is some specific code being executed that only exists
in the MoodleSelenium2Driver.  Conditionally execute this
code to make it compatible with other Mink drivers.
2017-06-28 12:50:44 -07:00
Mark Nielsen
5536bf4f22 MDL-58948 behat: return the result of the pending JS method
This increases compatibility with other Mink drivers,
in particular, the Chrome Mink Driver.
2017-06-28 11:20:49 -07:00
gthomas2
01f2a530b7 MDL-58023 behat: Improve find_node_in_navigation function 2017-03-13 11:41:23 +00:00
gthomas2
353e78765a MDL-58052 behat: user session function - use to edit current profile 2017-03-03 13:57:01 +00:00
Rajesh Taneja
3df6e801b5
MDL-57168 behat: Ensure drawer is open before clicking the link 2016-11-28 12:57:55 +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
0c1bcb63c6
MDL-46514 behat: Catch php errors in shutdown hook
If error is not displayed in web browser then
it will be caught in shutdown hook, so we can
show it to user
2016-08-23 15:14:38 +08:00
sam marshall
5a14c4d948 MDL-54920 Behat: Allow viewport size to be set consistently
Provides a new Behat step

And I set viewport size to "800x600"
2016-06-14 12:28:24 +01:00
David Monllao
8918a8115e MDL-53796 behat: Move get_debug_text to base class 2016-04-13 10:34:28 +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
eb9ca848fa MDL-53381 behat: Replaced chained steps with api.
Behat 3.x doesn't support chained steps and hence
this is first step to get rid of chained steps in core.
2016-04-06 11:32:49 +08:00
Rajesh Taneja
07298309dc MDL-46891 behat: Move wait in behat_base so it can be used easily 2016-03-11 10:51:16 +08:00
Rajesh Taneja
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
Tim Hunt
41f4dabe2b MDL-52899 behat: make PAGE_READY_JS more robust 2016-01-26 11:23:26 +00:00
Tony Levi
80ac8522cc MDL-48926 behat: Do not poll within spin for non-javascript mode 2015-01-28 10:58:00 +10:30
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
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
9f07f05a48 MDL-43883 Behat: Make Atto the default text editor and adjust behat to use it. 2014-03-26 10:01:49 +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
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
845ceaff9f MDL-43423 behat: Increasing the timeout to 6 seconds 2014-01-08 16:51:17 +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
fcb6ed4776 MDL-42174 More behat tests for filepicker 2013-12-05 21:00:20 +11:00
Sam Hemelryk
8e5f86bcb3 MDL-41988 behat: improvements to spin 2013-10-01 10:24:36 +13:00
David Monllao
17344d4c8f MDL-40566 behat: Moving from behat_command to behat_selectors 2013-09-03 10:28:42 +08:00
David Monllao
28abad1ab2 MDL-39348 behat: Compatibility with Safari and IE
Also changing from SeleniumDriver checking
to GoutteDriver as is less probably to change
goutte than to change selenium.
2013-05-03 10:43:06 +08:00
David Monllao
eff79d5378 MDL-38787 behat: Move to the new Javascript-based test class manager 2013-03-28 16:59:18 +08:00
David Monllao
3db1aec528 MDL-38184 behat: Filepicker management steps
Includes create/open/delete/zip/unzip
of files and folders
2013-03-08 11:57:15 +08:00
David Monllao
0a7f6a02eb MDL-37958 behat: Nasty strings in HTML
Nasty strings includes html entities and
non-breaking spaces followed by spaces which makes
very hard to find these strings in the DOM html,
this patch keeps the non-breaking spaces and all
the nasty characters, but leaves them isolated from
other regular spaces. It swaps the strings to HTML before
finding elements in the HTML that matches that contents.
2013-03-06 13:34:09 +08:00
Eloy Lafuente (stronk7)
88906d068d Merge branch 'MDL-37958_master' of git://github.com/dmonllao/moodle 2013-03-05 19:28:14 +01:00
David Monllao
f8f1bdc315 MDL-38178 behat: Adding find_all and step to expand all form's fieldsets 2013-03-05 14:41:52 +08:00
David Monllao
072f67fcac MDL-38026 behat: Base to write steps to work with specific DOM parts 2013-03-01 16:40:22 +08:00
David Monllao
46ac40cd0b MDL-38025 behat: Compliant with moodlechecker and codechecker 2013-03-01 16:07:04 +08:00
David Monllao
4092397794 MDL-38025 behat: Adding generic manipulation methods
Also required modifications in the affected
steps definitions
2013-03-01 16:06:15 +08:00
David Monllao
49d9112909 MDL-37958 behat: Using behat_form_field base class to interact with all form elements 2013-03-01 09:52:10 +08:00
David Monllao
02ca6219a6 MDL-37858 behat: Removing fixStepArgument
It can be managed by a @Transform in
a centralized way
2013-02-15 13:38:14 +08:00
David Monllao
ff48a235a9 MDL-37750 behat: Elements finders at base level
Set of DOM elements finders to
avoid false fails.
2013-02-08 17:11:27 +08:00
David Monllao
786ea937cc MDL-37657 behat: General steps definitions 2013-01-29 15:31:25 +08:00
David Monllao
d4322e3859 MDL-37656 behat: Base empty class 2013-01-29 12:57:03 +08:00