feat: added test18,test19, related docs + updated .drone.yml
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
surtur 2020-06-24 22:14:09 +02:00
parent 09dd9bec9c
commit 7298738f81
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
4 changed files with 275 additions and 6 deletions

View File

@ -332,6 +332,7 @@ steps:
- failure
depends_on:
- reveal-env
- test09
- name: test19
pull: if-not-exists
@ -348,6 +349,8 @@ steps:
- failure
depends_on:
- reveal-env
- test09
- test18
- name: test20
pull: if-not-exists
@ -517,6 +520,8 @@ steps:
- test15
- test16
- test17
- test18
- test19
- name: copy-cache
pull: if-not-exists

66
docs
View File

@ -305,6 +305,38 @@ test set
- author - ...
- date - see test results
- id - 18
- name - create a mirror of a repository
- robot user logs in using username and password,
creates a mirror of the BLAKE3 repository
- Pre-conditions
- robotframework + selenium + chromium + chromedriver
- expected result - local mirror of BLAKE3 is created
- steps:
see test{{tc_id}}.robot
- Post-conditions
- close browser
- execution - automatic (robotframework)
- execution time - variable, see test results
- author - ...
- date - see test results
- id - 19
- name - delete a migrated repo
- robot user logs in using username and password,
deletes a previously created mirror repository
- Pre-conditions
- robotframework + selenium + chromium + chromedriver
- completed test18
- expected result - mirror repo is deleted
- steps:
see test{{tc_id}}.robot
- Post-conditions
- close browser
- execution - automatic (robotframework)
- execution time - variable, see test results
- author - ...
- date - see test results
test set
mobile - Testing a webpage with (emulated) mobile browser
@ -544,3 +576,37 @@ test set
- execution time - variable, see test results
- author - ...
- date - see test results
- id - 16
- name - star wanderer's repo (mobile)
- robot user logs in, taps on the burger menu, selects Explore
button, searches for dotfiles repo, selects the one by 'wanderer'
and stars it
- Pre-conditions
- robotframework + selenium + (emulated) mobile chromium + chromedriver
- expected result - user profile page is shown
- steps:
see test{{tc_id}}.robot
- Post-conditions
- close browser
- execution - automatic (robotframework)
- execution time - variable, see test results
- author - ...
- date - see test results
- id - 17
- name - unstar wanderer's repo (mobile)
- robot user logs in, taps on the burger menu, selects Explore
button, searches for dotfiles repo, selects the one by 'wanderer'
and unstars it
- Pre-conditions
- robotframework + selenium + (emulated) mobile chromium + chromedriver
- expected result - user profile page is shown
- steps:
see test{{tc_id}}.robot
- Post-conditions
- close browser
- execution - automatic (robotframework)
- execution time - variable, see test results
- author - ...
- date - see test results

View File

@ -4,19 +4,113 @@ Library SeleniumLibrary run_on_failure=Nothing
*** Variables ***
${URL} https://git.dotya.ml/
${BROWSER} chrome
${DELAY} 0.2
${LOGIN_BUTTON} //*[@id="navbar"]/div[2]/a[2]
${SIGN_IN} //form/div[4]/button[1]
${USERNAME_FIELD} //*[@id="user_name"]
${PASSWD_FIELD} //*[@id="password"]
${EXPLORE_TABBAR_BUTTON} //*[@id="navbar"]/a[5]
${EXPLORE_PAGE_URL} https://git.dotya.ml/explore/repos
${ADD_SOMETHING_BUTTON} //*[@id="navbar"]/div[2]/div[1]
${NEW_MIGRATION_BUTTON} //*[@id="menuitem_2"]
${MIGRATION_URL_INPUT} //*[@id="clone_addr"]
${MIGRATION_REPO_VISIBILITY_CHECKBOX} //body/div[2]/div[2]/div/div/form/div/div[6]/div/input
${MIGRATION_REPO_IS_A_MIRROR_CHECKBOX} //body/div[2]/div[2]/div/div/form/div/div[7]/div
${MIGRATION_REPO_DESCRIPTION_INPUT} //*[@id="description"]
${MIGRATE_REPO_BUTTON} //button[contains(., "Migrate Repository")]
${BLAKE3_CLONE_URL} https://github.com/BLAKE3-team/BLAKE3
${BLAKE3_ABOUT_TEXT} official implementations of the BLAKE3 cryptographic hash function
${BLAKE3_REPO_LANGUAGE_STATS} //body/div[2]/div[2]/div[2]/div[4]/a
${BLAKE3_REPO_URL} https://git.dotya.ml/dat_test_usr/BLAKE3
*** Keywords ***
Screenshot page
Capture Page Screenshot
Input Username
[Arguments] ${USERNAME_FIELD} ${USERNAME}
Input Text ${USERNAME_FIELD} ${USERNAME}
Input Password
[Arguments] ${PASSWD_FIELD} ${PASSWORD}
Input Text ${PASSWD_FIELD} ${PASSWORD}
Login page title
Title Should Be Sign In - dotya.ml Gitea Service
Login success
Title Should Be dat_test_usr - Dashboard - dotya.ml Gitea Service
Dashboard page address
Location Should Be https://git.dotya.ml/
Explore page
Location Should Be ${EXPLORE_PAGE_URL}
Input repo url
[Arguments] ${MIGRATION_URL_INPUT} ${MIGRATION_URL}
Input Text ${MIGRATION_URL_INPUT} ${MIGRATION_URL}
Input repo description
[Arguments] ${MIGRATION_REPO_DESCRIPTION_INPUT} ${REPO_DESCRIPTION}
Input Text ${MIGRATION_REPO_DESCRIPTION_INPUT} ${REPO_DESCRIPTION}
BLAKE3 repo address
Location Should Be ${BLAKE3_REPO_URL}
*** Test Cases ***
just a page GET (+ screenshot)
create a mirror of a repository
${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument headless
Call Method ${chrome_options} add_argument no-sandbox
Call Method ${chrome_options} add_argument disable-dev-shm-usage
${options}= Call Method ${chrome_options} to_capabilities
Set Selenium Speed 0.2
Open Browser ${URL} browser=${BROWSER} desired_capabilities=${options}
Set Selenium Speed ${DELAY}
Capture Page Screenshot
Set Window Size 1920 1080
Maximize Browser Window
Wait Until Element Is Visible ${LOGIN_BUTTON}
Click Element ${LOGIN_BUTTON}
Sleep ${DELAY}
Screenshot page
Log Location
Login page title
Input Username ${USERNAME_FIELD} dat_test_usr
Input Password ${PASSWD_FIELD} D@t_p@ssw000rd987.
Screenshot page
Press Keys None RETURN
Sleep ${DELAY}
Screenshot page
Log Location
Login success
Dashboard page address
Click Element ${ADD_SOMETHING_BUTTON}
Screenshot page
Click Element ${NEW_MIGRATION_BUTTON}
Screenshot page
Input repo url ${MIGRATION_URL_INPUT} ${BLAKE3_CLONE_URL}
Screenshot page
Unselect Checkbox ${MIGRATION_REPO_VISIBILITY_CHECKBOX}
Screenshot page
Click Element ${MIGRATION_REPO_IS_A_MIRROR_CHECKBOX}
Screenshot page
Input repo description ${MIGRATION_REPO_DESCRIPTION_INPUT} ${BLAKE3_ABOUT_TEXT}
Screenshot page
Click Element ${MIGRATE_REPO_BUTTON}
Screenshot page
Wait Until Element Is Visible ${BLAKE3_REPO_LANGUAGE_STATS}
Screenshot page
Log Location
BLAKE3 repo address
Post-conditions
Log Location

View File

@ -4,19 +4,123 @@ Library SeleniumLibrary run_on_failure=Nothing
*** Variables ***
${URL} https://git.dotya.ml/
${BROWSER} chrome
${DELAY} 0.2
${LOGIN_BUTTON} //*[@id="navbar"]/div[2]/a[2]
${SIGN_IN} //form/div[4]/button[1]
${USERNAME_FIELD} //*[@id="user_name"]
${PASSWD_FIELD} //*[@id="password"]
${EXPLORE_TABBAR_BUTTON} //*[@id="navbar"]/a[5]
${EXPLORE_PAGE_URL} https://git.dotya.ml/explore/repos
${SEARCH_FIELD} //form/div/input
${SEARCH_BLAKE3_URL} https://git.dotya.ml/explore/repos?tab=&sort=recentupdate&q=BLAKE3
${DAT_TEST_USR_BLAKE3} //a[@href="/dat_test_usr/BLAKE3"]
${BLAKE3_MIRROR_URL} https://git.dotya.ml/dat_test_usr/BLAKE3
${REPO_SETTINGS} //body/div[2]/div[2]/div[1]/div[2]/div/div/a[@href="/dat_test_usr/BLAKE3/settings"]
${DELETE_REPO_BUTTON} //button[@data-modal="#delete-repo-modal"]
${REPO_NAME_INPUT} //body/div[3]/div/div[2]/form/div[2]/input
${BLAKE3_REPO_NAME} BLAKE3
*** Keywords ***
Screenshot page
Capture Page Screenshot
Input Username
[Arguments] ${USERNAME_FIELD} ${USERNAME}
Input Text ${USERNAME_FIELD} ${USERNAME}
Input Password
[Arguments] ${PASSWD_FIELD} ${PASSWORD}
Input Text ${PASSWD_FIELD} ${PASSWORD}
Login page title
Title Should Be Sign In - dotya.ml Gitea Service
Login success
Title Should Be dat_test_usr - Dashboard - dotya.ml Gitea Service
Dashboard page address
Location Should Be https://git.dotya.ml/
Explore page
Location Should Be ${EXPLORE_PAGE_URL}
Input Search
[Arguments] ${SEARCH_FIELD} ${SEARCH_TERM}
Input Text ${SEARCH_FIELD} ${SEARCH_TERM}
Search BLAKE3 page
Location Should Be ${SEARCH_BLAKE3_URL}
Input Confirmation
[Arguments] ${REPO_NAME_INPUT} ${REPO_NAME}
Input Text ${REPO_NAME_INPUT} ${REPO_NAME}
*** Test Cases ***
just a page GET (+ screenshot)
delete migrated repo
${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument headless
Call Method ${chrome_options} add_argument no-sandbox
Call Method ${chrome_options} add_argument disable-dev-shm-usage
${options}= Call Method ${chrome_options} to_capabilities
Set Selenium Speed 0.2
Open Browser ${URL} browser=${BROWSER} desired_capabilities=${options}
Set Selenium Speed ${DELAY}
Capture Page Screenshot
Set Window Size 1920 1080
Maximize Browser Window
Wait Until Element Is Visible ${LOGIN_BUTTON}
Click Element ${LOGIN_BUTTON}
Sleep ${DELAY}
Screenshot page
Log Location
Login page title
Input Username ${USERNAME_FIELD} dat_test_usr
Input Password ${PASSWD_FIELD} D@t_p@ssw000rd987.
Screenshot page
Press Keys None RETURN
Sleep ${DELAY}
Screenshot page
Log Location
Login success
Dashboard page address
Click Element ${EXPLORE_TABBAR_BUTTON}
Sleep ${DELAY}
Screenshot page
Log Location
Explore page
Input Search ${SEARCH_FIELD} ${BLAKE3_REPO_NAME}
Screenshot page
Press Keys None RETURN
Sleep ${DELAY}
Screenshot page
Log Location
Search BLAKE3 page
Click Element ${DAT_TEST_USR_BLAKE3}
Sleep ${DELAY}
Screenshot page
Log Location
Click Element ${REPO_SETTINGS}
Sleep ${DELAY}
Screenshot page
Log Location
Scroll Element Into View ${DELETE_REPO_BUTTON}
Screenshot page
Click Element ${DELETE_REPO_BUTTON}
Sleep ${DELAY}
Screenshot page
Set Focus To Element ${REPO_NAME_INPUT}
Input Confirmation ${REPO_NAME_INPUT} ${BLAKE3_REPO_NAME}
Screenshot page
Press Keys None RETURN
Alert Should Be Present
Screenshot page
Log Location
Dashboard page address
Post-conditions
Log Location