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

Commit bd39aca

Browse files
author
Dmytro Yushkin
committed
MAGETWO-65119: Create/update automated functional tests
- Syncronized checks with new requirements
1 parent 504f03c commit bd39aca

File tree

4 files changed

+0
-73
lines changed

4 files changed

+0
-73
lines changed

Test/Block/Adminhtml/Order/View/FraudProtection.php

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,13 @@
1212
*/
1313
class FraudProtection extends Block
1414
{
15-
/**
16-
* Case Status.
17-
*
18-
* @var string
19-
*/
20-
private $caseStatus = 'td.col-case-status';
21-
2215
/**
2316
* Case Guarantee Disposition.
2417
*
2518
* @var string
2619
*/
2720
private $caseGuaranteeDisposition = 'td.col-guarantee-disposition';
2821

29-
/**
30-
* Case Review Disposition.
31-
*
32-
* @var string
33-
*/
34-
private $caseReviewDisposition = 'td.col-case-review';
35-
36-
/**
37-
* Get Case Status information.
38-
*
39-
* @return string
40-
*/
41-
public function getCaseStatus()
42-
{
43-
return $this->_rootElement->find($this->caseStatus)->getText();
44-
}
45-
4622
/**
4723
* Get Case Guarantee Disposition status.
4824
*
@@ -52,14 +28,4 @@ public function getCaseGuaranteeDisposition()
5228
{
5329
return $this->_rootElement->find($this->caseGuaranteeDisposition)->getText();
5430
}
55-
56-
/**
57-
* Get Case Review Disposition status.
58-
*
59-
* @return string
60-
*/
61-
public function getCaseReviewDisposition()
62-
{
63-
return $this->_rootElement->find($this->caseReviewDisposition)->getText();
64-
}
6531
}

Test/Constraint/AssertCaseInfoOnAdmin.php

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,8 @@ public function processAssert(
5858
$this->signifydData = $signifydData;
5959
$this->orderId = $orderId;
6060

61-
$this->checkCaseStatus();
6261
$this->checkCaseGuaranteeDisposition();
63-
$this->checkCaseReviewDisposition();
6462
}
65-
66-
/**
67-
* Checks case status is correct.
68-
*
69-
* @return void
70-
*/
71-
private function checkCaseStatus()
72-
{
73-
\PHPUnit_Framework_Assert::assertEquals(
74-
$this->signifydData->getCaseStatus(),
75-
$this->orderView->getFraudProtectionBlock()->getCaseStatus(),
76-
'Case status is wrong for order #' . $this->orderId
77-
);
78-
}
79-
8063
/**
8164
* Checks case guarantee disposition is correct.
8265
*
@@ -91,20 +74,6 @@ private function checkCaseGuaranteeDisposition()
9174
);
9275
}
9376

94-
/**
95-
* Checks case review disposition is correct.
96-
*
97-
* @return void
98-
*/
99-
private function checkCaseReviewDisposition()
100-
{
101-
\PHPUnit_Framework_Assert::assertEquals(
102-
$this->signifydData->getReviewDisposition(),
103-
$this->orderView->getFraudProtectionBlock()->getCaseReviewDisposition(),
104-
'Case Review Disposition status is wrong for order #' . $this->orderId
105-
);
106-
}
107-
10877
/**
10978
* @inheritdoc
11079
*/

Test/Fixture/SignifydData.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
repository_class="Magento\Signifyd\Test\Repository\SignifydData"
1313
class="Magento\Signifyd\Test\Fixture\SignifydData">
1414
<field name="team" />
15-
<field name="caseStatus" />
1615
<field name="caseFlag" />
17-
<field name="reviewDisposition" />
1816
<field name="guaranteeDisposition" />
1917
<field name="cvvResponse" />
2018
<field name="avsResponse" />

Test/Repository/SignifydData.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,23 @@
99
<repository class="Magento\Signifyd\Test\Repository\SignifydData">
1010
<dataset name="signifyd_guarantee_approve">
1111
<field name="team" xsi:type="string">autotest</field>
12-
<field name="caseStatus" xsi:type="string">Open</field>
1312
<field name="caseFlag" xsi:type="string">Good</field>
14-
<field name="reviewDisposition" xsi:type="string">Good</field>
1513
<field name="guaranteeDisposition" xsi:type="string">Approved</field>
1614
<field name="cvvResponse" xsi:type="string">CVV2 Match (M)</field>
1715
<field name="avsResponse" xsi:type="string">Full match (Y)</field>
1816
<field name="shippingPrice" xsi:type="string">USD 5.00</field>
1917
</dataset>
2018
<dataset name="signifyd_guarantee_decline">
2119
<field name="team" xsi:type="string">autotest</field>
22-
<field name="caseStatus" xsi:type="string">Open</field>
2320
<field name="caseFlag" xsi:type="string">Bad</field>
24-
<field name="reviewDisposition" xsi:type="string">Fraudulent</field>
2521
<field name="guaranteeDisposition" xsi:type="string">Declined</field>
2622
<field name="cvvResponse" xsi:type="string">CVV2 Match (M)</field>
2723
<field name="avsResponse" xsi:type="string">Full match (Y)</field>
2824
<field name="shippingPrice" xsi:type="string">USD 5.00</field>
2925
</dataset>
3026
<dataset name="signifyd_guarantee_fraudulent">
3127
<field name="team" xsi:type="string">autotest</field>
32-
<field name="caseStatus" xsi:type="string">Open</field>
3328
<field name="caseFlag" xsi:type="string">Bad</field>
34-
<field name="reviewDisposition" xsi:type="string">Fraudulent</field>
3529
<field name="guaranteeDisposition" xsi:type="string">Declined</field>
3630
<field name="avsResponse" xsi:type="string">Unavailable (U)</field>
3731
<field name="shippingPrice" xsi:type="string">GBP 10.00</field>

0 commit comments

Comments
 (0)