diff --git a/addons/website/static/src/js/utils.js b/addons/website/static/src/js/utils.js index 1b44781f47c..2eaec0c490b 100644 --- a/addons/website/static/src/js/utils.js +++ b/addons/website/static/src/js/utils.js @@ -284,8 +284,9 @@ function sendRequest(route, params) { let form = document.createElement('form'); form.setAttribute('action', route); form.setAttribute('method', params.method || 'POST'); - const isInIframe = window.frameElement && window.frameElement.classList.contains('o_iframe'); - if (isInIframe) { + // This is an exception for the 404 page create page button, in backend we + // want to open the response in the top window not in the iframe. + if (params.forceTopWindow) { form.setAttribute('target', '_top'); } diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index a69c084cbbf..3c973c0a758 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -2244,7 +2244,7 @@

This page does not exist, but you can create it as you are editor of this site.

- Create Page + Create Page
Edit the content below this line to adapt the default Page not found page.
diff --git a/addons/website_blog/static/tests/tours/blog_tags_tour.js b/addons/website_blog/static/tests/tours/blog_tags_tour.js index b560555ba86..1cfbff09411 100644 --- a/addons/website_blog/static/tests/tours/blog_tags_tour.js +++ b/addons/website_blog/static/tests/tours/blog_tags_tour.js @@ -51,5 +51,16 @@ wTourUtils.registerWebsitePreviewTour('blog_tags', { content: "Verify tag does not appear in blog post anymore", trigger: "iframe #o_wblog_post_content div:has(.badge):not(:contains(testtag))", run: () => {}, // it's a check + }, { + content: "Go back to /blog", + trigger: "iframe #top_menu a[href='/blog'] span", + }, { + content: "Click on the adventure tag", + trigger: "iframe a[href^='/blog/tag/adventure']", + }, { + content: "Verify we are still on the backend", + trigger: "iframe span:contains(adventure) i.fa-tag", + run: () => {}, // it's a check + }] ); diff --git a/addons/website_sale/static/tests/tours/website_sale_add_to_cart_snippet_tour.js b/addons/website_sale/static/tests/tours/website_sale_add_to_cart_snippet_tour.js index 83e70d6be25..e4560a6fa20 100644 --- a/addons/website_sale/static/tests/tours/website_sale_add_to_cart_snippet_tour.js +++ b/addons/website_sale/static/tests/tours/website_sale_add_to_cart_snippet_tour.js @@ -44,11 +44,11 @@ wTourUtils.registerWebsitePreviewTour('add_to_cart_snippet_tour', { ...wTourUtils.selectElementInWeSelectWidget('action_picker_opt', 'Buy Now'), ...wTourUtils.clickOnSave(), wTourUtils.clickOnElement('add to cart button', 'iframe .s_add_to_cart_btn'), - wTourUtils.assertPathName('/shop/payment', 'button[name=o_payment_submit_button]'), + wTourUtils.assertPathName('/@/shop/payment', 'iframe button[name=o_payment_submit_button]'), - wsTourUtils.goToCart({quantity: 4, backend: false}), - wsTourUtils.assertCartContains({productName: 'Acoustic Bloc Screens'}), - wsTourUtils.assertCartContains({productName: 'Conference Chair (Steel)'}), - wsTourUtils.assertCartContains({productName: 'Conference Chair (Aluminium)'}), + wsTourUtils.goToCart({quantity: 4, backend: true}), + wsTourUtils.assertCartContains({productName: 'Acoustic Bloc Screens', backend: true}), + wsTourUtils.assertCartContains({productName: 'Conference Chair (Steel)', backend: true}), + wsTourUtils.assertCartContains({productName: 'Conference Chair (Aluminium)', backend: true}), ], );