[FIX] website: don't add gmap iframe in right panel DOM in test mode
Previous commit(s) did improve the preview of snippets when dragged and dropped but also the `t-snippet-call` capability of some snippets. Part of that improvement was to add snippet `onBuilt` JS output in the snippet XML definition directly. For google and facebook snippets, it means firing a request to those websites when entering edit mode. It's not that bad (considering the trade-off of the preview and t-snippet-call), but will need to be re-discussed later post freeze to find a better way to not fire those requests ideally when the snippet is called in the right panel (but would need the preview to still work). For the meantime, this request seems to be making a test fail (`test_01_menu_hierarchies`) due to the gmap API call being returned after the test has been marked as successful. Before investigating further, this commit just prevent the iframe to show up when in test mode so we can merge this work which is needed for tomorrow freeze. closes odoo/odoo#138748 Related: odoo/design-themes#726 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
An address must be specified for a map to be embedded
|
||||
</div>
|
||||
</div>
|
||||
<iframe class="s_map_embedded o_not_editable" src="https://maps.google.com/maps?q=250%20Executive%20Park%20Blvd%2C%20Suite%203400%20San%20Francisco%20California%20(US)%20United%20States&t=m&z=12&ie=UTF8&iwloc=&output=embed" width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"/>
|
||||
<iframe t-if="not test_mode_enabled" class="s_map_embedded o_not_editable" src="https://maps.google.com/maps?q=250%20Executive%20Park%20Blvd%2C%20Suite%203400%20San%20Francisco%20California%20(US)%20United%20States&t=m&z=12&ie=UTF8&iwloc=&output=embed" width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"/>
|
||||
<div class="s_map_color_filter"/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user