From 0c517f254c9610667a3dc1cc5fa4c3c45ec8677a Mon Sep 17 00:00:00 2001 From: Lenaick Date: Wed, 25 Mar 2026 17:20:28 +0100 Subject: [PATCH 1/2] =?UTF-8?q?N=C2=B09101=20-=20Improve=20HTML=20markup?= =?UTF-8?q?=20for=20end-to-end=20tests=20automation=20(#856)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/setuppage.class.inc.php | 2 ++ sources/Application/WebPage/AjaxPage.php | 1 + sources/Application/WebPage/UnauthenticatedWebPage.php | 1 + sources/Application/WebPage/WebPage.php | 3 +++ sources/Application/WebPage/iTopWebPage.php | 1 + templates/pages/backoffice/webpage/layout.html.twig | 2 +- 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/setup/setuppage.class.inc.php b/setup/setuppage.class.inc.php index 2beda5e1d..391067bf9 100644 --- a/setup/setuppage.class.inc.php +++ b/setup/setuppage.class.inc.php @@ -36,6 +36,8 @@ class SetupPage extends NiceWebPage { public const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/setuppage/layout'; + protected const BODY_DATA_GUI_TYPE = 'setup'; + public function __construct($sTitle) { parent::__construct($sTitle); diff --git a/sources/Application/WebPage/AjaxPage.php b/sources/Application/WebPage/AjaxPage.php index 5db1170c9..42aada0d9 100644 --- a/sources/Application/WebPage/AjaxPage.php +++ b/sources/Application/WebPage/AjaxPage.php @@ -233,6 +233,7 @@ class AjaxPage extends WebPage implements iTabbedPage 'aJsInlineLive' => $this->a_scripts, 'aJsInlineOnDomReady' => $this->GetReadyScripts(), 'aJsInlineOnInit' => $this->a_init_scripts, + 'sBodyDataGuiType' => static::BODY_DATA_GUI_TYPE, 'bEscapeContent' => ($this->sContentType == 'text/html') && ($this->sContentDisposition == 'inline'), // TODO 3.0.0: TEMP, used while developping, remove it. 'sSanitizedContent' => utils::FilterXSS($this->s_content), diff --git a/sources/Application/WebPage/UnauthenticatedWebPage.php b/sources/Application/WebPage/UnauthenticatedWebPage.php index 2794c63a2..f2cb4a996 100644 --- a/sources/Application/WebPage/UnauthenticatedWebPage.php +++ b/sources/Application/WebPage/UnauthenticatedWebPage.php @@ -172,6 +172,7 @@ class UnauthenticatedWebPage extends NiceWebPage 'aJsInlineLive' => $this->a_scripts, 'aJsInlineOnDomReady' => $this->GetReadyScripts(), 'aJsInlineOnInit' => $this->a_init_scripts, + 'sBodyDataGuiType' => static::BODY_DATA_GUI_TYPE, // TODO 3.0.0: TEMP, used while developing, remove it. 'sCapturedOutput' => utils::FilterXSS($s_captured_output), diff --git a/sources/Application/WebPage/WebPage.php b/sources/Application/WebPage/WebPage.php index 905a7ac9f..78f34acfe 100644 --- a/sources/Application/WebPage/WebPage.php +++ b/sources/Application/WebPage/WebPage.php @@ -152,6 +152,8 @@ class WebPage implements Page */ public const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/webpage/layout'; + protected const BODY_DATA_GUI_TYPE = 'backoffice'; + protected $s_title; protected $s_content; protected $s_deferred_content; @@ -1702,6 +1704,7 @@ JS; 'aJsInlineLive' => $this->a_scripts, 'aJsInlineOnDomReady' => $this->GetReadyScripts(), 'aJsInlineOnInit' => $this->a_init_scripts, + 'sBodyDataGuiType' => static::BODY_DATA_GUI_TYPE, // TODO 3.0.0: TEMP, used while developing, remove it. 'sCapturedOutput' => utils::FilterXSS($s_captured_output), diff --git a/sources/Application/WebPage/iTopWebPage.php b/sources/Application/WebPage/iTopWebPage.php index 8d5494353..f28fd8855 100644 --- a/sources/Application/WebPage/iTopWebPage.php +++ b/sources/Application/WebPage/iTopWebPage.php @@ -1003,6 +1003,7 @@ HTML; 'aJsInlineOnInit' => $this->a_init_scripts, 'aJsInlineOnDomReady' => $this->GetReadyScripts(), 'aJsInlineLive' => $this->a_scripts, + 'sBodyDataGuiType' => static::BODY_DATA_GUI_TYPE, // TODO 3.0.0: TEMP, used while developping, remove it. 'sSanitizedContent' => utils::FilterXSS($this->s_content), 'sDeferredContent' => utils::FilterXSS($this->s_deferred_content), diff --git a/templates/pages/backoffice/webpage/layout.html.twig b/templates/pages/backoffice/webpage/layout.html.twig index 597fedfa5..6821369f8 100644 --- a/templates/pages/backoffice/webpage/layout.html.twig +++ b/templates/pages/backoffice/webpage/layout.html.twig @@ -49,7 +49,7 @@ {% endfor %} {% endblock %} - + {% if aPage.isPrintable %}
{% endif %} {% block iboPageBodyHtml %}
From 511dabe2b0caf368a16688d93b075a822233dddc Mon Sep 17 00:00:00 2001 From: Lenaick Date: Wed, 25 Mar 2026 17:43:39 +0100 Subject: [PATCH 2/2] =?UTF-8?q?N=C2=B08834=20-=20Updated=20the=20PHP=20ver?= =?UTF-8?q?sion=20to=208.4=20for=20the=20CI=20in=20the=20commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ci_description.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci_description.ini b/tests/ci_description.ini index f96ce6755..8ba8dcf9c 100644 --- a/tests/ci_description.ini +++ b/tests/ci_description.ini @@ -1,6 +1,6 @@ [infra] ; STS version : testing greatest PHP version possible -php_version=8.3-apache +php_version=8.4-apache ; N°6629 perf bug on some tests on mariadb for now, so specifying MySQL db_version=latest-mariadb