diff --git a/.gitignore b/.gitignore index a51753e..78025ec 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ latest_logs archived_logs current-screenshot.png +# Robot framework FE tests +tests/robot/output/ + ######################################################################## # OSX - https://github.com/github/gitignore/blob/master/Global/macOS.gitignore ######################################################################## @@ -75,4 +78,4 @@ package-lock.json .direnv/ .envrc -.streamlit/ \ No newline at end of file +.streamlit/ diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 0000000..4e6913a --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,4 @@ +robotframework==7.0 +robotframework-debuglibrary==2.5.0 +robotframework-pythonlibcore==4.4.0 +robotframework-seleniumlibrary==6.2.0 diff --git a/run-robot-tests b/run-robot-tests new file mode 100755 index 0000000..409e858 --- /dev/null +++ b/run-robot-tests @@ -0,0 +1,3 @@ +#!/bin/sh + +robot --outputdir=tests/robot/output --variable=app_url:http://localhost:8501 tests/robot/ diff --git a/tests/robot/resources/app_keywords.robot b/tests/robot/resources/app_keywords.robot new file mode 100644 index 0000000..fac26de --- /dev/null +++ b/tests/robot/resources/app_keywords.robot @@ -0,0 +1,16 @@ +*** Settings *** + +Library SeleniumLibrary + +*** Variables *** + +${st_keyup_iframe_locator} css:iframe[title="st_keyup.st_keyup"] + +*** Keywords *** + +Input text into st_keyup + [Arguments] ${text} + Wait until element is visible ${st_keyup_iframe_locator} + Select frame ${st_keyup_iframe_locator} + Input text css:input[type="text"] ${text} + Unselect frame diff --git a/tests/robot/test_cases.robot b/tests/robot/test_cases.robot new file mode 100644 index 0000000..9b756ef --- /dev/null +++ b/tests/robot/test_cases.robot @@ -0,0 +1,16 @@ +*** Settings *** + +Resource resources/app_keywords.robot + +*** Variables *** + +${app_url} http://localhost:8501 + +*** Test Cases *** + +Interact with st_keyup + Open browser ${app_url} Chrome + Input text into st_keyup adjunta + Wait until page contains URB San Joaquin + Wait until page contains Jard De Adjuntas + Wait until page contains Colinas Del Gigante