Skip to content

Commit

Permalink
Merge branch 'release/0.4.8'
Browse files Browse the repository at this point in the history
Release/0.4.8
  • Loading branch information
MdNadimHossain committed Dec 8, 2020
2 parents 3a50a29 + def3783 commit bbf973b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 21 deletions.
2 changes: 1 addition & 1 deletion composer.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"composer/installers": "^1.2.0",
"cweagans/composer-patches": "^1.6.0",
"drupal-composer/drupal-scaffold": "^2.3",
"drupal/core": "8.8.x",
"drupal/core": "8.9.x",
"drush/drush": "8.3.2",
"vlucas/phpdotenv": "^2.4",
"webflo/drupal-finder": "^1.0"
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"require": {
"dpc-sdp/tide_core": "^1.6.0"
"dpc-sdp/tide_core": "^2.0.0"
},
"suggest": {
"dpc-sdp/tide_media:^1.7.0": "Media and related configuration for Tide Drupal 8 distribution"
Expand Down
33 changes: 14 additions & 19 deletions tests/behat/bootstrap/TideCommonTrait.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* Trait TideTrait.
* Common test trait for Tide.
*
* @todo: Review this trait and try using BehatSteps trait instead.
* @todo Review this trait and try using BehatSteps trait instead.
*/
trait TideCommonTrait {

Expand Down Expand Up @@ -32,7 +32,7 @@ public function assertAuthenticatedByRole($role) {
// actually creating a user with role. By default,
// assertAuthenticatedByRole() will create a user with 'authenticated role'
// even if 'anonymous user' role is provided.
if ($role == 'anonymous user') {
if ($role === 'anonymous user') {
if (!empty($this->loggedInUser)) {
$this->logout();
}
Expand All @@ -58,22 +58,17 @@ public function waitForSeconds($sec) {
*/
public function iWaitForAjaxToFinish($timeout) {
$condition = <<<JS
(function() {
function isAjaxing(instance) {
return instance && instance.ajaxing === true;
}
var d7_not_ajaxing = true;
if (typeof Drupal !== 'undefined' && typeof Drupal.ajax !== 'undefined' && typeof Drupal.ajax.instances === 'undefined') {
for(var i in Drupal.ajax) { if (isAjaxing(Drupal.ajax[i])) { d7_not_ajaxing = false; } }
}
var d8_not_ajaxing = (typeof Drupal === 'undefined' || typeof Drupal.ajax === 'undefined' || typeof Drupal.ajax.instances === 'undefined' || !Drupal.ajax.instances.some(isAjaxing))
return (
// Assert no AJAX request is running (via jQuery or Drupal) and no
// animation is running.
(typeof jQuery === 'undefined' || (jQuery.active === 0 && jQuery(':animated').length === 0)) &&
d7_not_ajaxing && d8_not_ajaxing
);
}());
(function() {
function isAjaxing(instance) {
return instance && instance.ajaxing === true;
}
return (
// Assert no AJAX request is running (via jQuery or Drupal) and no
// animation is running.
(typeof jQuery === 'undefined' || (jQuery.active === 0 && jQuery(':animated').length === 0)) &&
(typeof Drupal === 'undefined' || typeof Drupal.ajax === 'undefined' || !Drupal.ajax.instances.some(isAjaxing))
);
}());
JS;
$result = $this->getSession()->wait($timeout * 1000, $condition);
if (!$result) {
Expand Down

0 comments on commit bbf973b

Please sign in to comment.