Name: [FIX] viin_brand_common: anchor web.layout xpaths on //head so core's QUnit guard can run again

State: Killed finished in 319m

PR State: merged

PR Author: David Tran

PR Author Email:

PR: #661

Committer: David Tran

Committer Email: davidtran.hp@gmail.com

Commit: bf464e0c6ca6f2613897e996094d1b8bb08ffd79

Description:

                                            [FIX] viin_brand_common: restore core's QUnit leak-guard on web.layout

viin_brand_common anchored its web.layout brand title/favicon defaults on
//title and //link[@type='image/x-icon']. Core's WebSuite._check_only_call
(web/tests/test_js.py:104) rewrites web.layout's whole arch_db to a stub
containing neither node, and that write revalidates every extension of
web.layout. The recombination raised a ValidationError, leaving core's
QUnit leak-guard - the guard that stops a stray QUnit.only() from silently
disabling the whole JS suite - dead on every Viindoo 17 database.

Replace the two position="attributes" xpaths with a single
<xpath expr="//head/meta[last()]" position="after"> that sets both values
as `or` fallbacks. {head, meta[@charset]} is exactly the node set present
in both the real arch and core's stub, and meta[last()] is the latest
reachable point in it, so the defaults bind after every upstream producer -
notably website.layout's per-page title, its seo_object assignment and the
OpenGraph block - and before <title>. An anchor placed before <head>
instead lands outside it and pre-empts those producers.

Bump the manifest version 0.3.1 -> 0.3.2: Viindoo SaaS auto-upgrade selects
modules to -u by diffing the on-disk manifest version against the customer
database's ir_module_module.latest_version, and a view change only reaches
an existing database through -u. Without the bump the fix would reach fresh
installs only.

Add regression coverage: viin_brand_common/tests/test_web_layout.py (4
methods) locks the stub survival and the brand defaults; viin_brand_website
gains tests/test_website_title_not_preempted.py (3 methods) owning the
cross-module contract that the brand default never pre-empts a website
title or its OpenGraph meta. Both suites were proven RED - the first
against 33a11ec, the second against acc5474.

Close https://github.com/Viindoo/branding/issues/654

Signed-off-by: David Tran <davidtran.hp@gmail.com>
                                            

Branch: 17.0

Age:

Up-time: