Skip to content

Commit 34456fa

Browse files
committed
MQE-1799: Throw exception during generation when leaving out .url for amOnPage
1 parent 787897e commit 34456fa

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

dev/tests/unit/Magento/FunctionalTestFramework/Test/Objects/ActionObjectTest.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,8 @@ public function testResolveUrl()
233233
*/
234234
public function testResolveUrlWithNoAttribute()
235235
{
236+
$this->expectException(TestReferenceException::class);
237+
236238
// Set up mocks
237239
$actionObject = new ActionObject('merge123', 'amOnPage', [
238240
'url' => '{{PageObject}}'
@@ -247,19 +249,6 @@ public function testResolveUrlWithNoAttribute()
247249

248250
// Call the method under test
249251
$actionObject->resolveReferences();
250-
251-
// Expect this warning to get generated
252-
TestLoggingUtil::getInstance()->validateMockLogStatement(
253-
"warning",
254-
"page url attribute not found and is required",
255-
['action' => $actionObject->getType(), 'url' => '{{PageObject}}', 'stepKey' => $actionObject->getStepKey()]
256-
);
257-
258-
// Verify
259-
$expected = [
260-
'url' => '{{PageObject}}'
261-
];
262-
$this->assertEquals($expected, $actionObject->getCustomActionAttributes());
263252
}
264253

265254
/**

0 commit comments

Comments
 (0)