Skip to content
Snippets Groups Projects
Commit 30926b9e authored by L4074's avatar L4074
Browse files

FIX tests

parent 7f266228
No related branches found
No related tags found
No related merge requests found
Pipeline #66504 failed
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/tests.iml" filepath="$PROJECT_DIR$/.idea/tests.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
*** Settings *** *** Settings ***
Documentation A test suite for players to join game. Documentation A test suite for players to join game.
Resource resource.robot Resource resource.robot
Suite Setup Open Browser To Login Page #Suite Setup Open Browser To Login Page
Suite Teardown Close Browser #Suite Teardown Close Browser
Test Template Join Game And Faction Test Template Join Game And Faction
...@@ -14,11 +14,13 @@ Second Player Faction2 Pass2 ...@@ -14,11 +14,13 @@ Second Player Faction2 Pass2
# #
Join Game And Faction Join Game And Faction
[Arguments] ${faction} ${password} [Arguments] ${faction} ${password}
Open Browser To Login Page
Registration Process Registration Process
Select Game Select Game
Join Game ${faction} ${password} Join Game ${faction} ${password}
Return To Main Menu Return To Main Menu
Log Out Log Out
Close Browser
Registration Process Registration Process
Open Registration Open Registration
......
...@@ -63,9 +63,3 @@ Add Task ...@@ -63,9 +63,3 @@ Add Task
Select Faction ${faction} Select Faction ${faction}
Submit Task Submit Task
Alert Should Be Present text=Task added action=ACCEPT timeout=None Alert Should Be Present text=Task added action=ACCEPT timeout=None
Select Game
${x} = Format String select{} ${VALID_GAME}
Wait Until Page Contains Element id=${x} 1
Click Button id=${x}
Log Game Selected
\ No newline at end of file
...@@ -4,6 +4,9 @@ Resource resource.robot ...@@ -4,6 +4,9 @@ Resource resource.robot
Suite Setup Open Browser To Login Page Suite Setup Open Browser To Login Page
Suite Teardown Close Browser Suite Teardown Close Browser
*** Variables ***
#${DELAY} 0.15
*** Test Cases *** *** Test Cases ***
Write Text Write Text
Valid Login Valid Login
......
...@@ -9,7 +9,7 @@ Library Collections ...@@ -9,7 +9,7 @@ Library Collections
${SERVER} %{SITE_URL} ${SERVER} %{SITE_URL}
${BROWSER} ff ${BROWSER} ff
${DELAY} 0 ${DELAY} 0
${VALID USER} #ville ${VALID USER} ville
${VALID PASSWORD} koira ${VALID PASSWORD} koira
${LOGIN URL} https://${SERVER}/ ${LOGIN URL} https://${SERVER}/
${WELCOME URL} #You can use this if there's a different page after login page. ${WELCOME URL} #You can use this if there's a different page after login page.
...@@ -30,6 +30,7 @@ ${SU_LP} Validation failed: name must be longer than or equal to 3 ch ...@@ -30,6 +30,7 @@ ${SU_LP} Validation failed: name must be longer than or equal to 3 ch
${LU_SP} Validation failed: name must be shorter than or equal to 31 characters, password must be longer than or equal to 3 characters ${LU_SP} Validation failed: name must be shorter than or equal to 31 characters, password must be longer than or equal to 3 characters
${ACC_EXISTS} User already exists ${ACC_EXISTS} User already exists
${P_NOMATCH} Passwords do not match ${P_NOMATCH} Passwords do not match
${VALID_GAME} QWE
## New Game / ## New Game /
# B = Button / I = Input # B = Button / I = Input
...@@ -307,10 +308,13 @@ Map Movement ...@@ -307,10 +308,13 @@ Map Movement
# Leaflet write text # Leaflet write text
Write Text Write Text
wait until page contains element css=a[class=leaflet-draw-draw-textbox]
Click Element css=a[class=leaflet-draw-draw-textbox] Click Element css=a[class=leaflet-draw-draw-textbox]
Click Element At Coordinates css=div[class=leaflet-control-container] 50 500 Click Element At Coordinates css=div[class=leaflet-control-container] 50 500
wait until page contains element css=div[placeholder="Click out to save"]
Press Key css=div[placeholder="Click out to save"] Hello :) #Press Key is deprecated in seleniumlibrary 4.0 use Press Keys instead. Press Key css=div[placeholder="Click out to save"] Hello :) #Press Key is deprecated in seleniumlibrary 4.0 use Press Keys instead.
Click Element At Coordinates css=div[class=leaflet-control-container] 100 400 Click Element At Coordinates css=div[class=leaflet-control-container] 100 400
wait until page contains element css=div[placeholder="Click out to save"]
Element Text Should Be css=div[placeholder="Click out to save"] Hello :) #Checks that the text is right. Element Text Should Be css=div[placeholder="Click out to save"] Hello :) #Checks that the text is right.
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
...@@ -318,12 +322,15 @@ Write Text ...@@ -318,12 +322,15 @@ Write Text
# Adding New Task / 09_tasks # Adding New Task / 09_tasks
Click Tasks Click Tasks
wait until page contains element id=tasklistButton
Click Element id=tasklistButton Click Element id=tasklistButton
Generate Task Name/Description Generate Task Name/Description
[Arguments] ${TASK_NAME} ${TASK_DESCRIPTION} [Arguments] ${TASK_NAME} ${TASK_DESCRIPTION}
${TASK_N} = Generate Random String ${TASK_NAME} [LETTERS][NUMBERS] ${TASK_N} = Generate Random String ${TASK_NAME} [LETTERS][NUMBERS]
${TASK_D} = Generate Random String ${TASK_DESCRIPTION} [LETTERS][NUMBERS] ${TASK_D} = Generate Random String ${TASK_DESCRIPTION} [LETTERS][NUMBERS]
wait until page contains element id=taskNameInput
Input Text id=taskNameInput ${TASK_N} Input Text id=taskNameInput ${TASK_N}
Input Text id=taskDescriptionInput ${TASK_D} Input Text id=taskDescriptionInput ${TASK_D}
...@@ -334,9 +341,11 @@ Create Task List ...@@ -334,9 +341,11 @@ Create Task List
Generate Task Name Generate Task Name
[Arguments] ${TASK_NAME} [Arguments] ${TASK_NAME}
${TASK_N} = Generate Random String ${TASK_NAME} [LETTERS][NUMBERS] ${TASK_N} = Generate Random String ${TASK_NAME} [LETTERS][NUMBERS]
wait until page contains element id=taskNameInput
Input Text id=taskNameInput ${TASK_N} Input Text id=taskNameInput ${TASK_N}
Append To List ${TASK_NAMES} ${TASK_N} Append To List ${TASK_NAMES} ${TASK_N}
Log ${TASK_NAMES} Log ${TASK_NAMES}
[Return] ${TASK_NAMES} [Return] ${TASK_NAMES}
Generate Task Description Generate Task Description
...@@ -578,7 +587,9 @@ Log ...@@ -578,7 +587,9 @@ Log
# #
Delete Game Delete Game
wait until page contains element ${B_EDITGAME}
Click Button ${B_EDITGAME} Click Button ${B_EDITGAME}
wait until page contains element ${B_EDELETE}
Click Button ${B_EDELETE} Click Button ${B_EDELETE}
Alert Should Be Present text=Are you sure you want to delete this game action=ACCEPT timeout=None Alert Should Be Present text=Are you sure you want to delete this game action=ACCEPT timeout=None
Alert Should Be Present text=Game deleted action=ACCEPT timeout=None Alert Should Be Present text=Game deleted action=ACCEPT timeout=None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment