Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FE tests w/ Robot Framework #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
########################################################################
Expand Down Expand Up @@ -75,4 +78,4 @@ package-lock.json
.direnv/
.envrc

.streamlit/
.streamlit/
4 changes: 4 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
robotframework==7.0
robotframework-debuglibrary==2.5.0
robotframework-pythonlibcore==4.4.0
robotframework-seleniumlibrary==6.2.0
3 changes: 3 additions & 0 deletions run-robot-tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

robot --outputdir=tests/robot/output --variable=app_url:http://localhost:8501 tests/robot/
16 changes: 16 additions & 0 deletions tests/robot/resources/app_keywords.robot
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions tests/robot/test_cases.robot
Original file line number Diff line number Diff line change
@@ -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
Loading