Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 26a2cc7

Browse files
author
Dmytro Yushkin
committed
MAGETWO-63855: Create functional automated for complete Signifyd flow
1 parent 04f56f4 commit 26a2cc7

23 files changed

+461
-348
lines changed

Test/Block/Adminhtml/Order/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Magento\Ui\Test\Block\Adminhtml\DataGrid;
99

1010
/**
11-
* Backend Data Grid for managing "Sales Order" entities.
11+
* Admin Data Grid for managing "Sales Order" entities.
1212
*/
1313
class Grid extends DataGrid
1414
{

Test/Block/Sandbox/WebhookAdd.php

Lines changed: 0 additions & 146 deletions
This file was deleted.

Test/Block/Sandbox/WebhookGrid.php

Lines changed: 0 additions & 94 deletions
This file was deleted.

Test/Block/Sandbox/CaseInfo.php renamed to Test/Block/SignifydConsole/CaseInfo.php

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\Signifyd\Test\Block\Sandbox;
6+
namespace Magento\Signifyd\Test\Block\SignifydConsole;
77

88
use Magento\Mtf\Block\Block;
99

@@ -19,6 +19,13 @@ class CaseInfo extends Block
1919
*/
2020
private $flagCaseAsGoodButton = '[class*="flag-case-good"]';
2121

22+
/**
23+
* Css selector of "Flag Case As Bad" button.
24+
*
25+
* @var string
26+
*/
27+
private $flagCaseAsBadButton = '[class*="flag-case-bad"]';
28+
2229
/**
2330
* Css selector of guarantee status.
2431
*
@@ -83,13 +90,28 @@ class CaseInfo extends Block
8390
private $billingAddress = '[data-dropdown="streetLinks0"]';
8491

8592
/**
86-
* Flags case as good.
93+
* Flags case as good or bad.
94+
*
95+
* @param string $flagType
96+
* @return void
97+
*/
98+
public function flagCase($flagType)
99+
{
100+
$flagSelector = ($flagType === 'Good')
101+
? $this->flagCaseAsGoodButton
102+
: $this->flagCaseAsBadButton;
103+
104+
$this->_rootElement->find($flagSelector)->click();
105+
}
106+
107+
/**
108+
* Flags case as bad.
87109
*
88110
* @return void
89111
*/
90-
public function flagCaseAsGood()
112+
public function flagCaseAsBad()
91113
{
92-
$this->_rootElement->find($this->flagCaseAsGoodButton)->click();
114+
$this->_rootElement->find($this->flagCaseAsBadButton)->click();
93115
}
94116

95117
/**

Test/Block/Sandbox/CaseSearch.php renamed to Test/Block/SignifydConsole/CaseSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\Signifyd\Test\Block\Sandbox;
6+
namespace Magento\Signifyd\Test\Block\SignifydConsole;
77

88
use Magento\Mtf\Block\Form;
99

Test/Block/Sandbox/SignifydLogin.php renamed to Test/Block/SignifydConsole/SignifydLogin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
namespace Magento\Signifyd\Test\Block\Sandbox;
6+
namespace Magento\Signifyd\Test\Block\SignifydConsole;
77

88
use Magento\Mtf\Block\Form;
99

0 commit comments

Comments
 (0)