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

Merge branch 'testing' of...

Merge branch 'testing' of gitlab.labranet.jamk.fi:wimma-lab-2019/overflow/ehasa-frontend into testing
parents c0312b10 bcc81990
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ Documentation A resource file with reusable keywords and variables.
Library SeleniumLibrary run_on_failure=nothing
Library String
Library DateTime
Library Collections
*** Variables ***
${SERVER} %{SITE_URL}
......@@ -329,7 +330,7 @@ Write Text
# ------------------------------------------------------------------------------
# Adding New Task
# Adding New Task / 09_tasks
Click Tasks
Click Element id=tasklistButton
......@@ -341,6 +342,24 @@ Generate Task Name/Description
Input Text id=taskNameInput ${TASK_N}
Input Text id=taskDescriptionInput ${TASK_D}
Create A List
@{ASD} = Create List
Set Global Variable @{ABC} @{ASD}
Generate Task Name
[Arguments] ${TASK_NAME}
${TASK_N} = Generate Random String ${TASK_NAME} [LETTERS][NUMBERS]
Input Text id=taskNameInput ${TASK_N}
#Set Global Variable ${ABC} ${TASK_N}
Append To List ${ABC} ${TASK_N}
Log ${ABC}
[Return] ${ABC}
Generate Task Description
[Arguments] ${TASK_DESCRIPTION}
${TASK_D} = Generate Random String ${TASK_DESCRIPTION} [LETTERS][NUMBERS]
Input Text id=taskDescriptionInput ${TASK_D}
Submit Task
Click Element id=newTaskSubmitButton
......@@ -351,7 +370,35 @@ Select Faction
[Arguments] ${faction}
Select From List By Label id=taskFactionSelect ${faction}
#
# 10_tasks_edit
#
Task Winner Select
${game_name} = Catenate SEPARATOR= id=taskEditButton @{ABC}[0]
${winner} = Catenate SEPARATOR= id=taskWinnerSelect @{ABC}[0]
${save_winner} = Catenate SEPARATOR= id=taskSaveButton @{ABC}[0]
Click Tasks
Click Button ${game_name}
Click Button ${game_name}
Click Button ${game_name}
Select From List By Label ${winner} ${FACTION2}
Click Button ${save_winner}
Alert Should Be Present text=Task updated and closed action=ACCEPT timeout=None
Delete Task
${delete_game} = Catenate SEPARATOR= id=taskDeleteButton @{ABC}[1]
Click Button ${delete_game}
Handle Alert action=DISMISS #Chooses "Cancel" on the popup.
Click Button ${delete_game}
Alert Should Be Present text=Are you sure you want to delete task "@{ABC}[1]" action=ACCEPT timeout=None
Alert Should Be Present text=Task deleted action=ACCEPT timeout=None
Delete Completed Task
${delete_game} = Catenate SEPARATOR= id=taskDeleteButton @{ABC}[0]
Click Button ${delete_game}
Alert Should Be Present text=Are you sure you want to delete task "@{ABC}[0]" action=ACCEPT timeout=None
Alert Should Be Present text=Task deleted action=ACCEPT timeout=None
......@@ -567,4 +614,4 @@ Check If Any Test Games
# ${x} = Format String select{} ${VALID_GAME}
# Wait Until Page Contains Element id=${x} 2
# Click Button id=${x}
# Log Game Selected
\ No newline at end of file
# Log Game Selected
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