@@ -44,20 +44,20 @@ public function testCreatePromotion() {
4444 $ name = $ this ->randomMachineName (8 );
4545 $ this ->getSession ()->getPage ()->fillField ('name[0][value] ' , $ name );
4646
47- $ this ->getSession ()->getPage ()->fillField ('offer[0][target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
47+ $ this ->getSession ()->getPage ()->fillField ('offer[0][plugin_select][ target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
4848 $ this ->waitForAjaxToFinish ();
49- $ this ->getSession ()->getPage ()->fillField ('offer[0][target_plugin_configuration][amount] ' , '10.0 ' );
49+ $ this ->getSession ()->getPage ()->fillField ('offer[0][plugin_select][ target_plugin_configuration][amount] ' , '10.0 ' );
5050
5151 // Change, assert any values reset.
52- $ this ->getSession ()->getPage ()->fillField ('offer[0][target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
52+ $ this ->getSession ()->getPage ()->fillField ('offer[0][plugin_select][ target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
5353 $ this ->waitForAjaxToFinish ();
54- $ this ->assertSession ()->fieldValueNotEquals ('offer[0][target_plugin_configuration][amount] ' , '10.0 ' );
55- $ this ->getSession ()->getPage ()->fillField ('offer[0][target_plugin_configuration][amount] ' , '10.0 ' );
54+ $ this ->assertSession ()->fieldValueNotEquals ('offer[0][plugin_select][ target_plugin_configuration][amount] ' , '10.0 ' );
55+ $ this ->getSession ()->getPage ()->fillField ('offer[0][plugin_select][ target_plugin_configuration][amount] ' , '10.0 ' );
5656
57- $ this ->getSession ()->getPage ()->fillField ('conditions[0][target_plugin_id] ' , 'commerce_promotion_order_total_price ' );
57+ $ this ->getSession ()->getPage ()->fillField ('conditions[0][plugin_select][ target_plugin_id] ' , 'commerce_promotion_order_total_price ' );
5858 $ this ->waitForAjaxToFinish ();
59- $ this ->getSession ()->getPage ()->fillField ('conditions[0][target_plugin_configuration][amount][number] ' , '50.00 ' );
60- $ this ->getSession ()->getPage ()->checkField ('conditions[0][target_plugin_configuration][negate] ' );
59+ $ this ->getSession ()->getPage ()->fillField ('conditions[0][plugin_select][ target_plugin_configuration][amount][number] ' , '50.00 ' );
60+ $ this ->getSession ()->getPage ()->checkField ('conditions[0][plugin_select][ target_plugin_configuration][negate] ' );
6161
6262 $ this ->submitForm ([], t ('Save ' ));
6363 $ this ->assertSession ()->pageTextContains ("Saved the $ name promotion. " );
@@ -85,19 +85,19 @@ public function testCreatePromotionWithEndDate() {
8585 // Check the integrity of the form.
8686 $ this ->assertSession ()->fieldExists ('name[0][value] ' );
8787
88- $ this ->getSession ()->getPage ()->fillField ('offer[0][target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
89- $ this ->getSession ()-> wait ( 2000 , " jQuery('.ajax-progress').length === 0 " );
88+ $ this ->getSession ()->getPage ()->fillField ('offer[0][plugin_select][ target_plugin_id] ' , 'commerce_promotion_product_percentage_off ' );
89+ $ this ->waitForAjaxToFinish ( );
9090
9191 $ name = $ this ->randomMachineName (8 );
9292 $ edit = [
9393 'name[0][value] ' => $ name ,
94- 'offer[0][target_plugin_configuration][amount] ' => '10.0 ' ,
94+ 'offer[0][plugin_select][ target_plugin_configuration][amount] ' => '10.0 ' ,
9595 ];
9696
97- $ this ->getSession ()->getPage ()->fillField ('conditions[0][target_plugin_id] ' , 'commerce_promotion_order_total_price ' );
98- $ this ->getSession ()-> wait ( 2000 , " jQuery('.ajax-progress').length === 0 " );
97+ $ this ->getSession ()->getPage ()->fillField ('conditions[0][plugin_select][ target_plugin_id] ' , 'commerce_promotion_order_total_price ' );
98+ $ this ->waitForAjaxToFinish ( );
9999
100- $ edit ['conditions[0][target_plugin_configuration][amount][number] ' ] = '50.00 ' ;
100+ $ edit ['conditions[0][plugin_select][ target_plugin_configuration][amount][number] ' ] = '50.00 ' ;
101101
102102 // Set an end date.
103103 $ this ->getSession ()->getPage ()->checkField ('end_date[0][has_value] ' );
@@ -136,7 +136,7 @@ public function testEditPromotion() {
136136 $ new_promotion_name = $ this ->randomMachineName (8 );
137137 $ edit = [
138138 'name[0][value] ' => $ new_promotion_name ,
139- 'offer[0][target_plugin_configuration][amount] ' => '20 ' ,
139+ 'offer[0][plugin_select][ target_plugin_configuration][amount] ' => '20 ' ,
140140 ];
141141 $ this ->submitForm ($ edit , 'Save ' );
142142
0 commit comments