From d40fa9848f7f9a0fe1646ac5146e083a7e475030 Mon Sep 17 00:00:00 2001 From: Scott Sutherland <38484948+scott-nz@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:56:53 +1300 Subject: [PATCH 1/2] remove FacebookWebDriver check as Selenium2Driver has functionality now (#256) --- src/Utility/DebugTools.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Utility/DebugTools.php b/src/Utility/DebugTools.php index 6fa2a7c..a4789bc 100644 --- a/src/Utility/DebugTools.php +++ b/src/Utility/DebugTools.php @@ -133,10 +133,6 @@ trait DebugTools { // Validate driver $driver = $this->getSession()->getDriver(); - if (!($driver instanceof FacebookWebDriver)) { - $this->logMessage('ScreenShots are only supported for FacebookWebDriver: skipping'); - return; - } $feature = $event->getFeature(); $step = $event->getStep(); $path = $this->prepareScreenshotPath(); From fdde72118bd6c80c79244a3174535727d4868861 Mon Sep 17 00:00:00 2001 From: Scott Sutherland <38484948+scott-nz@users.noreply.github.com> Date: Tue, 14 Nov 2023 17:14:44 +1300 Subject: [PATCH 2/2] correct required type for findEmail() $to (#255) Follows same logic as thereIsAnEmailTitled() which sets the $to param of findEmail() to an empty string --- src/Context/EmailContext.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Context/EmailContext.php b/src/Context/EmailContext.php index bef2257..e16a13d 100644 --- a/src/Context/EmailContext.php +++ b/src/Context/EmailContext.php @@ -64,7 +64,7 @@ class EmailContext implements Context */ public function thereIsAnEmailFromTo($negate, $direction, $email) { - $to = ($direction == 'to') ? $email : null; + $to = ($direction == 'to') ? $email : ''; $from = ($direction == 'from') ? $email : null; $match = $this->mailer->findEmail($to, $from); if (trim($negate ?? '')) { @@ -84,7 +84,7 @@ class EmailContext implements Context */ public function thereIsAnEmailFromToTitled($negate, $direction, $email, $subject) { - $to = ($direction == 'to') ? $email : null; + $to = ($direction == 'to') ? $email : ''; $from = ($direction == 'from') ? $email : null; $match = $this->mailer->findEmail($to, $from, $subject); $allMails = $this->mailer->findEmails($to, $from);