From c9ecdd14b15085339a744eaebf40a66ee0e3a6ad Mon Sep 17 00:00:00 2001 From: Athicha Leksansern Date: Thu, 24 Jul 2025 17:59:33 +0700 Subject: [PATCH] Add basic test --- tests/.DS_Store | Bin 0 -> 6148 bytes tests/README.md | 22 + tests/requirements.txt | 4 + .../__pycache__/env-variables.cpython-313.pyc | Bin 0 -> 223 bytes tests/resources/env-variables.py | 1 + tests/results/log.html | 2457 +++++++++++++++ tests/results/output.xml | 36 + tests/results/report.html | 2735 +++++++++++++++++ tests/robot.toml | 9 + .../tests/000-Scroll-to-bottom-of-tile0.robot | 11 + web/index.html | 2 +- 11 files changed, 5276 insertions(+), 1 deletion(-) create mode 100644 tests/.DS_Store create mode 100644 tests/README.md create mode 100644 tests/requirements.txt create mode 100644 tests/resources/__pycache__/env-variables.cpython-313.pyc create mode 100644 tests/resources/env-variables.py create mode 100644 tests/results/log.html create mode 100644 tests/results/output.xml create mode 100644 tests/results/report.html create mode 100644 tests/robot.toml create mode 100644 tests/tests/000-Scroll-to-bottom-of-tile0.robot diff --git a/tests/.DS_Store b/tests/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..9a60d59c684cea264665bca403f05cc844fd3752 GIT binary patch literal 6148 zcmeHKJ8nWj3>+s&K}tiJa<7mZtPnW?7f2CAgFu3i`c*j>N6Yx5DCm&}i3W`&dv?8^ zeR@+oKLfD&@#7Vk0hrPq@$F%3e(pZ9hsqd{&O0{v#NlhX-)?rJ>dOh|K4Fg)4mkeh zZ`XP2Wty^5Knh3!DIf);z?BMk@1;$j6BVU^6p#YH3i$V-(H(o?kQkp1h8O{e6Q;ws zj#+}(JVES*Ln1RYODZv`RwITbo%vREy>LiOI;@5dt0!AcC>BrW{VmF2JyB5#NP%+& z9&LhjI`cs%>Sw@pkx7ADEARui`W4s! literal 0 HcmV?d00001 diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..1e5eda3 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,22 @@ +# tests + +## Setup + +```bash +python -m venv .venv +source ./.venv/bin/activate +pip install -r requirements.txt +``` + +## Running Tests + +``` bash +robotcode robot tests/ +``` + +## Format Code + +```bash +robocop format +`` + diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..737fe7d --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,4 @@ +robotframework +robotframework-seleniumlibrary +robotframework-robocop +robotcode[all] \ No newline at end of file diff --git a/tests/resources/__pycache__/env-variables.cpython-313.pyc b/tests/resources/__pycache__/env-variables.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cbcdcc47e04e290bbdeffef3381c33deaadef7d4 GIT binary patch literal 223 zcmey&%ge<81hWL2GL(VzV-N=h7@>^M96-iYhG2#whIB?vrYg~ll9B=|ef^yL`XElbVG zFGwxY4^K_fPtD0m&8gHa%1_EK(M>B#%uOxNFUr<0Ni8lZ)-Ose&Mz%WPA%3?%`4L_ xODxJvOv*_u)+?yI#bJ}1pHiBWYFEStv + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/results/output.xml b/tests/results/output.xml new file mode 100644 index 0000000..474c9f4 --- /dev/null +++ b/tests/results/output.xml @@ -0,0 +1,36 @@ + + + + + + +Opening browser 'Chrome' to base url 'http://localhost:5173/'. +url=${BASE_URL}/ +browser=${BROWSER} +Opens a new browser instance to the optional ``url``. + + + +Closes the current browser. + + + + + + + + + + +All Tests + + + + +Tests +Tests.000-Scroll-to-bottom-of-tile0 + + + + + diff --git a/tests/results/report.html b/tests/results/report.html new file mode 100644 index 0000000..45e17c7 --- /dev/null +++ b/tests/results/report.html @@ -0,0 +1,2735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework report failed

+
    +
  • Verify that you have JavaScript enabled in your browser.
  • +
  • Make sure you are using a modern enough browser. If using Internet Explorer, version 11 is required.
  • +
  • Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.
  • +
+
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/robot.toml b/tests/robot.toml new file mode 100644 index 0000000..4967cb1 --- /dev/null +++ b/tests/robot.toml @@ -0,0 +1,9 @@ +# Basic settings +output-dir = "results" +log-level = "INFO" +python-path = ["."] + +# Global variables +[variables] +BROWSER = "Chrome" +TIMEOUT = "20s" \ No newline at end of file diff --git a/tests/tests/000-Scroll-to-bottom-of-tile0.robot b/tests/tests/000-Scroll-to-bottom-of-tile0.robot new file mode 100644 index 0000000..a400682 --- /dev/null +++ b/tests/tests/000-Scroll-to-bottom-of-tile0.robot @@ -0,0 +1,11 @@ +*** Settings *** + +Library SeleniumLibrary +Variables resources/env-variables.py + + +*** Test Cases *** +Scroll to bottom of tile0 + Open Browser url=${BASE_URL}/ browser=${BROWSER} + + Close Browser diff --git a/web/index.html b/web/index.html index 5e44ede..e468cb2 100644 --- a/web/index.html +++ b/web/index.html @@ -4,7 +4,7 @@ - Vite + React + TS + robotframework demo for ellely