Skip to content

Commit f73ccf1

Browse files
MTO-136: [Test] Captcha on Contact Us form
- Defects fixed
1 parent 6e4b7ac commit f73ccf1

File tree

6 files changed

+17
-39
lines changed

6 files changed

+17
-39
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/fixture.xsd">
9+
<fixture name="comment">
10+
<field name="captcha" is_required="0" />
11+
</fixture>
12+
</config>

dev/tests/functional/tests/app/Magento/Captcha/Test/Repository/Customer.xml

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

dev/tests/functional/tests/app/Magento/Captcha/Test/TestCase/CaptchaOnContactUsTest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Captcha\Test\TestCase\CaptchaOnContactUsTest" summary="Check CAPTCHA on Contact Us Page" ticketId="MAGETWO-43609">
1010
<variation name="CaptchaOnContactUsTestVariation1">
11-
<data name="comment/dataset" xsi:type="string">comment_with_captcha</data>
11+
<data name="comment/data/comment" xsi:type="string">some comment</data>
12+
<data name="comment/data/captcha" xsi:type="string">111</data>
13+
<data name="comment/data/customer/dataset" xsi:type="string">default</data>
1214
<data name="configData" xsi:type="string">captcha_storefront_contact_us</data>
1315
<constraint name="Magento\Contact\Test\Constraint\AssertContactUsSuccessMessage"/>
1416
</variation>

dev/tests/functional/tests/app/Magento/Contact/Test/Fixture/Comment.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
repository_class="Magento\Contact\Test\Repository\Comment"
1212
class="Magento\Contact\Test\Fixture\Comment">
1313
<field name="comment" is_required="0" />
14-
<field name="captcha" is_required="0" />
1514
<field name="customer" is_required="0" source="Magento\Contact\Test\Fixture\Comment\Customer"/>
1615
</fixture>
1716
</config>

dev/tests/functional/tests/app/Magento/Contact/Test/Fixture/Comment/Customer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function __construct(
4949
$this->fixtureFactory = $fixtureFactory;
5050
$this->params = $params;
5151
$this->fixtureData = $data;
52+
$this->data = $data;
5253
}
5354

5455
/**
@@ -71,8 +72,8 @@ public function getData($key = null)
7172
$customer->persist();
7273
}
7374
$this->customer = $customer;
75+
$this->data = $customer->getData();
7476
}
75-
$this->data = $customer->getData();
7677

7778
return parent::getData($key);
7879
}

dev/tests/functional/tests/app/Magento/Contact/Test/Repository/Comment.xml

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

0 commit comments

Comments
 (0)