diff --git a/tests/.DS_Store b/tests/.DS_Store new file mode 100644 index 0000000..9a60d59 Binary files /dev/null and b/tests/.DS_Store differ 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 0000000..cbcdcc4 Binary files /dev/null and b/tests/resources/__pycache__/env-variables.cpython-313.pyc differ diff --git a/tests/resources/env-variables.py b/tests/resources/env-variables.py new file mode 100644 index 0000000..f1bd073 --- /dev/null +++ b/tests/resources/env-variables.py @@ -0,0 +1 @@ +BASE_URL = "http://localhost:5173" diff --git a/tests/results/log.html b/tests/results/log.html new file mode 100644 index 0000000..85cf920 --- /dev/null +++ b/tests/results/log.html @@ -0,0 +1,2457 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Opening Robot Framework log failed

+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + 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

+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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