forked from magento/magento2-functional-testing-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDataReplacementTest.txt
92 lines (90 loc) · 6.46 KB
/
DataReplacementTest.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<?php
namespace Magento\AcceptanceTest\_default\Backend;
use Magento\FunctionalTestingFramework\AcceptanceTester;
use \Codeception\Util\Locator;
use Yandex\Allure\Adapter\Annotation\Features;
use Yandex\Allure\Adapter\Annotation\Stories;
use Yandex\Allure\Adapter\Annotation\Title;
use Yandex\Allure\Adapter\Annotation\Description;
use Yandex\Allure\Adapter\Annotation\Parameter;
use Yandex\Allure\Adapter\Annotation\Severity;
use Yandex\Allure\Adapter\Model\SeverityLevel;
use Yandex\Allure\Adapter\Annotation\TestCaseId;
/**
* @Description("<h3>Test files</h3>verification/TestModule/Test/DataReplacementTest.xml<br>")
*/
class DataReplacementTestCest
{
/**
* @Features({"TestModule"})
* @Parameter(name = "AcceptanceTester", value="$I")
* @param AcceptanceTester $I
* @return void
* @throws \Exception
*/
public function DataReplacementTest(AcceptanceTester $I)
{
$I->fillField("#selector", "StringBefore John StringAfter"); // stepKey: inputReplace
$I->seeCurrentUrlMatches("~\/John~i"); // stepKey: seeInRegex
$I->fillField("#John", "input"); // stepKey: selectorReplace
$I->dragAndDrop("#John", "Doe"); // stepKey: selector12Replace
$I->conditionalClick("Doe", "#John", true); // stepKey: dependentSelectorReplace
$I->amOnUrl("John.html"); // stepKey: urlReplace
$I->searchAndMultiSelectOption("#selector", ["John", "Doe"]); // stepKey: parameterArrayReplacement
$I->fillField("#selector", "StringBefore " . msq("uniqueData") . "John StringAfter"); // stepKey: inputPrefixReplaceMSQPrefix
$I->fillField("#" . msq("uniqueData") . "John", "input"); // stepKey: selectorReplaceMSQPrefix
$I->dragAndDrop("#" . msq("uniqueData") . "John", msq("uniqueData") . "John"); // stepKey: selector12ReplaceMSQPrefix
$I->conditionalClick(msq("uniqueData") . "John", "#" . msq("uniqueData") . "John", true); // stepKey: dependentSelectorReplaceMSQPrefix
$I->amOnUrl(msq("uniqueData") . "John.html"); // stepKey: urlReplaceMSQPrefix
$I->searchAndMultiSelectOption("#selector", [msq("uniqueData") . "John", "Doe"]); // stepKey: parameterArrayReplacementMSQPrefix
$I->click("#" . msq("uniqueData") . "John#" . msq("uniqueData") . "John"); // stepKey: selectorReplaceDupedMSQPrefix
$I->click("#Doe" . msq("uniqueData") . "#Doe" . msq("uniqueData")); // stepKey: selectorReplaceDupedMSQSuffix
$I->fillField("#selector", "StringBefore Doe" . msq("uniqueData") . " StringAfter"); // stepKey: inputReplaceMSQSuffix
$I->fillField("#Doe" . msq("uniqueData"), "input"); // stepKey: selectorReplaceMSQSuffix
$I->dragAndDrop("#Doe" . msq("uniqueData"), "Doe" . msq("uniqueData")); // stepKey: selector12ReplaceMSQSuffix
$I->conditionalClick("Doe" . msq("uniqueData"), "#Doe" . msq("uniqueData"), true); // stepKey: dependentSelectorReplaceMSQSuffix
$I->amOnUrl("Doe" . msq("uniqueData") . ".html"); // stepKey: urlReplaceMSQSuffix
$I->searchAndMultiSelectOption("#selector", ["John", "Doe" . msq("uniqueData")]); // stepKey: parameterArrayReplacementMSQSuffix
$I->searchAndMultiSelectOption("#selector", [msq("uniqueData") . "John", "Doe" . msq("uniqueData")]); // stepKey: parameterArrayReplacementMSQBoth
$I->selectMultipleOptions("#Doe" . msq("uniqueData"), "#element", [msq("uniqueData") . "John", "Doe" . msq("uniqueData")]); // stepKey: multiSelectDataReplacement
$I->fillField(".selector", "0"); // stepKey: insertZero
$insertCommand = $I->magentoCLI("do something Doe" . msq("uniqueData") . " with uniqueness", 60); // stepKey: insertCommand
$I->comment($insertCommand);
$I->seeInPageSource("StringBefore John StringAfter"); // stepKey: htmlReplace1
$I->seeInPageSource("#John"); // stepKey: htmlReplace2
$I->seeInPageSource("StringBefore " . msq("uniqueData") . "John StringAfter"); // stepKey: htmlReplace3
$I->seeInPageSource("#" . msq("uniqueData") . "John"); // stepKey: htmlReplace4
$I->seeInPageSource("#" . msq("uniqueData") . "John#" . msq("uniqueData") . "John"); // stepKey: htmlReplace5
$I->seeInPageSource("StringBefore Doe" . msq("uniqueData") . " StringAfter"); // stepKey: htmlReplace6
$I->seeInPageSource("#Doe" . msq("uniqueData")); // stepKey: htmlReplace7
$I->seeInPageSource("#element"); // stepKey: htmlReplace8
$I->seeInPageSource("StringBefore #element StringAfter"); // stepKey: htmlReplace9
$I->dontSeeInPageSource("StringBefore John StringAfter"); // stepKey: htmlReplace10
$I->dontSeeInPageSource("#John"); // stepKey: htmlReplace11
$I->dontSeeInPageSource("StringBefore " . msq("uniqueData") . "John StringAfter"); // stepKey: htmlReplace12
$I->dontSeeInPageSource("#" . msq("uniqueData") . "John"); // stepKey: htmlReplace13
$I->dontSeeInPageSource("#" . msq("uniqueData") . "John#" . msq("uniqueData") . "John"); // stepKey: htmlReplace14
$I->dontSeeInPageSource("StringBefore Doe" . msq("uniqueData") . " StringAfter"); // stepKey: htmlReplace15
$I->dontSeeInPageSource("#Doe" . msq("uniqueData")); // stepKey: htmlReplace16
$I->dontSeeInPageSource("#element"); // stepKey: htmlReplace17
$I->dontSeeInPageSource("StringBefore #element StringAfter"); // stepKey: htmlReplace18
$I->seeInSource("StringBefore John StringAfter"); // stepKey: htmlReplace19
$I->seeInSource("#John"); // stepKey: htmlReplace20
$I->seeInSource("StringBefore " . msq("uniqueData") . "John StringAfter"); // stepKey: htmlReplace21
$I->seeInSource("#" . msq("uniqueData") . "John"); // stepKey: htmlReplace22
$I->seeInSource("#" . msq("uniqueData") . "John#" . msq("uniqueData") . "John"); // stepKey: htmlReplace23
$I->seeInSource("StringBefore Doe" . msq("uniqueData") . " StringAfter"); // stepKey: htmlReplace24
$I->seeInSource("#Doe" . msq("uniqueData")); // stepKey: htmlReplace25
$I->seeInSource("#element"); // stepKey: htmlReplace26
$I->seeInSource("StringBefore #element StringAfter"); // stepKey: htmlReplace27
$I->dontSeeInSource("StringBefore John StringAfter"); // stepKey: htmlReplace28
$I->dontSeeInSource("#John"); // stepKey: htmlReplace29
$I->dontSeeInSource("StringBefore " . msq("uniqueData") . "John StringAfter"); // stepKey: htmlReplace30
$I->dontSeeInSource("#" . msq("uniqueData") . "John"); // stepKey: htmlReplace31
$I->dontSeeInSource("#" . msq("uniqueData") . "John#" . msq("uniqueData") . "John"); // stepKey: htmlReplace32
$I->dontSeeInSource("StringBefore Doe" . msq("uniqueData") . " StringAfter"); // stepKey: htmlReplace33
$I->dontSeeInSource("#Doe" . msq("uniqueData")); // stepKey: htmlReplace34
$I->dontSeeInSource("#element"); // stepKey: htmlReplace35
$I->dontSeeInSource("StringBefore #element StringAfter"); // stepKey: htmlReplace36
}
}