Commit 87c30a04 authored by Jérome Perrin's avatar Jérome Perrin

*_ui_test: make Zelenium tests compatible with Zope4 ZMI

The status message no longer use system-msg class, use simpler
"assertTextPresent" that should be enough.

Simplify the waiting for static pages, clickAndWait is enough.
parent 9a5ed805
...@@ -17,8 +17,8 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product ...@@ -17,8 +17,8 @@ Copy of unittest <a href="https://lab.nexedi.com/nexedi/erp5/blob/master/product
<tr><td>open</td> <tr><td>open</td>
<td>${base_url}/portal_caches/manage_clearAllCache</td><td></td></tr> <td>${base_url}/portal_caches/manage_clearAllCache</td><td></td></tr>
<tr><td>assertElementPresent</td> <tr><td>assertTextPresent</td>
<td>//div[@class="system-msg" and contains(text(), "All cache factories cleared")]</td><td></td></tr> <td>All cache factories cleared</td><td></td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr> <tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.day())"></td><td>day</td></tr>
<tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr> <tr><td>store</td><td tal:content="python: '{:0>#2d}'.format(now.month())"></td><td>month</td></tr>
......
...@@ -120,14 +120,13 @@ ...@@ -120,14 +120,13 @@
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed</td>
<td></td> <td></td>
</tr> </tr>
...@@ -170,18 +169,16 @@ ...@@ -170,18 +169,16 @@
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -68,14 +68,13 @@ ...@@ -68,14 +68,13 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed</td>
<td></td> <td></td>
</tr> </tr>
...@@ -172,18 +171,16 @@ ...@@ -172,18 +171,16 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -16,29 +16,19 @@ ...@@ -16,29 +16,19 @@
<td>${base_url}/Foo_view/my_title/manage_main</td> <td>${base_url}/Foo_view/my_title/manage_main</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>name=field_css_class</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>name=field_css_class</td> <td>name=field_css_class</td>
<td>class1 class2 class3</td> <td>class1 class2 class3</td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>clickAndWait</td>
<td>//input[@name='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@name='submit']</td> <td>//input[@name='submit']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
......
...@@ -30,13 +30,6 @@ ...@@ -30,13 +30,6 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name='field_sort']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//textarea[@name='field_sort']</td> <td>//textarea[@name='field_sort']</td>
...@@ -45,31 +38,23 @@ ...@@ -45,31 +38,23 @@
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/Foo_viewRelationField/my_bar_category_title_list/manage_talesForm</td> <td>${base_url}/Foo_viewRelationField/my_bar_category_title_list/manage_talesForm</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_parameter_list']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name='field_parameter_list']</td> <td>//input[@name='field_parameter_list']</td>
...@@ -77,14 +62,14 @@ ...@@ -77,14 +62,14 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
...@@ -236,46 +221,30 @@ ...@@ -236,46 +221,30 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name='field_sort']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//textarea[@name='field_sort']</td> <td>//textarea[@name='field_sort']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/Foo_viewRelationField/my_bar_category_title_list/manage_talesForm</td> <td>${base_url}/Foo_viewRelationField/my_bar_category_title_list/manage_talesForm</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_parameter_list']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name='field_parameter_list']</td> <td>//input[@name='field_parameter_list']</td>
...@@ -283,21 +252,17 @@ ...@@ -283,21 +252,17 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
</tbody></table> </tbody></table>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -45,14 +45,14 @@ ...@@ -45,14 +45,14 @@
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
...@@ -63,13 +63,6 @@ ...@@ -63,13 +63,6 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_parameter_list']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name='field_parameter_list']</td> <td>//input[@name='field_parameter_list']</td>
...@@ -77,14 +70,14 @@ ...@@ -77,14 +70,14 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
...@@ -252,14 +245,14 @@ ...@@ -252,14 +245,14 @@
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
...@@ -270,13 +263,6 @@ ...@@ -270,13 +263,6 @@
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_parameter_list']</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@name='field_parameter_list']</td> <td>//input[@name='field_parameter_list']</td>
...@@ -284,14 +270,14 @@ ...@@ -284,14 +270,14 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>clickAndWait</td>
<td>//input[@value='Save Changes']</td> <td>//input[@value='Save Changes']</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//div[@class='system-msg']</td> <td>Content changed.</td>
<td></td> <td></td>
</tr> </tr>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment