Skip to content

Commit 6996324

Browse files
committed
Add case plans for visual tests
1 parent 4f4b7f1 commit 6996324

6 files changed

+36
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``layout_test.py::VisualLayoutTests::test_applitools_layout_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://applitools.com/helloworld?diff1. <br /> Call ``check_window()`` with ``baseline=True``. <br /> Click the button that changes the text of an element. <br /> Call ``check_window()`` three times for ``level=1``, ``level=2``, and ``level=3``. | No issues are detected because a text change should not affect ``check_window()`` |
6+
| 2 | Click the button that makes a hidden element visible. <br /> Call ``check_window()`` three times for ``level=1``, ``level=2``, and ``level=3``, but wrap the third call with ``self.assert_raises(Exception):``. | No exceptions are raised because the first two calls should pass and the third one was wrapped with ``self.assert_raises(Exception):``. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``python_home_test.py::VisualLayoutTests::test_python_home_layout_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://python.org/. <br /> Call ``check_window()`` with ``baseline=True``. | |
6+
| 2 | Remove the ``Donate`` button using ``remove_element(SELECTOR)``. <br /> Call ``check_window()`` with ``level=0``. | The test detects that the ``Donate`` button was removed. The test does not fail because the check was set to ``level=0`` (print-only). <br /> A ``side_by_side_NAME.html`` file appears in the specific ``latest_logs/`` folder of the test. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``test_layout_fail.py::VisualLayoutFailureTests::test_applitools_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://applitools.com/helloworld?diff1. <br /> Call ``check_window()`` with ``baseline=True``. | |
6+
| 2 | Click the button that makes a hidden element visible. <br /> Call ``check_window()`` with ``level=3``. | The test fails because the element attribute has changed. <br /> A ``side_by_side.html`` file appears in the specific ``latest_logs/`` folder of the test. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``test_layout_fail.py::VisualLayoutFailureTests::test_xkcd_logo_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://xkcd.com/554/. <br /> Call ``check_window()`` with ``baseline=True``. | |
6+
| 2 | Resize the logo using ``set_attribute()``. <br /> Call ``check_window()`` with ``level=3``. | The test fails because the logo has changed. <br /> A ``side_by_side.html`` file appears in the specific ``latest_logs/`` folder of the test. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``test_layout_fail.py::VisualLayout_FixtureTests::test_python_home_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://python.org/. <br /> Call ``check_window()`` with ``baseline=True``. | |
6+
| 2 | Remove the ``Donate`` button using ``remove_element(SELECTOR)``. <br /> Call ``check_window()`` with ``level=3``. | The test fails because the ``Donate`` button was removed. <br /> A ``side_by_side.html`` file appears in the specific ``latest_logs/`` folder of the test. |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
``xkcd_visual_test.py::VisualLayoutTests::test_xkcd_layout_change``
2+
---
3+
| # | Step Description | Expected Result |
4+
| - | ---------------- | --------------- |
5+
| 1 | Open https://xkcd.com/554/. <br /> Call ``check_window()`` with ``baseline=True``. | |
6+
| 2 | Resize the logo using ``set_attribute()``. <br /> Call ``check_window()`` with ``level=0``. | The test detects that the logo has changed. The test does not fail because the check was set to ``level=0`` (print-only). <br /> A ``side_by_side_NAME.html`` file appears in the specific ``latest_logs/`` folder of the test. |

0 commit comments

Comments
 (0)