-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
918 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
tests-qa/acceptance/030_Geokrety/050_Parked/010_ManageFlag.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
*** Settings *** | ||
Library RequestsLibrary | ||
Resource ../../ressources/Authentication.robot | ||
Resource ../../ressources/vars/Urls.robot | ||
Resource ../../ressources/Moves.robot | ||
Variables ../../ressources/vars/users.yml | ||
Variables ../../ressources/vars/geokrety.yml | ||
Variables ../../ressources/vars/moves.yml | ||
Test Setup Test Setup | ||
|
||
*** Variables *** | ||
|
||
*** Test Cases *** | ||
|
||
Parked Happy Path | ||
Sign In ${USER_1.name} Fast | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Element Attribute Should Be ${GEOKRET_CREATE_COLLECTIBLE_CHECKBOX} disabled true | ||
Element Attribute Should Be ${GEOKRET_CREATE_COLLECTIBLE_CHECKBOX} checked None | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
Element Should Contain ${GEOKRET_DETAILS_PARKED} Parked | ||
Page Should Not Contain Element ${GEOKRET_DETAILS_COLLECTIBLE} | ||
${date1} = Browser.Get Element Attribute ${GEOKRET_DETAILS_PARKED} title | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Unselect Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Element Attribute Should Be ${GEOKRET_CREATE_COLLECTIBLE_CHECKBOX} disabled None | ||
Element Attribute Should Be ${GEOKRET_CREATE_COLLECTIBLE_CHECKBOX} checked true | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
Page Should Not Contain Element ${GEOKRET_DETAILS_COLLECTIBLE} | ||
Page Should Not Contain Element ${GEOKRET_DETAILS_PARKED} | ||
Page Should Not Contain Element ${GEOKRET_DETAILS_COLLECTIBLE} | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
Element Should Contain ${GEOKRET_DETAILS_PARKED} Parked | ||
Page Should Not Contain Element ${GEOKRET_DETAILS_COLLECTIBLE} | ||
${date2} = Browser.Get Element Attribute ${GEOKRET_DETAILS_PARKED} title | ||
|
||
Should Not Be Equal As Strings ${date1} ${date2} | ||
|
||
Changing other value should not change the parked date | ||
Sign In ${USER_1.name} Fast | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Input Text ${GEOKRET_CREATE_NAME_INPUT} GKNewName | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
|
||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Input Text ${GEOKRET_CREATE_NAME_INPUT} GKNewName2 | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
|
||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
|
||
|
||
Can be enabled only if owner is the holder | ||
Sign In ${USER_1.name} Fast | ||
|
||
Post Move Fast &{MOVE_22} | ||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Page Should Not Contain Element ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
|
||
Post Move Fast &{MOVE_2} | ||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Page Should Contain Element ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
|
||
|
||
*** Keywords *** | ||
|
||
Test Setup | ||
Clear Database And Seed ${2} users | ||
Seed ${1} geokrety owned by ${1} |
71 changes: 71 additions & 0 deletions
71
tests-qa/acceptance/030_Geokrety/050_Parked/020_Moves.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
*** Settings *** | ||
Library RequestsLibrary | ||
Resource ../../ressources/Authentication.robot | ||
Resource ../../ressources/vars/Urls.robot | ||
Resource ../../ressources/Moves.robot | ||
Variables ../../ressources/vars/users.yml | ||
Variables ../../ressources/vars/geokrety.yml | ||
Variables ../../ressources/vars/moves.yml | ||
Test Setup Test Setup | ||
|
||
*** Variables *** | ||
|
||
*** Test Cases *** | ||
|
||
Some logtype should be hidden for non-owner | ||
Sign In ${USER_1.name} Fast | ||
|
||
# Change collectible flag | ||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
Element Should Contain ${GEOKRET_DETAILS_PARKED} Parked | ||
|
||
# Only a limited number of move type are shown | ||
Sign In ${USER_2.name} Fast | ||
Go To Move | ||
Input Text ${MOVE_TRACKING_CODE_INPUT} ${GEOKRETY_1.tc} | ||
Click Button And Check Panel Validation Has Success ${MOVE_TRACKING_CODE_NEXT_BUTTON} ${MOVE_TRACKING_CODE_PANEL} ${MOVE_LOG_TYPE_PANEL} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_DROPPED_RADIO} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_GRABBED_RADIO} | ||
Element Should Be Enabled ${MOVE_LOG_TYPE_MEET_RADIO} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_DIPPED_RADIO} | ||
Element Should Be Enabled ${MOVE_LOG_TYPE_COMMENT_RADIO} | ||
Element Should Be Visible ${MOVE_LOG_TYPE_NOT_COLLECTIBLE_INFO} | ||
|
||
Some logtype should be hidden for owner | ||
Sign In ${USER_1.name} Fast | ||
|
||
# Change parked flag | ||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
Element Should Contain ${GEOKRET_DETAILS_PARKED} Parked | ||
|
||
# Only a limited number of move type are shown | ||
Sign In ${USER_1.name} Fast | ||
Go To Move | ||
Input Text ${MOVE_TRACKING_CODE_INPUT} ${GEOKRETY_1.tc} | ||
Click Button And Check Panel Validation Has Success ${MOVE_TRACKING_CODE_NEXT_BUTTON} ${MOVE_TRACKING_CODE_PANEL} ${MOVE_LOG_TYPE_PANEL} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_DROPPED_RADIO} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_GRABBED_RADIO} | ||
Element Should Be Disabled ${MOVE_LOG_TYPE_MEET_RADIO} | ||
Element Should Be Enabled ${MOVE_LOG_TYPE_DIPPED_RADIO} | ||
Element Should Be Enabled ${MOVE_LOG_TYPE_COMMENT_RADIO} | ||
Element Should Be Visible ${MOVE_LOG_TYPE_NOT_COLLECTIBLE_INFO} | ||
|
||
|
||
*** Keywords *** | ||
|
||
Test Setup | ||
Clear Database And Seed ${3} users | ||
Seed ${1} geokrety owned by ${1} | ||
|
||
Click Button And Check Panel Validation Has Success | ||
[Arguments] ${button} ${current_panel} ${next_panel} | ||
Panel validation has success ${current_panel} | ||
Click Button ${button} | ||
Panel Is Collapsed ${current_panel} | ||
Panel Is Open ${next_panel} |
69 changes: 69 additions & 0 deletions
69
tests-qa/acceptance/030_Geokrety/050_Parked/030_export.robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
*** Settings *** | ||
Library RequestsLibrary | ||
Library XML | ||
Library DateTime | ||
Resource ../../ressources/Authentication.robot | ||
Resource ../../ressources/vars/Urls.robot | ||
Variables ../../ressources/vars/users.yml | ||
Variables ../../ressources/vars/geokrety.yml | ||
Variables ../../ressources/vars/moves.yml | ||
Test Setup Test Setup | ||
|
||
*** Variables *** | ||
|
||
*** Test Cases *** | ||
|
||
Validate XML - structure | ||
# Check first GK | ||
${date_2_days_old} = Get Current Date increment=-2d result_format=%Y%m%d%H%M%d | ||
|
||
Create Session geokrety ${GK_URL} | ||
${xml} = GET On Session geokrety url=/export.php?modifiedsince=${date_2_days_old} | ||
Status Should Be 200 ${xml} | ||
|
||
${root} = Parse XML ${xml.content} | ||
Should Be Equal ${root.tag} gkxml | ||
|
||
${first_gk} = Get Element ${root} geokret | ||
Should Be Equal ${first_gk.attrib['id']} 1 | ||
XML.Element Attribute Should Be ${first_gk} id 1 | ||
|
||
${name} = Get Element ${first_gk} name | ||
XML.Element Text Should Be ${name} geokrety01 | ||
${collectible} = Get Element ${first_gk} collectible | ||
XML.Element Text Should Be ${collectible} true | ||
${parked} = Get Element ${first_gk} parked | ||
XML.Element Text Should Be ${parked} false | ||
|
||
# Park GK 1 | ||
Sign In ${USER_1.name} Fast | ||
Go To Url ${PAGE_GEOKRETY_EDIT_URL} | ||
Checkbox Should Not Be Selected ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Select Checkbox ${GEOKRET_CREATE_PARKED_CHECKBOX} | ||
Input Text ${GEOKRET_CREATE_NAME_INPUT} GKNewName | ||
Click Button ${GEOKRET_CREATE_CREATE_BUTTON} | ||
Location Should Be ${PAGE_GEOKRETY_1_DETAILS_URL} | ||
|
||
|
||
${xml} = GET On Session geokrety url=/export.php?modifiedsince=${date_2_days_old} | ||
Status Should Be 200 ${xml} | ||
|
||
${root} = Parse XML ${xml.content} | ||
Should Be Equal ${root.tag} gkxml | ||
|
||
${first_gk} = Get Element ${root} geokret | ||
Should Be Equal ${first_gk.attrib['id']} 1 | ||
XML.Element Attribute Should Be ${first_gk} id 1 | ||
|
||
${name} = Get Element ${first_gk} name | ||
XML.Element Text Should Be ${name} GKNewName | ||
${collectible} = Get Element ${first_gk} collectible | ||
XML.Element Text Should Be ${collectible} false | ||
${parked} = Get Element ${first_gk} parked | ||
XML.Element Text Should Be ${parked} true | ||
|
||
*** Keywords *** | ||
|
||
Test Setup | ||
Clear Database And Seed ${3} users | ||
Seed ${1} geokrety owned by ${1} |
Oops, something went wrong.