File tree Expand file tree Collapse file tree 5 files changed +56
-1
lines changed
Customer/Test/Mftf/ActionGroup
Sales/Test/Mftf/ActionGroup Expand file tree Collapse file tree 5 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 42
42
<click stepKey =" saveAddress" selector =" {{AdminCustomerAddressesSection.saveAddress}}" />
43
43
<waitForPageLoad stepKey =" waitForAddressSave" />
44
44
</actionGroup >
45
+
46
+ <actionGroup name =" AdminCreateCustomerWithWebSiteAndGroup" >
47
+ <arguments >
48
+ <argument name =" customerData" defaultValue =" Simple_US_Customer" />
49
+ <argument name =" website" type =" string" defaultValue =" customWebsite" />
50
+ <argument name =" storeView" type =" string" defaultValue =" customStore" />
51
+ </arguments >
52
+ <amOnPage url =" {{AdminCustomerPage.url}}" stepKey =" goToCustomersPage" />
53
+ <click stepKey =" addNewCustomer" selector =" {{AdminCustomerGridMainActionsSection.addNewCustomer}}" />
54
+ <selectOption stepKey =" selectWebSite" selector =" {{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput =" {{website}}" />
55
+ <click selector =" {{AdminCustomerAccountInformationSection.group}}" stepKey =" ClickToExpandGroup" />
56
+ <waitForElement selector =" {{AdminProductFormAdvancedPricingSection.productTierPriceGroupOrCatalogOption('Default (General)')}}" stepKey =" waitForCustomerGroupExpand" />
57
+ <click selector =" {{AdminCustomerAccountInformationSection.groupValue('Default (General)')}}" after =" waitForCustomerGroupExpand" stepKey =" ClickToSelectGroup" />
58
+ <fillField stepKey =" FillFirstName" selector =" {{AdminCustomerAccountInformationSection.firstName}}" userInput =" {{customerData.firstname}}" />
59
+ <fillField stepKey =" FillLastName" selector =" {{AdminCustomerAccountInformationSection.lastName}}" userInput =" {{customerData.lastname}}" />
60
+ <fillField stepKey =" FillEmail" selector =" {{AdminCustomerAccountInformationSection.email}}" userInput =" {{customerData.email}}" />
61
+ <selectOption stepKey =" selectStoreView" selector =" {{AdminCustomerAccountInformationSection.storeView}}" userInput =" {{storeView}}" />
62
+ <waitForElement selector =" {{AdminCustomerAccountInformationSection.storeView}}" stepKey =" waitForCustomerStoreViewExpand" />
63
+ <click stepKey =" save" selector =" {{AdminCustomerAccountInformationSection.saveCustomer}}" />
64
+ <waitForPageLoad stepKey =" waitForCustomersPage" />
65
+ <see stepKey =" seeSuccessMessage" userInput =" You saved the customer." />
66
+ </actionGroup >
45
67
</actionGroups >
Original file line number Diff line number Diff line change 59
59
<see selector =" {{AdminHeaderSection.pageTitle}}" userInput =" Create New Order" stepKey =" seeNewOrderPageTitle" />
60
60
</actionGroup >
61
61
62
+ <!-- Navigate to New Order Page for existing Customer And Store-->
63
+ <actionGroup name =" NavigateToNewOrderPageExistingCustomerAndStoreActionGroup" extends =" navigateToNewOrderPageExistingCustomer" >
64
+ <arguments >
65
+ <argument name =" storeView" defaultValue =" _defaultStore" />
66
+ </arguments >
67
+ <click selector =" {{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" stepKey =" selectStoreView" after =" waitForCreateOrderPageLoad" />
68
+ <waitForPageLoad stepKey =" waitForLoad" after =" selectStoreView" />
69
+ </actionGroup >
70
+
62
71
<!-- Check the required fields are actually required-->
63
72
<actionGroup name =" checkRequiredFieldsNewOrderForm" >
64
73
<seeElement selector =" {{AdminOrderFormAccountSection.requiredGroup}}" stepKey =" seeCustomerGroupRequired" />
Original file line number Diff line number Diff line change @@ -897,7 +897,10 @@ public function setCurrentCurrencyCode($code)
897
897
if (in_array ($ code , $ this ->getAvailableCurrencyCodes ())) {
898
898
$ this ->_getSession ()->setCurrencyCode ($ code );
899
899
900
- $ defaultCode = $ this ->_storeManager ->getWebsite ()->getDefaultStore ()->getDefaultCurrency ()->getCode ();
900
+ $ defaultCode = ($ this ->_storeManager ->getStore () !== null )
901
+ ? $ this ->_storeManager ->getStore ()->getDefaultCurrency ()->getCode ()
902
+ : $ this ->_storeManager ->getWebsite ()->getDefaultStore ()->getDefaultCurrency ()->getCode ();
903
+
901
904
$ this ->_httpContext ->setValue (Context::CONTEXT_CURRENCY , $ code , $ defaultCode );
902
905
}
903
906
return $ this ;
Original file line number Diff line number Diff line change 24
24
<waitForElementVisible selector =" {{AdminStoresGridSection.storeFilterTextField}}" stepKey =" waitForPageReload" />
25
25
<see userInput =" You saved the store." stepKey =" seeSavedMessage" />
26
26
</actionGroup >
27
+
28
+ <actionGroup name =" AdminAddCustomWebSiteToStoreGroup" >
29
+ <arguments >
30
+ <argument name =" storeGroup" defaultValue =" customStoreGroup" />
31
+ <argument name =" website" defaultValue =" customWebsite" />
32
+ </arguments >
33
+ <amOnPage url =" {{AdminSystemStorePage.url}}" stepKey =" amOnAdminSystemStorePage" />
34
+ <click selector =" {{AdminStoresGridSection.resetButton}}" stepKey =" resetSearchFilter" />
35
+ <fillField userInput =" {{storeGroup.name}}" selector =" {{AdminStoresGridSection.storeGrpFilterTextField}}" stepKey =" fillSearchStoreGroupField" />
36
+ <click selector =" {{AdminStoresGridSection.searchButton}}" stepKey =" clickSearchButton" />
37
+ <see userInput =" {{storeGroup.name}}" selector =" {{AdminStoresGridSection.storeGrpNameInFirstRow}}" stepKey =" verifyThatCorrectStoreGroupFound" />
38
+ <click selector =" {{AdminStoresGridSection.storeGrpNameInFirstRow}}" stepKey =" clickEditExistingStoreRow" />
39
+ <waitForPageLoad stepKey =" waitForStoreGroupPageLoad" />
40
+ <selectOption selector =" {{AdminNewStoreGroupSection.storeGrpWebsiteDropdown}}" userInput =" {{website.name}}" stepKey =" selectWebsite" />
41
+ <selectOption selector =" {{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" userInput =" Default Category" stepKey =" chooseRootCategory" />
42
+ <click selector =" {{AdminNewStoreGroupActionsSection.saveButton}}" stepKey =" clickSaveStoreGroup" />
43
+ <conditionalClick selector =" {{AdminNewStoreGroupSection.acceptNewStoreGroupCreation}}" dependentSelector =" {{AdminNewStoreGroupSection.acceptNewStoreGroupCreation}}" visible =" true" stepKey =" clickAcceptNewStoreGroupCreationButton" />
44
+ <waitForElementVisible selector =" {{AdminStoresGridSection.storeFilterTextField}}" stepKey =" waitForPageReload" />
45
+ <see userInput =" You saved the store." stepKey =" seeSavedMessage" />
46
+ </actionGroup >
27
47
</actionGroups >
Original file line number Diff line number Diff line change 11
11
<element name =" storeGrpNameTextField" type =" input" selector =" #group_name" />
12
12
<element name =" storeGrpCodeTextField" type =" input" selector =" #group_code" />
13
13
<element name =" storeRootCategoryDropdown" type =" select" selector =" #group_root_category_id" />
14
+ <element name =" acceptNewStoreGroupCreation" type =" button" selector =" .action-primary.action-accept" />
14
15
</section >
15
16
</sections >
You can’t perform that action at this time.
0 commit comments