diff --git a/.drone.yml b/.drone.yml index 1501d6a..4de5648 100644 --- a/.drone.yml +++ b/.drone.yml @@ -772,6 +772,7 @@ steps: - failure depends_on: - reveal-env + - m-test09 - name: m-test11 pull: if-not-exists @@ -788,6 +789,7 @@ steps: - failure depends_on: - reveal-env + - m-test09 - name: m-test12 pull: if-not-exists @@ -1077,6 +1079,8 @@ steps: depends_on: - reveal-env - m-test09 + - m-test10 + - m-test11 - name: copy-cache pull: if-not-exists diff --git a/m-test10.robot b/m-test10.robot index 89bc064..a461aeb 100644 --- a/m-test10.robot +++ b/m-test10.robot @@ -6,12 +6,38 @@ ${URL} https://git.dotya.ml/ ${BROWSER} chrome ${DELAY} 0.2 +${BURGER_MENU} //*[@id="navbar-expand-toggle"] +${BURGER_MENU_SIGN_IN} //*[@id="navbar"]/div[2]/a[2] +${USERNAME_FIELD} //*[@id="user_name"] +${PASSWD_FIELD} //*[@id="password"] +${SIGN_IN_BUTTON} //form/div[4]/button[1] + *** Keywords *** Screenshot page Capture Page Screenshot +Sign In page + Location Should Be https://git.dotya.ml/user/login?redirect_to=%2f + +Login page title + Title Should Be Sign In - dotya.ml Gitea Service + +Input Username + [Arguments] ${USERNAME_FIELD} ${USERNAME} + Input Text ${USERNAME_FIELD} ${USERNAME} + +Input Password + [Arguments] ${PASSWD_FIELD} ${PASSWORD} + Input Text ${PASSWD_FIELD} ${PASSWORD} + +Login success + Title Should Be dat_test_usr - Dashboard - dotya.ml Gitea Service + +Dashboard page address + Location Should Be https://git.dotya.ml/ + *** Test Cases *** -open homepage (mobile) +attempt login without username (mobile) # based on Pixel 2 XL mobile browser declared resolution ${devicemetrics}= Create Dictionary width=${411} height=${823} pixelRatio=${2.0} userAgent=Mozilla/5.0 (Linux; Mobile; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36 ${mobileemulation}= Create Dictionary deviceMetrics=${devicemetrics} @@ -27,5 +53,24 @@ open homepage (mobile) Screenshot page Log Location + Click Element ${BURGER_MENU} + Sleep ${DELAY} + Screenshot page + Click Element ${BURGER_MENU_SIGN_IN} + Screenshot page + Log Location + Sign In page + + Login page title + Input Username ${USERNAME_FIELD} dat_test_usr + Input Password ${PASSWD_FIELD} D@t_p@ssw000rd987. + Screenshot page + + Click Element ${SIGN_IN_BUTTON} + Screenshot page + Log Location + Login success + Dashboard page address + Post-conditions Close Browser diff --git a/m-test11.robot b/m-test11.robot index 89bc064..ba12414 100644 --- a/m-test11.robot +++ b/m-test11.robot @@ -6,12 +6,38 @@ ${URL} https://git.dotya.ml/ ${BROWSER} chrome ${DELAY} 0.2 +${BURGER_MENU} //*[@id="navbar-expand-toggle"] +${BURGER_MENU_SIGN_IN} //*[@id="navbar"]/div[2]/a[2] +${USERNAME_FIELD} //*[@id="user_name"] +${PASSWD_FIELD} //*[@id="password"] +${SIGN_IN_BUTTON} //form/div[4]/button[1] + *** Keywords *** Screenshot page Capture Page Screenshot +Sign In page + Location Should Be https://git.dotya.ml/user/login?redirect_to=%2f + +Login page title + Title Should Be Sign In - dotya.ml Gitea Service + +Input Email + [Arguments] ${USERNAME_FIELD} ${EMAIL} + Input Text ${USERNAME_FIELD} ${EMAIL} + +Input Password + [Arguments] ${PASSWD_FIELD} ${PASSWORD} + Input Text ${PASSWD_FIELD} ${PASSWORD} + +Login success + Title Should Be dat_test_usr - Dashboard - dotya.ml Gitea Service + +Dashboard page address + Location Should Be https://git.dotya.ml/ + *** Test Cases *** -open homepage (mobile) +attempt login without username (mobile) # based on Pixel 2 XL mobile browser declared resolution ${devicemetrics}= Create Dictionary width=${411} height=${823} pixelRatio=${2.0} userAgent=Mozilla/5.0 (Linux; Mobile; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Mobile Safari/537.36 ${mobileemulation}= Create Dictionary deviceMetrics=${devicemetrics} @@ -27,5 +53,24 @@ open homepage (mobile) Screenshot page Log Location + Click Element ${BURGER_MENU} + Sleep ${DELAY} + Screenshot page + Click Element ${BURGER_MENU_SIGN_IN} + Screenshot page + Log Location + Sign In page + + Login page title + Input Email ${USERNAME_FIELD} dat_test_usr@noreply.com + Input Password ${PASSWD_FIELD} D@t_p@ssw000rd987. + Screenshot page + + Click Element ${SIGN_IN_BUTTON} + Screenshot page + Log Location + Login success + Dashboard page address + Post-conditions Close Browser