From f2e2b29bc6f6c1f15e21ecc2b92bc801f8ea99a8 Mon Sep 17 00:00:00 2001
From: Boxiang Sun <boxiang.sun@nexedi.com>
Date: Fri, 26 Feb 2021 03:40:28 +0000
Subject: [PATCH] erp5_ui_test_core: Generate the correct selenium test URL for
 the test page

The previous implementation will generate URL like:
erp5/test_page_module/core/TestRunner.html?
Which missed the test created in portal_tests, the correct one should be:
erp5/test_page_module/portal_tests/user-Howto.Create.Persons/core/TestRunner.html?
This code was inspired by https://lab.nexedi.com/nexedi/erp5/blob/master/product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py#L86
---
 .../erp5_ui_test_core/Zuite_createAndLaunchSeleniumTest.py      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_createAndLaunchSeleniumTest.py b/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_createAndLaunchSeleniumTest.py
index d7b575cb28..12562d2b65 100644
--- a/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_createAndLaunchSeleniumTest.py
+++ b/bt5/erp5_ui_test_core/SkinTemplateItem/portal_skins/erp5_ui_test_core/Zuite_createAndLaunchSeleniumTest.py
@@ -8,4 +8,4 @@ zuite = context.getPortalObject().portal_tests.Zuite_addZuite(zuite_id)
 for text, title in test_list:
   zuite.Zuite_addTest(None, title, text)
 
-return zuite.Base_redirect("core/TestRunner.html?auto=true&test=..%2Ftest_suite_html&resultsUrl=..%2FpostResults")
+return zuite.Base_redirect("portal_tests/%s/core/TestRunner.html?auto=true&test=..%%2Ftest_suite_html&resultsUrl=..%%2FpostResults" % zuite_id)
-- 
2.30.9