Skip to content

[MFTF] add new AdminOpenGeneralConfigurationPageActionGroup #29828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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="AdminOpenGeneralConfigurationPageActionGroup">
<annotations>
<description>Open general configuration page.</description>
</annotations>

<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="openGeneralConfigurationPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@
</after>

<!--Set timezone for default config-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfig"/>
<waitForPageLoad stepKey="waitForConfigPage"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfig"/>
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
<grabValueFrom selector="{{LocaleOptionsSection.timezone}}" stepKey="originalTimezone"/>
<selectOption selector="{{LocaleOptionsSection.timezone}}" userInput="Central European Standard Time (Europe/Paris)" stepKey="setTimezone"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfig"/>

<!--Set timezone for Main Website-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfig1"/>
<waitForPageLoad stepKey="waitForConfigPage1"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfig1"/>
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreViewActionGroup">
<argument name="website" value="_defaultWebsite"/>
</actionGroup>
Expand Down Expand Up @@ -80,15 +78,13 @@
</assertEquals>

<!--Reset timezone-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfigReset"/>
<waitForPageLoad stepKey="waitForConfigPageReset"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfigReset"/>
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSectionReset"/>
<selectOption selector="{{LocaleOptionsSection.timezone}}" userInput="$originalTimezone" stepKey="resetTimezone"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfigReset"/>

<!--Reset timezone-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfigReset1"/>
<waitForPageLoad stepKey="waitForConfigPageReset1"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfigReset1"/>
<actionGroup ref="AdminSwitchWebsiteActionGroup" stepKey="AdminSwitchStoreViewActionGroup1">
<argument name="website" value="_defaultWebsite"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@

<!--Set timezone-->
<!--Set timezone so we need compare with the same timezone used in "generateDate" action-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfig"/>
<waitForPageLoad stepKey="waitForConfigPage"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfig"/>
<wait stepKey="wait" time="10"/>
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSection"/>
<grabValueFrom selector="{{LocaleOptionsSection.timezone}}" stepKey="originalTimezone"/>
Expand Down Expand Up @@ -93,8 +92,7 @@
<see selector="{{CheckoutCartSummarySection.discountAmount}}" userInput="-$5.00" stepKey="seeDiscountTotal"/>

<!--Reset timezone-->
<amOnPage url="{{GeneralConfigurationPage.url}}" stepKey="goToGeneralConfigReset"/>
<waitForPageLoad stepKey="waitForConfigPageReset"/>
<actionGroup ref="AdminOpenGeneralConfigurationPageActionGroup" stepKey="goToGeneralConfigReset"/>
<conditionalClick selector="{{LocaleOptionsSection.sectionHeader}}" dependentSelector="{{LocaleOptionsSection.timezone}}" visible="false" stepKey="openLocaleSectionReset"/>
<selectOption selector="{{LocaleOptionsSection.timezone}}" userInput="$originalTimezone" stepKey="resetTimezone"/>
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfigReset"/>
Expand Down