File tree Expand file tree Collapse file tree 6 files changed +40
-5
lines changed
tests/src/FunctionalJavascript Expand file tree Collapse file tree 6 files changed +40
-5
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ entity.commerce_currency.collection:
33 route_name : entity.commerce_currency.collection
44 parent : ' commerce.store_configuration'
55 description : ' Manage your currencies.'
6+ weight : -20
Original file line number Diff line number Diff line change 11entity.commerce_store.collection :
22 title : ' Stores'
33 route_name : ' entity.commerce_store.collection'
4- parent : ' commerce.admin_commerce '
4+ parent : ' commerce.store_configuration '
55 description : ' Manage your stores.'
6+ weight : -10
67
78entity.commerce_store_type.collection :
89 title : ' Store types'
910 route_name : ' entity.commerce_store_type.collection'
1011 parent : ' commerce.store_configuration'
1112 description : ' Manage fields, form and display settings for your stores.'
13+ weight : -5
Original file line number Diff line number Diff line change @@ -36,3 +36,35 @@ function commerce_store_post_update_1() {
3636
3737 return $ message ;
3838}
39+
40+ /**
41+ * Revert the Stores view.
42+ */
43+ function commerce_store_post_update_2 () {
44+ /** @var \Drupal\commerce\Config\ConfigUpdaterInterface $config_updater */
45+ $ config_updater = \Drupal::service ('commerce.config_updater ' );
46+
47+ $ views = [
48+ 'views.view.commerce_stores ' ,
49+ ];
50+ $ result = $ config_updater ->revert ($ views , FALSE );
51+
52+ $ success_results = $ result ->getSucceeded ();
53+ $ failure_results = $ result ->getFailed ();
54+ $ message = '' ;
55+ if ($ success_results ) {
56+ $ message = t ('Succeeded: ' ) . '<br> ' ;
57+ foreach ($ success_results as $ success_message ) {
58+ $ message .= $ success_message . '<br> ' ;
59+ }
60+ $ message .= '<br> ' ;
61+ }
62+ if ($ failure_results ) {
63+ $ message .= t ('Failed: ' ) . '<br> ' ;
64+ foreach ($ failure_results as $ failure_message ) {
65+ $ message .= $ failure_message . '<br> ' ;
66+ }
67+ }
68+
69+ return $ message ;
70+ }
Original file line number Diff line number Diff line change @@ -422,7 +422,7 @@ display:
422422 position : 1
423423 display_options :
424424 display_extenders : { }
425- path : admin/commerce/stores
425+ path : admin/commerce/config/ stores
426426 cache_metadata :
427427 contexts :
428428 - ' languages:language_content'
Original file line number Diff line number Diff line change 6363 * "add-form" = "/store/add/{commerce_store_type}",
6464 * "edit-form" = "/store/{commerce_store}/edit",
6565 * "delete-form" = "/store/{commerce_store}/delete",
66- * "delete-multiple-form" = "/admin/commerce/stores/delete",
67- * "collection" = "/admin/commerce/stores",
66+ * "delete-multiple-form" = "/admin/commerce/config/ stores/delete",
67+ * "collection" = "/admin/commerce/config/ stores",
6868 * },
6969 * bundle_entity_type = "commerce_store_type",
7070 * field_ui_base_route = "entity.commerce_store_type.edit_form",
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ protected function getAdministratorPermissions() {
3535 * Tests creating a store.
3636 */
3737 public function testCreateStore () {
38- $ this ->drupalGet ('admin/commerce/stores ' );
38+ $ this ->drupalGet ('admin/commerce/config/ stores ' );
3939 $ this ->getSession ()->getPage ()->clickLink ('Add store ' );
4040
4141 // Check the integrity of the form.
You can’t perform that action at this time.
0 commit comments