Skip to content

Commit

Permalink
ENGCOM-7865: magento/partners-magento2b2b#137: Add Company to Custome…
Browse files Browse the repository at this point in the history
…rs Now Online… #29170
  • Loading branch information
joanhe committed Jul 22, 2020
2 parents c36db34 + 5643f4c commit bf656ff
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<!--Assert company in customers now online grid row -->
<actionGroup name="AdminAssertCustomerInCustomersNowOnlineGridActionGroup">
<annotations>
<description>Validates that the provided Customer is present and correct in the Customer now online grid page.</description>
</annotations>
<arguments>
<argument name="text" type="string"/>
<argument name="columnName" type="string"/>
</arguments>
<waitForText selector="{{AdminCustomersNowOnlineGridSection.gridCell('1', columnName)}}" userInput="{{text}}" stepKey="waitForCustomesrNowOnline"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminNavigateToCustomerOnlinePageActionGroup">
<annotations>
<description>Goes to the Admin Customer Online page.</description>
</annotations>

<amOnPage url="{{AdminCustomersNowOnlinePage.url}}" stepKey="openCustomersOnlineGridPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
<page name="AdminCustomersNowOnlinePage" url="/customer/online/" area="admin" module="Magento_Customer">
<section name="AdminCustomersNowOnlineGridSection"/>
</page>
</pages>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminCustomersNowOnlineGridSection">
<element name="columnTitle" type="text" selector=".admin__action-dropdown-menu-content label[title='{{column}}']" parameterized="true"/>
<element name="gridCell" type="text" selector="//tr[{{row}}]//td[count(//div[@data-role='grid-wrapper']//tr//th[contains(., '{{column}}')]/preceding-sibling::th) +1 ]" parameterized="true"/>
</section>
</sections>

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminAddColumnToAdminGridActionGroup">
<annotations>
<description value="Adds column to admin grid"/>
</annotations>
<arguments>
<argument name="columnName" defaultValue="Email" type="string"/>
</arguments>
<waitForElementVisible selector="{{AdminGridColumnsControls.columns}}" stepKey="waitForAdminGridColumnControlsColumn"/>
<click selector="{{AdminGridColumnsControls.columns}}" stepKey="clickAdminGridColumnControlsColumn"/>
<waitForElementVisible selector="{{AdminDataGridHeaderSection.columnCheckbox(columnName)}}" stepKey="verifyAdminGridColumnControlsForSelectedColumnVisible"/>
<click selector="{{AdminDataGridHeaderSection.columnCheckbox(columnName)}}" stepKey="clickForAdminGridControlForSelectedColumn"/>
<waitForElementVisible selector="{{AdminGridHeaders.headerByName(columnName)}}" stepKey="waitForAdminGridColumnHeaderForSelectedColumn"/>
<click selector="{{AdminGridColumnsControls.columns}}" stepKey="closeAdminGridColumnControls"/>
<waitForElementNotVisible selector="{{AdminGridColumnsControls.columnName(columnName)}}" stepKey="verifyAdminGridColumnControlsForSelectedColumnNotVisible"/>
</actionGroup>
</actionGroups>

0 comments on commit bf656ff

Please sign in to comment.