Skip to content

Commit 5287f23

Browse files
authored
Merge pull request #468 from magento-commerce/master
Sync PR to develop
2 parents c810d1d + 2eac159 commit 5287f23

File tree

6 files changed

+41
-12
lines changed

6 files changed

+41
-12
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,3 @@ jobs:
149149

150150
- name: Run tests
151151
run: bin/functional
152-
153-

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Magento Functional Testing Framework Changelog
22
================================================
33

4+
5.0.6
5+
---------
6+
### Fixes
7+
* Updated copyright check to use the new Adobe copyright.
8+
* Resolved errors caused by whitespace-only comments.
9+
* Addressed deprecation warnings from spomky-labs/otphp.
10+
411
5.0.5
512
---------
613
### Enhancements

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "magento/magento2-functional-testing-framework",
33
"description": "Magento2 Functional Testing Framework",
44
"type": "library",
5-
"version": "5.0.5",
5+
"version": "5.0.6",
66
"license": "AGPL-3.0",
77
"keywords": ["magento", "automation", "functional", "testing"],
88
"config": {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
/**
3+
* Copyright 2025 Adobe
4+
* All Rights Reserved.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\FunctionalTestingFramework\DataTransport\Auth\Tfa;
9+
10+
use DateTimeImmutable;
11+
use Psr\Clock\ClockInterface;
12+
13+
class Clock implements ClockInterface
14+
{
15+
/**
16+
* Return DateTimeImmutable class object
17+
*
18+
* @return DateTimeImmutable
19+
*/
20+
public function now(): DateTimeImmutable
21+
{
22+
return new DateTimeImmutable();
23+
}
24+
}

src/Magento/FunctionalTestingFramework/DataTransport/Auth/Tfa/OTP.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ private static function create($path)
5757
throw new TestFrameworkException('Unable to get OTP' . PHP_EOL . $e->getMessage());
5858
}
5959

60-
self::$totps[$path] = TOTP::create($secret);
60+
self::$totps[$path] = TOTP::create(
61+
$secret,
62+
TOTP::DEFAULT_PERIOD,
63+
TOTP::DEFAULT_DIGEST,
64+
TOTP::DEFAULT_DIGITS,
65+
TOTP::DEFAULT_EPOCH,
66+
new Clock()
67+
);
6168
self::$totps[$path]->setIssuer('MFTF');
6269
self::$totps[$path]->setLabel('MFTF Testing');
6370
}

src/Magento/FunctionalTestingFramework/Extension/TestContextExtension.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,6 @@ public function stepName(\Codeception\Event\StepEvent $e)
383383
//Hard set to 200; we don't expose this config in MFTF
384384
$argumentsLength = 200;
385385
$stepKey = null;
386-
387386
if (!($e->getStep() instanceof Comment)) {
388387
$stepKey = $this->retrieveStepKeyForAllure($e->getStep(), $e->getTest()->getMetadata()->getFilename());
389388
$isActionGroup = (
@@ -400,16 +399,10 @@ public function stepName(\Codeception\Event\StepEvent $e)
400399
}
401400
}
402401
// DO NOT alter action if actionGroup is starting, need the exact actionGroup name for good logging
403-
if (strpos($stepAction, ActionGroupObject::ACTION_GROUP_CONTEXT_START) === false
404-
&& !($e->getStep() instanceof Comment)
405-
) {
402+
if (strpos($stepAction, ActionGroupObject::ACTION_GROUP_CONTEXT_START) === false) {
406403
$stepAction = $e->getStep()->getHumanizedActionWithoutArguments();
407404
}
408405
$stepArgs = $e->getStep()->getArgumentsAsString($argumentsLength);
409-
if (!trim($stepAction)) {
410-
$stepAction = $e->getStep()->getMetaStep()->getHumanizedActionWithoutArguments();
411-
$stepArgs = $e->getStep()->getMetaStep()->getArgumentsAsString($argumentsLength);
412-
}
413406
$stepName = '';
414407

415408
if (isset($stepName)) {

0 commit comments

Comments
 (0)