From 71111e7f3f1e355463fd9fad7b7ba910dcf5701f Mon Sep 17 00:00:00 2001
From: Roque Porchetto <roque.porchetto@nexedi.com>
Date: Wed, 18 Dec 2024 20:39:15 +0000
Subject: [PATCH] erp5_web_monitoring_ui_test: test landing

---
 .../testMonitoringLanding.xml                 | 62 +++++++++++++++++++
 .../testMonitoringLanding.zpt                 | 57 +++++++++++++++++
 2 files changed, 119 insertions(+)
 create mode 100644 bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.xml
 create mode 100644 bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.zpt

diff --git a/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.xml b/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.xml
new file mode 100644
index 00000000000..04d909a5322
--- /dev/null
+++ b/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="_reconstructor" module="copy_reg"/>
+                </klass>
+                <tuple>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                  <global name="object" module="__builtin__"/>
+                  <none/>
+                </tuple>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>testMonitoringLanding</string> </value>
+        </item>
+        <item>
+            <key> <string>output_encoding</string> </key>
+            <value> <string>utf-8</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <unicode></unicode> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.zpt b/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.zpt
new file mode 100644
index 00000000000..98bc363b18e
--- /dev/null
+++ b/bt5/erp5_web_monitoring_ui_test/PathTemplateItem/portal_tests/web_monitoring_ui_zuite/testMonitoringLanding.zpt
@@ -0,0 +1,57 @@
+<html xmlns:tal="http://xml.zope.org/namespaces/tal"
+      xmlns:metal="http://xml.zope.org/namespaces/metal">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Test SlapOS Monitoring UI (expected failure)</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test SlapOS Monitoring UI</td></tr>
+</thead><tbody>
+<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
+<tr>
+  <td>store</td>
+  <td tal:content="python:str('web_site_module/officejs_monitoring/#page=ojsm_landing&url=https://someurl/public/feeds&username=user&password=pass')"></td>
+  <td>url_parameters</td>
+</tr>
+<!-- Clean Up -->
+<tr>
+  <td>open</td>
+  <td>${base_url}/bar_module/ListBoxZuite_reset</td>
+  <td></td>
+</tr>
+<tr>
+  <td>assertTextPresent</td>
+  <td>Reset Successfully.</td>
+  <td></td>
+</tr>
+<!-- New entry point -->
+<tr>
+  <td>open</td>
+  <td>${base_url}/${url_parameters}</td>
+  <td></td>
+</tr>
+<tr>
+  <td>pause</td>
+  <td>2000</td>
+  <td></td>
+</tr>
+<tr>
+  <td>waitForElementPresent</td>
+  <td>//a[@data-i18n='Monitoring Configurations']</td>
+  <td></td>
+</tr>
+<tr>
+  <td>waitForElementPresent</td>
+  <td>//span[@data-i18n='Add OPML']</td>
+  <td></td>
+</tr>
+<tr>
+  <td>assertTextPresent</td>
+  <td>OPML URL</td>
+  <td></td>
+</tr>
+</tbody></table>
+</body>
+</html>
\ No newline at end of file
-- 
2.30.9