Skip to content

Commit 5cbbdd3

Browse files
committed
MQE-335: Headless Browser Spike
- Updating all @env tags for tests. Only listing the ones that the test works in currently. - Updating README. Replacing "Acceptance" with "Functional". - Adding Headless command to robo.
1 parent 091c6f0 commit 5cbbdd3

16 files changed

+68
-61
lines changed

dev/tests/acceptance/RoboFile.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,39 +44,49 @@ function generateTests()
4444
}
4545

4646
/**
47-
* Run all Acceptance tests using the Chrome environment
47+
* Run all Functional tests using the Chrome environment
4848
*/
4949
function chrome()
5050
{
5151
$this->_exec('./vendor/bin/codecept run functional --env chrome --skip-group skip');
5252
}
5353

5454
/**
55-
* Run all Acceptance tests using the FireFox environment
55+
* Run all Functional tests using the FireFox environment
5656
*/
5757
function firefox()
5858
{
5959
$this->_exec('./vendor/bin/codecept run functional --env firefox --skip-group skip');
6060
}
6161

6262
/**
63-
* Run all Acceptance tests using the PhantomJS environment
63+
* Run all Functional tests using the PhantomJS environment
6464
*/
6565
function phantomjs()
6666
{
6767
$this->_exec('./vendor/bin/codecept run functional --env phantomjs --skip-group skip');
6868
}
6969

70+
/**
71+
* Run all Functional tests using the Chrome Headless environment
72+
*/
73+
function headless()
74+
{
75+
$this->_exec('./vendor/bin/codecept run functional --env headless --skip-group skip');
76+
}
77+
7078
/**
7179
* Run all Tests with the specified @group tag, excluding @group 'skip', using the Chrome environment
80+
* @param string $args
7281
*/
7382
function group($args = '')
7483
{
7584
$this->taskExec('./vendor/bin/codecept run functional --verbose --steps --env chrome --skip-group skip --group')->args($args)->run();
7685
}
7786

7887
/**
79-
* Run all Acceptance tests located under the Directory Path provided using the Chrome environment
88+
* Run all Functional tests located under the Directory Path provided using the Chrome environment
89+
* @param string $args
8090
*/
8191
function folder($args = '')
8292
{

dev/tests/acceptance/tests/functional.suite.dist.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ modules:
2626
\Magento\FunctionalTestingFramework\Module\MagentoWebDriver:
2727
url: "%MAGENTO_BASE_URL%"
2828
backend_name: admin
29-
browser: chrome
29+
browser: 'chrome'
3030
window_size: maximize
3131
username: "%MAGENTO_ADMIN_USERNAME%"
3232
password: "%MAGENTO_ADMIN_PASSWORD%"

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Backend/Cest/AdminLoginCest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@
1212
<annotations>
1313
<features value="Admin Login"/>
1414
<stories value="Login on the Admin Login page"/>
15-
<group value="example"/>
16-
<group value="login"/>
17-
<env value="chrome"/>
18-
<env value="firefox"/>
19-
<env value="phantomjs"/>
2015
</annotations>
2116
<test name="LoginAsAdmin">
2217
<annotations>
2318
<title value="You should be able to log into the Magento Admin backend."/>
2419
<description value="You should be able to log into the Magento Admin backend."/>
2520
<severity value="CRITICAL"/>
2621
<testCaseId value="MAGETWO-71572"/>
22+
<group value="example"/>
23+
<group value="login"/>
24+
<env value="chrome"/>
25+
<env value="firefox"/>
26+
<env value="phantomjs"/>
27+
<env value="headless"/>
2728
</annotations>
2829
<amOnPage url="{{AdminLoginPage}}" mergeKey="amOnAdminLoginPage"/>
2930
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" mergeKey="fillUsername"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateCategoryCest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<annotations>
1313
<features value="Category Creation"/>
1414
<stories value="Create a Category via the Admin"/>
15-
<group value="category"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<after>
2117
<amOnPage url="admin/admin/auth/logout/" mergeKey="amOnLogoutPage"/>
@@ -26,6 +22,9 @@
2622
<description value="You should be able to create a Category in the admin back-end."/>
2723
<severity value="CRITICAL"/>
2824
<testCaseId value="MAGETWO-72102"/>
25+
<group value="category"/>
26+
<env value="chrome"/>
27+
<env value="headless"/>
2928
</annotations>
3029
<amOnPage url="{{AdminLoginPage}}" mergeKey="amOnAdminLoginPage"/>
3130
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" mergeKey="fillUsername"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateConfigurableProductCest.xml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
<annotations>
1313
<features value="Product Creation"/>
1414
<stories value="Create a Configurable Product via the Admin"/>
15-
<group value="configurable"/>
16-
<group value="product"/>
17-
<env value="chrome"/>
18-
<env value="firefox"/>
19-
<env value="phantomjs"/>
2015
</annotations>
2116
<before>
2217
<loginAsAdmin mergeKey="loginAsAdmin"/>
@@ -30,6 +25,9 @@
3025
<description value="You should be able to create a Configurable Product via the Admin."/>
3126
<severity value="CRITICAL"/>
3227
<testCaseId value="MAGETWO-26041"/>
28+
<group value="configurable"/>
29+
<group value="product"/>
30+
<env value="chrome"/>
3331
</annotations>
3432

3533
<amOnPage url="{{AdminCategoryPage.urlPath}}" mergeKey="amOnCategoryGridPage"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Cest/AdminCreateSimpleProductCest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<annotations>
1313
<features value="Product Creation"/>
1414
<stories value="Create a Simple Product via Admin"/>
15-
<group value="product"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<before>
2117
<createData entity="_defaultCategory" mergeKey="createPreReqCategory"/>
@@ -26,6 +22,9 @@
2622
<description value="You should be able to create a Simple Product in the admin back-end."/>
2723
<severity value="CRITICAL"/>
2824
<testCaseId value="MAGETWO-23414"/>
25+
<group value="product"/>
26+
<env value="chrome"/>
27+
<env value="headless"/>
2928
</annotations>
3029
<amOnPage url="{{AdminLoginPage.url}}" mergeKey="navigateToAdmin"/>
3130
<fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" mergeKey="fillUsername"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontCustomerCheckoutCest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Checkout via the Admin"/>
15-
<group value="checkout"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<before>
2117
<createData entity="SimpleSubCategory" mergeKey="simplecategory"/>
@@ -35,6 +31,9 @@
3531
<description value="Should be able to place an order as a customer."/>
3632
<severity value="CRITICAL"/>
3733
<testCaseId value="#"/>
34+
<group value="checkout"/>
35+
<env value="chrome"/>
36+
<env value="headless"/>
3837
</annotations>
3938

4039
<amOnPage mergeKey="s1" url="customer/account/login/"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Cest/StorefrontGuestCheckoutCest.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<annotations>
1313
<features value="Checkout"/>
1414
<stories value="Checkout via Guest Checkout"/>
15-
<group value="checkout"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<before>
2117
<createData entity="_defaultCategory" mergeKey="createCategory"/>
@@ -33,6 +29,9 @@
3329
<description value="Should be able to place an order as a Guest."/>
3430
<severity value="CRITICAL"/>
3531
<testCaseId value="MAGETWO-72094"/>
32+
<group value="checkout"/>
33+
<env value="chrome"/>
34+
<env value="headless"/>
3635
</annotations>
3736
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" mergeKey="onCategoryPage"/>
3837
<waitForPageLoad mergeKey="waitForPageLoad1"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Cms/Cest/AdminCreateCmsPageCest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
<annotations>
1313
<features value="CMS Page Creation"/>
1414
<stories value="Create a CMS Page via the Admin"/>
15-
<group value="cms"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<after>
2117
<amOnPage url="admin/admin/auth/logout/" mergeKey="amOnLogoutPage"/>
@@ -26,6 +22,10 @@
2622
<description value="You should be able to create a CMS Page via the Admin."/>
2723
<severity value="CRITICAL"/>
2824
<testCaseId value="MAGETWO-25580"/>
25+
<group value="cms"/>
26+
<env value="chrome"/>
27+
<env value="firefox"/>
28+
<env value="headless"/>
2929
</annotations>
3030
<amOnPage url="{{AdminLoginPage}}" mergeKey="navigateToAdmin"/>
3131
<fillField selector="{{AdminLoginFormSection.username}}" userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" mergeKey="fillUsername"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Customer/Cest/AdminCreateCustomerCest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
<annotations>
1313
<features value="Customer Creation"/>
1414
<stories value="Create a Customer via the Admin"/>
15-
<group value="customer"/>
16-
<env value="chrome"/>
17-
<env value="firefox"/>
18-
<env value="phantomjs"/>
1915
</annotations>
2016
<test name="CreateCustomerViaAdminCest">
2117
<annotations>
2218
<title value="You should be able to create a customer in the Admin back-end."/>
2319
<description value="You should be able to create a customer in the Admin back-end."/>
2420
<severity value="CRITICAL"/>
2521
<testCaseId value="MAGETWO-72095"/>
22+
<group value="customer"/>
23+
<group value="create"/>
24+
<env value="chrome"/>
25+
<env value="headless"/>
2626
</annotations>
2727
<amOnPage url="{{AdminLoginPage.url}}" mergeKey="navigateToAdmin"/>
2828
<fillField userInput="{{_ENV.MAGENTO_ADMIN_USERNAME}}" selector="{{AdminLoginFormSection.username}}" mergeKey="fillUsername"/>

0 commit comments

Comments
 (0)