Skip to content

Instantly share code, notes, and snippets.

@dmonllao
dmonllao / gist:4728164
Created February 7, 2013 03:27
Nonsense feature to check that MDL-37750 does not provoke any regression
@MDL-37750
Feature: Wait ALWAYS for the page to be loaded
In order to avoid false failures
As a moodle developer
I need to check that this patch works
@javascript
Scenario: Big tests to run all the modified steps
Given the following "courses" exists:
| fullname | shortname | category |
@dmonllao
dmonllao / gist:6879254
Created October 8, 2013 03:57
Should fail as "Permissions" is hidden
Feature: Test the should see hover
@javascript
Scenario: Hover a non visible text
Given I am on homepage
And I log in as "admin"
And I should see "Permissions"
@dmonllao
dmonllao / gist:7746252
Last active December 29, 2015 23:59
Behat cross-browser config excluding non-supported tags
// Remember to move the @_only_local tag to the non-local servers.
// Set servers IPs.
$linuxip = '127.0.0.1';
$windowsip = '192.168.xxx.xxx';
$osxip = '192.168.xxx.xxx';
$CFG->behat_config = array(
'phantomjs-linux' => array(
'filters' => array(
@dmonllao
dmonllao / gist:7981702
Created December 16, 2013 02:58
XAMPP 1.8.1 contents
[2012-09-30] XAMPP for Linux 1.8.1
This version of XAMPP includes:
- Apache 2.4.3
- MySQL 5.5.27
- PHP 5.4.7
- Perl 5.14.2
- ProFTPD 1.3.4a
- phpMyAdmin 3.5.2.2
- OpenSSL 1.0.1c
@dmonllao
dmonllao / gist:7982994
Created December 16, 2013 06:14
Moodle-Behat-ZombieJS (ZombieJS script)
var zombie = require("zombie");
zombie.visit("http://moodle.org", {debug: true}, function(err, browser) {
if (err) {
console.log(err.message);
} else {
console.log(browser.html());
}
});
@dmonllao
dmonllao / gist:7983009
Created December 16, 2013 06:16
Moodle-Behat-ZombieJS (moodle.org JS errors)
Zombie: 301 => https://moodle.org/
Zombie: GET https://moodle.org/ => 200
Zombie: GET https://moodle.org/theme/javascript.php/moodleofficial/1385121489/footer => 200
Zombie: GET https://moodle.org/lib/javascript.php/1385121489/lib/javascript-static.js => 200
Zombie: GET https://moodle.org/theme/yui_combo.php?rollup/1385121489/mcore-min.js => 200
Zombie: GET https://moodle.org/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple-min.js => 200
Zombie: Cannot read property 'parentNode' of undefined TypeError: Cannot read property 'parentNode' of undefined
at https://moodle.org/:10:58
at https://moodle.org/:11:5
in https://moodle.org/
@dmonllao
dmonllao / gist:7983020
Created December 16, 2013 06:18
Moodle-Behat-ZombieJS (behat test site, master, JS errors)
Zombie: GET http://localhost/INTEGRATION/master/index.php => 200
Zombie: GET http://localhost/INTEGRATION/master/lib/javascript.php/1386731529/lib/javascript-static.js => 200
Zombie: GET http://localhost/INTEGRATION/master/theme/yui_combo.php?rollup/3.13.0/yui-moodlesimple.js&rollup/1386731529/mcore-debug.js => 200
Zombie: Cannot read property 'className' of null TypeError: Cannot read property 'className' of null
at http://localhost/INTEGRATION/master/index.php:3:14
in http://localhost/INTEGRATION/master/index.php
moodle-core-dock-loader: Dock loader initialising
Zombie: Cannot call method 'delegate' of null TypeError: Cannot call method 'delegate' of null
at Object.initLoader (/INTEGRATION/master/theme/yui_combo.php:54714:55)
at http://localhost/INTEGRATION/master/index.php:6:104
@dmonllao
dmonllao / gist:7984660
Created December 16, 2013 09:56
accept_alert excpetion
[ERROR - 2013-12-16T09:55:35.588Z] RouterReqHand - _handle - Thrown => {
"message": "Request => {\"headers\":{\"Accept\":\"application/json;charset=UTF-8\",\"Content-Length\":\"0\",\"Content-Type\":\"application/json;charset=UTF-8\",\"Expect\":\"100-continue\",\"Host\":\"127.0.0.1:4444\"},\"httpVersion\":\"1.1\",\"method\":\"POST\",\"post\":\"\",\"url\":\"/accept_alert\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"accept_alert\",\"directory\":\"/\",\"path\":\"/accept_alert\",\"relative\":\"/accept_alert\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"/accept_alert\",\"queryKey\":{},\"chunks\":[\"accept_alert\"]},\"urlOriginal\":\"/session/317fd5f0-6638-11e3-9cab-c560a1347f3d/accept_alert\"}",
"name": "Invalid Command Method",
"line": 183,
"sourceId": 139853707986368,
"sourceURL": ":/ghostdriver/request_handlers/session_request_handler.js",
"stack": "Invalid Command Method: Request => {\"headers\":{\"Acce
@dmonllao
dmonllao / gist:8016244
Created December 18, 2013 02:11
Configuration to run Zombie JS It does not work using zombie 1.4.1 as required by mink-zombie, will work when zombie 2 is released and mink-zombie requires it
// config.php
$CFG->behat_config = array(
'default' => array(
'extensions' => array(
'Behat\MinkExtension\Extension' => array(
'zombie' => '',
'javascript_session' => 'zombie'
)
)
)
replace_take_care_with_me "I fill in\(.*\)with" "I set the field\1to" "" 1