diff --git a/README.md b/README.md index edf86708f7..e426825548 100644 --- a/README.md +++ b/README.md @@ -43,5 +43,5 @@ If you are programmer/sysadmin or you just feeling that you are able to run a lo * *Validation*: JSR-303 (Hibernate Validator) * *Logging*: Slf4j (Logback) * *Unit tests*: Groovy and Spock Framework (for Java code), jasmine (for JavaScript code) -* *Integration tests*: Selenium2, RobotFramework, WireMock +* *Integration tests*: Selenium3, RobotFramework, WireMock * *Others*: Lombok, Togglz, WebJars diff --git a/pom.xml b/pom.xml index 228b449c61..247f86d010 100644 --- a/pom.xml +++ b/pom.xml @@ -325,45 +325,17 @@ org.yaml snakeyaml - - com.codeborne - phantomjsdriver - - - com.opera - operadriver - io.appium java-client - io.selendroid - selendroid-client - - - org.seleniumhq.selenium - selenium-edge-driver - - - org.seleniumhq.selenium - selenium-chrome-driver + io.github.bonigarcia + webdrivermanager - org.seleniumhq.selenium - selenium-ie-driver - - - org.seleniumhq.selenium - selenium-safari-driver - - - org.seleniumhq.selenium - selenium-leg-rc - - - org.seleniumhq.selenium - selenium-firefox-driver + io.selendroid + selendroid-client com.machinepublishers @@ -505,6 +477,9 @@ 5.4.2.Final + + 2.36.0 + 0.8.2 2.2 @@ -554,18 +529,18 @@ 3.1.0 0.0.15 - 1.4.7 - 2.53.1.1 - 3.0.4 + 1.5.1 + 3.141.59.2653 + 3.1.2 0.12.5 - 2.21 + 2.36.0 - 2.53.1 + 3.141.59 3.1.0 diff --git a/src/main/scripts/ci/filter-out-htmlunit-messages.pl b/src/main/scripts/ci/filter-out-htmlunit-messages.pl index dc29364939..83acf6db68 100755 --- a/src/main/scripts/ci/filter-out-htmlunit-messages.pl +++ b/src/main/scripts/ci/filter-out-htmlunit-messages.pl @@ -8,24 +8,28 @@ use warnings; my @regexps = ( - # [WARNING] CSS error: 'http://127.0.0.1:8081/public/bootstrap/3.4.1/css/bootstrap.min.css' [5:56298] Error in expression; ':' found after identifier "progid". - qr/\[WARNING\] CSS error: '[^']+' \[[^]]+\] Error in expression; [^\.]+\.\n/, - # [WARNING] CSS error: 'http://127.0.0.1:8081/public/bootstrap/3.4.1/css/bootstrap.min.css' [5:115558] Invalid color "#000\9". qr/\[WARNING\] CSS error: '[^']+' \[[^]]+\] Invalid color "[^"]+"\.\n/, # [WARNING] CSS error: 'http://127.0.0.1:8081/public/selectize/0.12.3/css/selectize.bootstrap3.css' [176:3] Error in declaration. '*' is not allowed as first char of a property. qr/\[WARNING\] CSS error: '[^']+' \[[^]]+\] Error in declaration\. '\*' is not allowed as first char of a property\.\n/, - # [ERROR] runtimeError: message=[An invalid or illegal selector was specified (selector: '*,:x' error: Invalid selector: :x).] sourceName=[http://127.0.0.1:8081/public/jquery/1.9.1/jquery.min.js] line=[4] lineSource=[null] lineOffset=[0] - qr/\[ERROR\] runtimeError: message=\[[^]]+\] sourceName=\[[^]]+\] line=\[[^]]+\] lineSource=\[[^]]+\] lineOffset=\[[^]]+\]\n/, - - # [ERROR] runtimeError: message=[An invalid or illegal selector was specified (selector: '[id='sizzle-1487943406281'] [data-selectable]:first' error: Invalid selector: [id="sizzle-1487943406281"] [data-selectable]:first).] sourceName=[http://127.0.0.1:8081/public/jquery/1.9.1/jquery.min.js] line=[4] lineSource=[null] lineOffset=[0] - qr/\[ERROR\] runtimeError: message=\[[^\(]+\(selector: '\[id='sizzle-[^']+'\] \[data-selectable\]:first' error: Invalid selector: \[id="sizzle-[^"]+"\] \[data-selectable\]:first\)\.\] sourceName=\[[^]]+\] line=\[[^]]+\] lineSource=\[[^]]+\] lineOffset=\[[^]]+\]\n/, - - # [INFO] Bad input type: "url", creating a text input # [INFO] Bad input type: "select-one", creating a text input - qr/\[INFO\] Bad input type: "[^"]+", creating a text input\n/ + qr/\[INFO\] Bad input type: "[^"]+", creating a text input\n/, + + # Google Charts: + # [WARNING] Obsolete content type encountered: 'text/javascript'. + qr/\[WARNING\] Obsolete content type encountered: 'text.javascript'\.\n/, + + # Google Charts: + # [WARNING] CSS error: 'https://www.gstatic.com/charts/44/css/core/tooltip.css' + # [3:38] Error in pseudo class or element. (Invalid token " ". Was expecting one of: , ":", + # , , .) + qr/\[WARNING\] CSS error: 'https:..www\.gstatic\..*\n/, + + # Google Charts: + # [WARNING] CSS warning: 'https://www.gstatic.com/charts/44/css/core/tooltip.css' [3:38] Ignoring the whole rule. + qr/\[WARNING\] CSS warning: 'https:..www\.gstatic\..*\n/ ); foreach my $line () { diff --git a/src/test/robotframework/account/activation/logic.robot b/src/test/robotframework/account/activation/logic.robot index 3ba5fa0863..b382a1db6e 100644 --- a/src/test/robotframework/account/activation/logic.robot +++ b/src/test/robotframework/account/activation/logic.robot @@ -8,24 +8,24 @@ Force Tags account activation logic *** Test Cases *** Activate account with full info (fill all fields) - Input Text id=login 1st-test-login - Input Text id=name Test Suite - Input Text id=password test-password - Input Text id=passwordConfirmation test-password - Input Text id=activationKey 7777744444 - Submit Form id=activate-account-form + Input Text id:login 1st-test-login + Input Text id:name Test Suite + Input Text id:password test-password + Input Text id:passwordConfirmation test-password + Input Text id:activationKey 7777744444 + Submit Form id:activate-account-form Location Should Be ${SITE_URL}/account/auth - Element Text Should Be id=msg-success Account successfully activated! Now you can pass authentication. + Element Text Should Be id:msg-success Account successfully activated! Now you can pass authentication. Activate account with only required info (fill only mandatory fields) - Input Text id=login 2nd-test-login - Input Text id=name ${EMPTY} - Input Text id=password test-password - Input Text id=passwordConfirmation test-password - Input Text id=activationKey 4444477777 - Submit Form id=activate-account-form + Input Text id:login 2nd-test-login + Input Text id:name ${EMPTY} + Input Text id:password test-password + Input Text id:passwordConfirmation test-password + Input Text id:activationKey 4444477777 + Submit Form id:activate-account-form Location Should Be ${SITE_URL}/account/auth - Element Text Should Be id=msg-success Account successfully activated! Now you can pass authentication. + Element Text Should Be id:msg-success Account successfully activated! Now you can pass authentication. *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/activation/misc-anonymous.robot b/src/test/robotframework/account/activation/misc-anonymous.robot index 9fba4fc32d..c147d47e6b 100644 --- a/src/test/robotframework/account/activation/misc-anonymous.robot +++ b/src/test/robotframework/account/activation/misc-anonymous.robot @@ -1,34 +1,36 @@ *** Settings *** Documentation Verify miscellaneous aspects of account activation from anonymous user Library SeleniumLibrary +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser +Test Setup Disable Client Validation Force Tags account activation misc *** Test Cases *** Activation key should be auto filled from url Go To ${SITE_URL}/account/activate?key=7777755555 - Textfield Value Should Be id=activationKey 7777755555 + Textfield Value Should Be id:activationKey 7777755555 Most short login should be accepted - Input Text id=login ab - Submit Form id=activate-account-form - Page Should Not Contain Element id=login.errors + Input Text id:login ab + Submit Form id:activate-account-form + Page Should Not Contain Element id:login.errors Most long login should be accepted - Input Text id=login abcde1234567890 - Submit Form id=activate-account-form - Page Should Not Contain Element id=login.errors + Input Text id:login abcde1234567890 + Submit Form id:activate-account-form + Page Should Not Contain Element id:login.errors Login with allowed characters should be accepted - Input Text id=login t.3.s.7-T_E_S_T - Submit Form id=activate-account-form - Page Should Not Contain Element id=login.errors + Input Text id:login t.3.s.7-T_E_S_T + Submit Form id:activate-account-form + Page Should Not Contain Element id:login.errors Login should be striped from leading and trailing spaces - Input Text id=login ${SPACE * 2}testLogin${SPACE * 2} - Submit Form id=activate-account-form - Textfield Value Should Be id=login testLogin + Input Text id:login ${SPACE * 2}testLogin${SPACE * 2} + Submit Form id:activate-account-form + Textfield Value Should Be id:login testLogin Name with allowed characters should be accepted [Template] Name should not cause an error @@ -37,27 +39,32 @@ Name with allowed characters should be accepted Семён Якушев Name should be striped from leading and trailing spaces - Input Text id=name ${SPACE * 2}test${SPACE * 2} - Submit Form id=activate-account-form - Textfield Value Should Be id=name test + Input Text id:name ${SPACE * 2}test${SPACE * 2} + Submit Form id:activate-account-form + Textfield Value Should Be id:name test Most short password should be accepted - Input Text id=password 1234 - Submit Form id=activate-account-form - Page Should Not Contain Element id=password.errors + Input Text id:password 1234 + Submit Form id:activate-account-form + Page Should Not Contain Element id:password.errors Password with allowed characters should be accepted - Input Text id=password t3s7-T_E_S_T - Submit Form id=activate-account-form - Page Should Not Contain Element id=password.errors + Input Text id:password t3s7-T_E_S_T + Submit Form id:activate-account-form + Page Should Not Contain Element id:password.errors *** Keywords *** Before Test Suite Open Browser ${SITE_URL}/account/activate ${BROWSER} Register Keyword To Run On Failure Log Source +Disable Client Validation + Remove Element Attribute password required + Remove Element Attribute passwordConfirmation required + Name should not cause an error [Arguments] ${name} - Input Text id=name ${name} - Submit Form id=activate-account-form - Page Should Not Contain Element id=name.errors + Disable Client Validation + Input Text id:name ${name} + Submit Form id:activate-account-form + Page Should Not Contain Element id:name.errors diff --git a/src/test/robotframework/account/activation/misc-user.robot b/src/test/robotframework/account/activation/misc-user.robot index 41103c920b..79c46be622 100644 --- a/src/test/robotframework/account/activation/misc-user.robot +++ b/src/test/robotframework/account/activation/misc-user.robot @@ -10,7 +10,7 @@ Force Tags account activation misc *** Test Cases *** User cannot activate account again Page Should Contain You have already activated account - Page Should Not Contain Element id=activate-account-form + Page Should Not Contain Element id:activate-account-form *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/activation/validation.robot b/src/test/robotframework/account/activation/validation.robot index 45657f6a6a..533eeac2c7 100644 --- a/src/test/robotframework/account/activation/validation.robot +++ b/src/test/robotframework/account/activation/validation.robot @@ -1,42 +1,44 @@ *** Settings *** Documentation Verify account activation validation scenarios Library SeleniumLibrary +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser +Test Setup Disable Client Validation Force Tags account activation validation *** Test Cases *** Activate account with matching login and password - Input Text id=login admin - Input Text id=password admin - Submit Form id=activate-account-form - Element Text Should Be id=password.errors Password and login must be different + Input Text id:login admin + Input Text id:password admin + Submit Form id:activate-account-form + Element Text Should Be id:password.errors Password and login must be different Activate account with mismatching password and password confirmation - Input Text id=password password123 - Input Text id=passwordConfirmation password321 - Submit Form id=activate-account-form - Element Text Should Be id=passwordConfirmation.errors Password mismatch + Input Text id:password password123 + Input Text id:passwordConfirmation password321 + Submit Form id:activate-account-form + Element Text Should Be id:passwordConfirmation.errors Password mismatch Activate account with too short login - Input Text id=login a - Submit Form id=activate-account-form - Element Text Should Be id=login.errors Value is less than allowable minimum of 2 characters + Input Text id:login a + Submit Form id:activate-account-form + Element Text Should Be id:login.errors Value is less than allowable minimum of 2 characters Activate account with too long login - Input Text id=login abcde12345fghkl6 - Submit Form id=activate-account-form - Element Text Should Be id=login.errors Value is greater than allowable maximum of 15 characters + Input Text id:login abcde12345fghkl6 + Submit Form id:activate-account-form + Element Text Should Be id:login.errors Value is greater than allowable maximum of 15 characters Activate account with forbidden characters in login - Input Text id=login 't@$t' - Submit Form id=activate-account-form - Element Text Should Be id=login.errors Login must consist only latin letters, digits, dot, hyphen or underscore + Input Text id:login 't@$t' + Submit Form id:activate-account-form + Element Text Should Be id:login.errors Login must consist only latin letters, digits, dot, hyphen or underscore Activate account with existing login - Input Text id=login coder - Submit Form id=activate-account-form - Element Text Should Be id=login.errors Login already exists + Input Text id:login coder + Submit Form id:activate-account-form + Element Text Should Be id:login.errors Login already exists Activate account with repetition of the special characters in login [Template] Login should not contain repeated special characters @@ -48,63 +50,70 @@ Activate account with repetition of the special characters in login Activate account with too long name ${letter}= Set Variable j - Input Text id=name ${letter * 101} - Submit Form id=activate-account-form - Element Text Should Be id=name.errors Value is greater than allowable maximum of 100 characters + Input Text id:name ${letter * 101} + Submit Form id:activate-account-form + Element Text Should Be id:name.errors Value is greater than allowable maximum of 100 characters Activate account with with forbidden characters in name - Input Text id=name M@st3r_ - Submit Form id=activate-account-form - Element Text Should Be id=name.errors Name must consist only letters, hyphen or spaces + Input Text id:name M@st3r_ + Submit Form id:activate-account-form + Element Text Should Be id:name.errors Name must consist only letters, hyphen or spaces Activate account with name that starts with hyphen - Input Text id=name -test - Submit Form id=activate-account-form - Element Text Should Be id=name.errors Value must not start or end with hyphen + Input Text id:name -test + Submit Form id:activate-account-form + Element Text Should Be id:name.errors Value must not start or end with hyphen Activate account with name that ends with hyphen - Input Text id=name test- - Submit Form id=activate-account-form - Element Text Should Be id=name.errors Value must not start or end with hyphen + Input Text id:name test- + Submit Form id:activate-account-form + Element Text Should Be id:name.errors Value must not start or end with hyphen Activate account with too short password - Input Text id=password 123 - Submit Form id=activate-account-form - Element Text Should Be id=password.errors Value is less than allowable minimum of 4 characters + Input Text id:password 123 + Submit Form id:activate-account-form + Element Text Should Be id:password.errors Value is less than allowable minimum of 4 characters Activate account with too long password ${letter}= Set Variable j - Input Text id=password ${letter * 73} - Submit Form id=activate-account-form - Element Text Should Be id=password.errors Value is greater than allowable maximum of 72 characters + Input Text id:password ${letter * 73} + Submit Form id:activate-account-form + Element Text Should Be id:password.errors Value is greater than allowable maximum of 72 characters Activate account with too short activation key - Input Text id=activationKey 12345 - Submit Form id=activate-account-form - Element Text Should Be id=activationKey.errors Value length must be equal to 10 characters + Input Text id:activationKey 12345 + Submit Form id:activate-account-form + Element Text Should Be id:activationKey.errors Value length must be equal to 10 characters Activate account with too long activation key - Input Text id=activationKey 1234567890123 - Submit Form id=activate-account-form - Element Text Should Be id=activationKey.errors Value length must be equal to 10 characters + Input Text id:activationKey 1234567890123 + Submit Form id:activate-account-form + Element Text Should Be id:activationKey.errors Value length must be equal to 10 characters Activate account with forbidden characters in activation key - Input Text id=activationKey A123=+TEST - Submit Form id=activate-account-form - Element Text Should Be id=activationKey.errors Key must consist only latin letters in lower case or digits + Input Text id:activationKey A123=+TEST + Submit Form id:activate-account-form + Element Text Should Be id:activationKey.errors Key must consist only latin letters in lower case or digits Activate account with wrong activation key - Input Text id=activationKey 1112223334 - Submit Form id=activate-account-form - Element Text Should Be id=activationKey.errors Invalid activation key + Input Text id:activationKey 1112223334 + Submit Form id:activate-account-form + Element Text Should Be id:activationKey.errors Invalid activation key *** Keywords *** Before Test Suite Open Browser ${SITE_URL}/account/activate ${BROWSER} Register Keyword To Run On Failure Log Source +Disable Client Validation + Remove Element Attribute login required + Remove Element Attribute password required + Remove Element Attribute passwordConfirmation required + Remove Element Attribute activationKey required + Login should not contain repeated special characters - [Arguments] ${login} - Input Text id=login ${login} - Submit Form id=activate-account-form - Element Text Should Be id=login.errors Login must not contain repetition of hyphen, dot or underscore + [Arguments] ${login} + Disable Client Validation + Input Text id:login ${login} + Submit Form id:activate-account-form + Element Text Should Be id:login.errors Login must not contain repetition of hyphen, dot or underscore diff --git a/src/test/robotframework/account/authentication/logic.robot b/src/test/robotframework/account/authentication/logic.robot index 244b8ea7c7..58a0465d40 100644 --- a/src/test/robotframework/account/authentication/logic.robot +++ b/src/test/robotframework/account/authentication/logic.robot @@ -7,19 +7,19 @@ Force Tags account authentication logic *** Test Cases *** Successful authentication - Input Text id=login coder - Input Text id=password test - Submit Form id=auth-account-form + Input Text id:login coder + Input Text id:password test + Submit Form id:auth-account-form Location Should Be ${SITE_URL}/ - Page Should Contain Link link=Test Suite - Page Should Contain Button value=Sign out + Page Should Contain Link link:Test Suite + Page Should Contain Button value:Sign out Log out Go To ${SITE_URL}/account/auth - Submit Form id=logout-form + Submit Form id:logout-form Location Should Be ${SITE_URL}/ - Page Should Contain Link link=Sign in - Page Should Contain Link link=Register + Page Should Contain Link link:Sign in + Page Should Contain Link link:Register *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/authentication/misc-user.robot b/src/test/robotframework/account/authentication/misc-user.robot index a8cd162e1a..5f235549dc 100644 --- a/src/test/robotframework/account/authentication/misc-user.robot +++ b/src/test/robotframework/account/authentication/misc-user.robot @@ -10,7 +10,7 @@ Force Tags account authentication misc *** Test Cases *** User cannot authenticate again Page Should Contain You have already authenticated - Page Should Not Contain Element id=auth-account-form + Page Should Not Contain Element id:auth-account-form *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/authentication/validation.robot b/src/test/robotframework/account/authentication/validation.robot index 467f52e6f7..ff0f1ec720 100644 --- a/src/test/robotframework/account/authentication/validation.robot +++ b/src/test/robotframework/account/authentication/validation.robot @@ -1,25 +1,31 @@ *** Settings *** Documentation Verify account authentication validation scenarios Library SeleniumLibrary +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags account authentication validation *** Test Cases *** Authenticate with empty credentials - Input Text id=login ${EMPTY} - Input Text id=password ${EMPTY} - Submit Form id=auth-account-form - Element Text Should Be id=form.errors Invalid login or password + [Setup] Disable Client Validation + Input Text id:login ${EMPTY} + Input Text id:password ${EMPTY} + Submit Form id:auth-account-form + Element Text Should Be id:form.errors Invalid login or password Authenticate with invalid credentials - Input Text id=login test - Input Text id=password test - Submit Form id=auth-account-form - Element Text Should Be id=form.errors Invalid login or password + Input Text id:login test + Input Text id:password test + Submit Form id:auth-account-form + Element Text Should Be id:form.errors Invalid login or password *** Keywords *** Before Test Suite Open Browser ${SITE_URL}/account/auth ${BROWSER} Register Keyword To Run On Failure Log Source +Disable Client Validation + Remove Element Attribute login required + Remove Element Attribute password required + diff --git a/src/test/robotframework/account/registration/logic.robot b/src/test/robotframework/account/registration/logic.robot index 47e7b0c767..52c48443c7 100644 --- a/src/test/robotframework/account/registration/logic.robot +++ b/src/test/robotframework/account/registration/logic.robot @@ -9,9 +9,9 @@ Force Tags account registration logic *** Test Cases *** After account creation an e-mail with activation link should be send - Input Text id=email coder@rock.home - Submit Form id=register-account-form - Element Text Should Be id=msg-success Instructions to finish registration have been sent to your e-mail + Input Text id:email coder@rock.home + Submit Form id:register-account-form + Element Text Should Be id:msg-success Instructions to finish registration have been sent to your e-mail # check that e-mail has been sent by querying Wiremock. See http://wiremock.org/docs/verifying/ Create Session mailserver ${MOCK_SERVER} ${searchQuery}= Set Variable { "method": "POST", "url": "/mailgun/send-message" } diff --git a/src/test/robotframework/account/registration/misc-anonymous.robot b/src/test/robotframework/account/registration/misc-anonymous.robot index 8867b67457..aa06501dc4 100644 --- a/src/test/robotframework/account/registration/misc-anonymous.robot +++ b/src/test/robotframework/account/registration/misc-anonymous.robot @@ -8,9 +8,9 @@ Force Tags account registration misc *** Test Cases *** Email should be striped from leading and trailing spaces - Input Text id=email ${SPACE * 2}test${SPACE * 2} - Submit Form id=register-account-form - Emailfield Value Should Be id=email test + Input Text id:email ${SPACE * 2}test${SPACE * 2} + Submit Form id:register-account-form + Emailfield Value Should Be id:email test *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/registration/misc-user.robot b/src/test/robotframework/account/registration/misc-user.robot index 9f11768009..c1193605fe 100644 --- a/src/test/robotframework/account/registration/misc-user.robot +++ b/src/test/robotframework/account/registration/misc-user.robot @@ -10,7 +10,7 @@ Force Tags account registration misc *** Test Cases *** User cannot register account again Page Should Contain You have already registered - Page Should Not Contain Element id=register-account-form + Page Should Not Contain Element id:register-account-form *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/account/registration/validation.robot b/src/test/robotframework/account/registration/validation.robot index 2dca318d9f..7afc6fbb32 100644 --- a/src/test/robotframework/account/registration/validation.robot +++ b/src/test/robotframework/account/registration/validation.robot @@ -8,9 +8,9 @@ Force Tags account registration validation *** Test Cases *** Register account with too long email ${anyCharacter}= Set Variable 0 - Input Text id=email ${anyCharacter * 255}@mail.ru - Submit Form id=register-account-form - Element Text Should Be id=email.errors Value is greater than allowable maximum of 255 characters + Input Text id:email ${anyCharacter * 255}@mail.ru + Submit Form id:register-account-form + Element Text Should Be id:email.errors Value is greater than allowable maximum of 255 characters Register account with invalid email [Template] Invalid Email Should Be Rejected @@ -24,6 +24,6 @@ Before Test Suite Invalid Email Should Be Rejected [Arguments] ${email} - Input Text id=email ${email} - Submit Form id=register-account-form - Element Text Should Be id=email.errors Invalid e-mail address + Input Text id:email ${email} + Submit Form id:register-account-form + Element Text Should Be id:email.errors Invalid e-mail address diff --git a/src/test/robotframework/auth.steps.robot b/src/test/robotframework/auth.steps.robot index e66b5049c1..1ab0a3b40b 100644 --- a/src/test/robotframework/auth.steps.robot +++ b/src/test/robotframework/auth.steps.robot @@ -6,10 +6,10 @@ Log In As [Documentation] Log in as a user [Arguments] ${login} ${password} ${openPage}=${false} Run Keyword If ${openPage} Go To ${SITE_URL}/account/auth - Input Text id=login ${login} - Input Password id=password ${password} - Submit Form id=auth-account-form + Input Text id:login ${login} + Input Password id:password ${password} + Submit Form id:auth-account-form Log Out [Documentation] Logout the current user - Submit Form id=logout-form + Submit Form id:logout-form diff --git a/src/test/robotframework/category/access.robot b/src/test/robotframework/category/access.robot index a15cc1bee9..389a004858 100644 --- a/src/test/robotframework/category/access.robot +++ b/src/test/robotframework/category/access.robot @@ -9,13 +9,13 @@ Force Tags category access *** Test Cases *** Anonymous user cannot create category Go To ${SITE_URL}/category/add - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden Opening a page of non-existing category show an error Go To ${SITE_URL}/category/category-404-error-test - Element Text Should Be id=error-code 404 - Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found + Element Text Should Be id:error-code 404 + Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/category/creation/logic.robot b/src/test/robotframework/category/creation/logic.robot index 9fac0988f8..19bf7269ed 100644 --- a/src/test/robotframework/category/creation/logic.robot +++ b/src/test/robotframework/category/creation/logic.robot @@ -11,24 +11,24 @@ Force Tags category logic *** Test Cases *** Create category with name in English (fill only mandatory fields) - Input Text id=name Cars - Submit Form id=add-category-form + Input Text id:name Cars + Submit Form id:add-category-form Location Should Be ${SITE_URL}/category/cars - Element Text Should Be id=page-header Cars - Element Text Should Match Regexp id=msg-success Category has been added\.[\\n\\r]+Now you could proceed with creating series\. + Element Text Should Be id:page-header Cars + Element Text Should Match Regexp id:msg-success Category has been added\.[\\n\\r]+Now you could proceed with creating series\. Go To ${SITE_URL}/series/add - ${availableCategories}= Get List Items id=category + ${availableCategories}= Get List Items id:category List Should Contain Value ${availableCategories} Cars # FIXME: verify that after changing language, header will be in English Create category with name in English and Russian - Input Text id=name Space - Input Text id=nameRu Космос - Submit Form id=add-category-form + Input Text id:name Space + Input Text id:nameRu Космос + Submit Form id:add-category-form Location Should Be ${SITE_URL}/category/space - Element Text Should Be id=page-header Space + Element Text Should Be id:page-header Space Go To ${SITE_URL}/category/space?lang=ru - Element Text Should Be id=page-header Космос + Element Text Should Be id:page-header Космос *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/category/creation/misc.robot b/src/test/robotframework/category/creation/misc.robot index 9808b37ac4..d419667c7f 100644 --- a/src/test/robotframework/category/creation/misc.robot +++ b/src/test/robotframework/category/creation/misc.robot @@ -8,32 +8,32 @@ Force Tags category misc *** Test Cases *** Category name should be stripped from leading and trailing spaces - Input Text id=name ${SPACE * 2}t3st${SPACE * 2} - Input Text id=nameRu ${SPACE * 2}т3ст${SPACE * 2} - Submit Form id=add-category-form - Textfield Value Should Be id=name t3st - Textfield Value Should Be id=nameRu т3ст + Input Text id:name ${SPACE * 2}t3st${SPACE * 2} + Input Text id:nameRu ${SPACE * 2}т3ст${SPACE * 2} + Submit Form id:add-category-form + Textfield Value Should Be id:name t3st + Textfield Value Should Be id:nameRu т3ст Category name should be modified by replacing multiple spaces by one - Input Text id=name t3${SPACE * 2}st - Input Text id=nameRu т3${SPACE * 2}ст - Submit Form id=add-category-form - Textfield Value Should Be id=name t3 st - Textfield Value Should Be id=nameRu т3 ст + Input Text id:name t3${SPACE * 2}st + Input Text id:nameRu т3${SPACE * 2}ст + Submit Form id:add-category-form + Textfield Value Should Be id:name t3 st + Textfield Value Should Be id:nameRu т3 ст Category name in English should accept all allowed characters - Input Text id=name Valid-Name Category + Input Text id:name Valid-Name Category # we also type invalid name in Russian to stay on this page - Input Text id=nameRu 1 - Submit Form id=add-category-form - Page Should Not Contain Element id=name.errors + Input Text id:nameRu 1 + Submit Form id:add-category-form + Page Should Not Contain Element id:name.errors Category name in Russian should accept all allowed characters - Input Text id=nameRu Категория Ёё + Input Text id:nameRu Категория Ёё # we also type invalid name in English to stay on this page - Input Text id=name 1 - Submit Form id=add-category-form - Page Should Not Contain Element id=nameRu.errors + Input Text id:name 1 + Submit Form id:add-category-form + Page Should Not Contain Element id:nameRu.errors *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/category/creation/validation.robot b/src/test/robotframework/category/creation/validation.robot index 9cfc51a536..5448c3edef 100644 --- a/src/test/robotframework/category/creation/validation.robot +++ b/src/test/robotframework/category/creation/validation.robot @@ -8,81 +8,81 @@ Force Tags category validation *** Test Cases *** Create category with too short name - Input Text id=name jj - Input Text id=nameRu яя - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value is less than allowable minimum of 3 characters - Element Text Should Be id=nameRu.errors Value is less than allowable minimum of 3 characters + Input Text id:name jj + Input Text id:nameRu яя + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value is less than allowable minimum of 3 characters + Element Text Should Be id:nameRu.errors Value is less than allowable minimum of 3 characters Create category with too long name ${englishLetter}= Set Variable j ${russianLetter}= Set Variable я - Input Text id=name ${englishLetter * 51} - Input Text id=nameRu ${russianLetter * 51} - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value is greater than allowable maximum of 50 characters - Element Text Should Be id=nameRu.errors Value is greater than allowable maximum of 50 characters + Input Text id:name ${englishLetter * 51} + Input Text id:nameRu ${russianLetter * 51} + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value is greater than allowable maximum of 50 characters + Element Text Should Be id:nameRu.errors Value is greater than allowable maximum of 50 characters Create category with forbidden characters in name - Input Text id=name S0m3+CategoryN_ame - Input Text id=nameRu Категория_1+23 - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value must consist only latin letters, hyphen or spaces - Element Text Should Be id=nameRu.errors Value must consist only Russian letters, hyphen or spaces + Input Text id:name S0m3+CategoryN_ame + Input Text id:nameRu Категория_1+23 + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value must consist only latin letters, hyphen or spaces + Element Text Should Be id:nameRu.errors Value must consist only Russian letters, hyphen or spaces Create category with repeating hyphens in name - Input Text id=name te--st - Input Text id=nameRu те--ст - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value must not contain repetition of hyphen - Element Text Should Be id=nameRu.errors Value must not contain repetition of hyphen + Input Text id:name te--st + Input Text id:nameRu те--ст + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value must not contain repetition of hyphen + Element Text Should Be id:nameRu.errors Value must not contain repetition of hyphen Create category with name that starts with hyphen - Input Text id=name -test - Input Text id=nameRu -тест - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value must not start or end with hyphen - Element Text Should Be id=nameRu.errors Value must not start or end with hyphen + Input Text id:name -test + Input Text id:nameRu -тест + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value must not start or end with hyphen + Element Text Should Be id:nameRu.errors Value must not start or end with hyphen Create category with name that ends with hyphen - Input Text id=name test- - Input Text id=nameRu тест- - Submit Form id=add-category-form - Element Text Should Be id=name.errors Value must not start or end with hyphen - Element Text Should Be id=nameRu.errors Value must not start or end with hyphen + Input Text id:name test- + Input Text id:nameRu тест- + Submit Form id:add-category-form + Element Text Should Be id:name.errors Value must not start or end with hyphen + Element Text Should Be id:nameRu.errors Value must not start or end with hyphen Create category with forbidden names # Open a page again to have a clean state (nameRu field has an invalid value) Go To ${SITE_URL}/category/add # 'add' is a forbidden value - Input Text id=name add - Submit Form id=add-category-form - Element Text Should Be id=name.errors Invalid value + Input Text id:name add + Submit Form id:add-category-form + Element Text Should Be id:name.errors Invalid value # 'list' is a forbidden value - Input Text id=name list - Submit Form id=add-category-form - Element Text Should Be id=name.errors Invalid value + Input Text id:name list + Submit Form id:add-category-form + Element Text Should Be id:name.errors Invalid value Create category with existing (non-unique) name - Input Text id=name Sport - Input Text id=nameRu Спорт - Submit Form id=add-category-form - Element Text Should Be id=name.errors Category already exists - Element Text Should Be id=nameRu.errors Category already exists + Input Text id:name Sport + Input Text id:nameRu Спорт + Submit Form id:add-category-form + Element Text Should Be id:name.errors Category already exists + Element Text Should Be id:nameRu.errors Category already exists Create category with existing name but in a different case - Input Text id=name sport - Input Text id=nameRu спорт - Submit Form id=add-category-form - Element Text Should Be id=name.errors Category already exists - Element Text Should Be id=nameRu.errors Category already exists + Input Text id:name sport + Input Text id:nameRu спорт + Submit Form id:add-category-form + Element Text Should Be id:name.errors Category already exists + Element Text Should Be id:nameRu.errors Category already exists Create category with non-existing name but existing (non-unique) slug - Input Text id=name Prehistoric - animals + Input Text id:name Prehistoric - animals # clear a value after a previous test to prevent its validation and looking up in database - Clear Element Text id=nameRu - Submit Form id=add-category-form - Element Text Should Be id=name.errors Category with similar name already exists + Clear Element Text id:nameRu + Submit Form id:add-category-form + Element Text Should Be id:name.errors Category with similar name already exists *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/collection/access.robot b/src/test/robotframework/collection/access.robot index cb6b89c1ba..fb7a52e038 100644 --- a/src/test/robotframework/collection/access.robot +++ b/src/test/robotframework/collection/access.robot @@ -9,8 +9,8 @@ Force Tags collection access *** Test Cases *** Opening a page of non-existing collection show an error Go To ${SITE_URL}/collection/collection-404-error-test - Element Text Should Be id=error-code 404 - Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found + Element Text Should Be id:error-code 404 + Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/collection/add-series/logic.robot b/src/test/robotframework/collection/add-series/logic.robot index 891757a129..1ff2ef1437 100644 --- a/src/test/robotframework/collection/add-series/logic.robot +++ b/src/test/robotframework/collection/add-series/logic.robot @@ -8,10 +8,9 @@ Force Tags collection series logic *** Test Cases *** Add a series to user's collection - [Tags] unstable Go To ${SITE_URL}/series/2 - Submit Form id=add-series-form - Page Should Contain Link css=[href="/series/2"] + Submit Form id:add-series-form + Page Should Contain Link css:[href="/series/2"] *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/collection/add-series/validation.robot b/src/test/robotframework/collection/add-series/validation.robot index 0a30eacc52..4c5c0e3360 100644 --- a/src/test/robotframework/collection/add-series/validation.robot +++ b/src/test/robotframework/collection/add-series/validation.robot @@ -2,26 +2,28 @@ Documentation Verify validation of adding a series to collection Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags collection validation *** Test Cases *** Add a series without required field - Input Text id=number-of-stamps ${EMPTY} - Submit Form id=add-series-form - Element Text Should Be id=number-of-stamps.errors Value must not be empty + [Setup] Disable Client Validation + Input Text id:number-of-stamps ${EMPTY} + Submit Form id:add-series-form + Element Text Should Be id:number-of-stamps.errors Value must not be empty Add a series with too few number of stamps - Input Text id=number-of-stamps 0 - Submit Form id=add-series-form - Element Text Should Be id=number-of-stamps.errors Value must be greater than or equal to 1 + Input Text id:number-of-stamps 0 + Submit Form id:add-series-form + Element Text Should Be id:number-of-stamps.errors Value must be greater than or equal to 1 Add a series with too many number of stamps - Input Text id=number-of-stamps 5 - Submit Form id=add-series-form + Input Text id:number-of-stamps 5 + Submit Form id:add-series-form ${msg}= Set Variable Number of stamps must be less than or equal to a stamps quantity in the series - Element Text Should Be id=number-of-stamps.errors ${msg} + Element Text Should Be id:number-of-stamps.errors ${msg} *** Keywords *** Before Test Suite @@ -32,3 +34,5 @@ Before Test Suite # We also need a series with no more than 4 stamps, so the 5 stamps will lead to an error. Go To ${SITE_URL}/series/2 +Disable Client Validation + Remove Element Attribute number-of-stamps required diff --git a/src/test/robotframework/collection/estimation/access.robot b/src/test/robotframework/collection/estimation/access.robot index 498e6e96dc..6cddeb941f 100644 --- a/src/test/robotframework/collection/estimation/access.robot +++ b/src/test/robotframework/collection/estimation/access.robot @@ -9,28 +9,28 @@ Force Tags collection estimation access *** Test Cases *** Anonymouser user doesn't have access to someone's estimation page Go To ${SITE_URL}/collection/paid/estimation - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-msg Forbidden User doesn't have access to someone's estimation page Log In As login=coder password=test openPage=${true} Go To ${SITE_URL}/collection/paid/estimation - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-msg Forbidden Log Out Paid user has access only to its own estimation page Log In As login=paid password=test openPage=${true} Go To ${SITE_URL}/collection/paid/estimation - Element Text Should Be tag=h3 Paid User's collection + Element Text Should Be tag:h3 Paid User's collection Go To ${SITE_URL}/collection/admin/estimation - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-msg Forbidden Log Out Admin has access to everyone's estimation page Log In As login=admin password=test openPage=${true} Go To ${SITE_URL}/collection/paid/estimation - Element Text Should Be tag=h3 Paid User's collection + Element Text Should Be tag:h3 Paid User's collection Go To ${SITE_URL}/collection/admin/estimation - Element Text Should Be tag=h3 Site Admin's collection + Element Text Should Be tag:h3 Site Admin's collection # No need to log out as a browser will be closed after the test *** Keywords *** diff --git a/src/test/robotframework/collection/estimation/logic.robot b/src/test/robotframework/collection/estimation/logic.robot index ebcff22bed..a02a9e338e 100644 --- a/src/test/robotframework/collection/estimation/logic.robot +++ b/src/test/robotframework/collection/estimation/logic.robot @@ -10,14 +10,13 @@ Force Tags collection estimation logic *** Test Cases *** Message should be shown when a collection is empty Go To ${SITE_URL}/collection/paid/estimation - Element Text Should Be id=empty-collection-msg In this collection is no stamps + Element Text Should Be id:empty-collection-msg In this collection is no stamps Series with its price should be taken into account - [Tags] unstable Go To ${SITE_URL}/series/1 - Input Text id=paid-price 100 - Select From List By Value id=paid-currency ${expectedCurrency} - Submit Form id=add-series-form + Input Text id:paid-price 100 + Select From List By Value id:paid-currency ${expectedCurrency} + Submit Form id:add-series-form Go To ${SITE_URL}/collection/paid/estimation Table Cell Should Contain collection-estimation row=2 column=2 text=100.00 ${expectedCurrency} # FIXME: use "Table Footer Should Contain" instead, when it will be fixed. @@ -25,9 +24,8 @@ Series with its price should be taken into account Table Header Should Contain collection-estimation 100.00 ${expectedCurrency} Series without price should be shown but not taken into account - [Tags] unstable Go To ${SITE_URL}/series/2 - Submit Form id=add-series-form + Submit Form id:add-series-form Go To ${SITE_URL}/collection/paid/estimation Table Cell Should Contain collection-estimation row=3 column=2 text=${EMPTY} # FIXME: use "Table Footer Should Contain" instead, when it will be fixed. diff --git a/src/test/robotframework/collection/remove-series/logic.robot b/src/test/robotframework/collection/remove-series/logic.robot index b668b77a53..8b7efc0fd7 100644 --- a/src/test/robotframework/collection/remove-series/logic.robot +++ b/src/test/robotframework/collection/remove-series/logic.robot @@ -8,10 +8,9 @@ Force Tags collection series logic *** Test Cases *** Remove a series from user's collection - [Tags] unstable Go To ${SITE_URL}/series/3 - Submit Form id=remove-series-form - Page Should Not Contain Link css=[href="/series/3"] + Submit Form id:remove-series-form + Page Should Not Contain Link css:[href="/series/3"] *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/country/access.robot b/src/test/robotframework/country/access.robot index e7a7449a40..b538496ae3 100644 --- a/src/test/robotframework/country/access.robot +++ b/src/test/robotframework/country/access.robot @@ -9,13 +9,13 @@ Force Tags country access *** Test Cases *** Anonymous user cannot create country Go To ${SITE_URL}/country/add - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden Opening a page of non-existing country show an error Go To ${SITE_URL}/country/country-404-error-test - Element Text Should Be id=error-code 404 - Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found + Element Text Should Be id:error-code 404 + Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/country/creation/logic.robot b/src/test/robotframework/country/creation/logic.robot index f7b90beefc..ec598ea208 100644 --- a/src/test/robotframework/country/creation/logic.robot +++ b/src/test/robotframework/country/creation/logic.robot @@ -10,23 +10,22 @@ Force Tags country logic *** Test Cases *** Create country with name in English (fill only mandatory fields) - [Tags] unstable - Input Text id=name Germany - Submit Form id=add-country-form + Input Text id:name Germany + Submit Form id:add-country-form Location Should Be ${SITE_URL}/country/germany - Element Text Should Be id=page-header Stamps of Germany - Element Text Should Match Regexp id=msg-success Country has been added\.[\\n\\r]+Now you could proceed with creating series\. + Element Text Should Be id:page-header Stamps of Germany + Element Text Should Match Regexp id:msg-success Country has been added\.[\\n\\r]+Now you could proceed with creating series\. Go To ${SITE_URL}/series/add Country Field Should Have Option Germany Create country with name in English and Russian - Input Text id=name Czechia - Input Text id=nameRu Чехия - Submit Form id=add-country-form + Input Text id:name Czechia + Input Text id:nameRu Чехия + Submit Form id:add-country-form Location Should Be ${SITE_URL}/country/czechia - Element Text Should Be id=page-header Stamps of Czechia + Element Text Should Be id:page-header Stamps of Czechia Go To ${SITE_URL}/country/czechia?lang=ru - Element Text Should Be id=page-header Марки страны Чехия + Element Text Should Be id:page-header Марки страны Чехия *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/country/creation/misc.robot b/src/test/robotframework/country/creation/misc.robot index 6c2ab4988f..220c2dd536 100644 --- a/src/test/robotframework/country/creation/misc.robot +++ b/src/test/robotframework/country/creation/misc.robot @@ -8,32 +8,32 @@ Force Tags country misc *** Test Cases *** Country name should be stripped from leading and trailing spaces - Input Text id=name ${SPACE * 2}t3st${SPACE * 2} - Input Text id=nameRu ${SPACE * 2}т3ст${SPACE * 2} - Submit Form id=add-country-form - Textfield Value Should Be id=name t3st - Textfield Value Should Be id=nameRu т3ст + Input Text id:name ${SPACE * 2}t3st${SPACE * 2} + Input Text id:nameRu ${SPACE * 2}т3ст${SPACE * 2} + Submit Form id:add-country-form + Textfield Value Should Be id:name t3st + Textfield Value Should Be id:nameRu т3ст Country name should be modified by replacing multiple spaces by one - Input Text id=name t3${SPACE * 2}st - Input Text id=nameRu т3${SPACE * 2}ст - Submit Form id=add-country-form - Textfield Value Should Be id=name t3 st - Textfield Value Should Be id=nameRu т3 ст + Input Text id:name t3${SPACE * 2}st + Input Text id:nameRu т3${SPACE * 2}ст + Submit Form id:add-country-form + Textfield Value Should Be id:name t3 st + Textfield Value Should Be id:nameRu т3 ст Country name in English should accept all allowed characters - Input Text id=name Valid-Name Country + Input Text id:name Valid-Name Country # we also type invalid name in Russian to stay on this page - Input Text id=nameRu 1 - Submit Form id=add-country-form - Page Should Not Contain Element id=name.errors + Input Text id:nameRu 1 + Submit Form id:add-country-form + Page Should Not Contain Element id:name.errors Country name in Russian should accept all allowed characters - Input Text id=nameRu Ёё Нормальное-название страны + Input Text id:nameRu Ёё Нормальное-название страны # we also type invalid name in English to stay on this page - Input Text id=name 1 - Submit Form id=add-country-form - Page Should Not Contain Element id=nameRu.errors + Input Text id:name 1 + Submit Form id:add-country-form + Page Should Not Contain Element id:nameRu.errors *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/country/creation/validation.robot b/src/test/robotframework/country/creation/validation.robot index 1a6e8f40fb..1f675e5cc6 100644 --- a/src/test/robotframework/country/creation/validation.robot +++ b/src/test/robotframework/country/creation/validation.robot @@ -8,81 +8,81 @@ Force Tags country validation *** Test Cases *** Create country with too short name - Input Text id=name jj - Input Text id=nameRu яя - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value is less than allowable minimum of 3 characters - Element Text Should Be id=nameRu.errors Value is less than allowable minimum of 3 characters + Input Text id:name jj + Input Text id:nameRu яя + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value is less than allowable minimum of 3 characters + Element Text Should Be id:nameRu.errors Value is less than allowable minimum of 3 characters Create country with too long name ${englishLetter}= Set Variable j ${russianLetter}= Set Variable я - Input Text id=name ${englishLetter * 51} - Input Text id=nameRu ${russianLetter * 51} - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value is greater than allowable maximum of 50 characters - Element Text Should Be id=nameRu.errors Value is greater than allowable maximum of 50 characters + Input Text id:name ${englishLetter * 51} + Input Text id:nameRu ${russianLetter * 51} + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value is greater than allowable maximum of 50 characters + Element Text Should Be id:nameRu.errors Value is greater than allowable maximum of 50 characters Create country with forbidden characters in name - Input Text id=name S0m3+CountryN_ame - Input Text id=nameRu Нек0торо3+наз_вание - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value must consist only latin letters, hyphen or spaces - Element Text Should Be id=nameRu.errors Value must consist only Russian letters, hyphen or spaces + Input Text id:name S0m3+CountryN_ame + Input Text id:nameRu Нек0торо3+наз_вание + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value must consist only latin letters, hyphen or spaces + Element Text Should Be id:nameRu.errors Value must consist only Russian letters, hyphen or spaces Create country with repeating hyphens in name - Input Text id=name te--st - Input Text id=nameRu те--ст - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value must not contain repetition of hyphen - Element Text Should Be id=nameRu.errors Value must not contain repetition of hyphen + Input Text id:name te--st + Input Text id:nameRu те--ст + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value must not contain repetition of hyphen + Element Text Should Be id:nameRu.errors Value must not contain repetition of hyphen Create country with name that starts with hyphen - Input Text id=name -test - Input Text id=nameRu -тест - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value must not start or end with hyphen - Element Text Should Be id=nameRu.errors Value must not start or end with hyphen + Input Text id:name -test + Input Text id:nameRu -тест + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value must not start or end with hyphen + Element Text Should Be id:nameRu.errors Value must not start or end with hyphen Create country with name that ends with hyphen - Input Text id=name test- - Input Text id=nameRu тест- - Submit Form id=add-country-form - Element Text Should Be id=name.errors Value must not start or end with hyphen - Element Text Should Be id=nameRu.errors Value must not start or end with hyphen + Input Text id:name test- + Input Text id:nameRu тест- + Submit Form id:add-country-form + Element Text Should Be id:name.errors Value must not start or end with hyphen + Element Text Should Be id:nameRu.errors Value must not start or end with hyphen Create country with existing (non-unique) name - Input Text id=name Italy - Input Text id=nameRu Италия - Submit Form id=add-country-form - Element Text Should Be id=name.errors Country already exists - Element Text Should Be id=nameRu.errors Country already exists + Input Text id:name Italy + Input Text id:nameRu Италия + Submit Form id:add-country-form + Element Text Should Be id:name.errors Country already exists + Element Text Should Be id:nameRu.errors Country already exists Create country with existing name but in a different case - Input Text id=name italy - Input Text id=nameRu италия - Submit Form id=add-country-form - Element Text Should Be id=name.errors Country already exists - Element Text Should Be id=nameRu.errors Country already exists + Input Text id:name italy + Input Text id:nameRu италия + Submit Form id:add-country-form + Element Text Should Be id:name.errors Country already exists + Element Text Should Be id:nameRu.errors Country already exists Create country with non-existing name but existing (non-unique) slug - Input Text id=name United - Kingdom + Input Text id:name United - Kingdom # clear a value after a previous test to prevent its validation and looking up in database - Clear Element Text id=nameRu - Submit Form id=add-country-form - Element Text Should Be id=name.errors Country with similar name already exists + Clear Element Text id:nameRu + Submit Form id:add-country-form + Element Text Should Be id:name.errors Country with similar name already exists Create country with forbidden names # Open a page again to have a clean state (nameRu field has an invalid value) Go To ${SITE_URL}/country/add # 'add' is a forbidden value - Input Text id=name add - Submit Form id=add-country-form - Element Text Should Be id=name.errors Invalid value + Input Text id:name add + Submit Form id:add-country-form + Element Text Should Be id:name.errors Invalid value # 'list' is a forbidden value - Input Text id=name list - Submit Form id=add-country-form - Element Text Should Be id=name.errors Invalid value + Input Text id:name list + Submit Form id:add-country-form + Element Text Should Be id:name.errors Invalid value *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/participant/creation/logic.robot b/src/test/robotframework/participant/creation/logic.robot index cfc16d4251..727e746ebe 100644 --- a/src/test/robotframework/participant/creation/logic.robot +++ b/src/test/robotframework/participant/creation/logic.robot @@ -10,28 +10,28 @@ Force Tags participant logic *** Test Cases *** Create participant with name only (fill only mandatory fields) - Input Text id=name participant1 - Select Checkbox id=seller - Submit Form id=add-participant-form + Input Text id:name participant1 + Select Checkbox id:seller + Submit Form id:add-participant-form Location Should Be ${SITE_URL}/ Go To ${SITE_URL}/series/1 - ${availableSellers}= Get List Items id=seller - ${availableBuyers}= Get List Items id=buyer + ${availableSellers}= Get List Items id:seller + ${availableBuyers}= Get List Items id:buyer List Should Contain Value ${availableSellers} participant1 List Should Not Contain Value ${availableBuyers} participant1 Create participant with full info (fill all fields) - Input Text id=name participant2 - Select From List By Label id=group example.com - Select Checkbox id=buyer - Select Checkbox id=seller - Input Text id=url http://participant2.example.org - Submit Form id=add-participant-form + Input Text id:name participant2 + Select From List By Label id:group example.com + Select Checkbox id:buyer + Select Checkbox id:seller + Input Text id:url http://participant2.example.org + Submit Form id:add-participant-form Location Should Be ${SITE_URL}/ Go To ${SITE_URL}/series/1 # FIXME: check that buyer and seller listed in the "example.com" group - ${availableSellers}= Get List Items id=seller - ${availableBuyers}= Get List Items id=buyer + ${availableSellers}= Get List Items id:seller + ${availableBuyers}= Get List Items id:buyer List Should Contain Value ${availableSellers} participant2 List Should Contain Value ${availableBuyers} participant2 diff --git a/src/test/robotframework/participant/creation/misc.robot b/src/test/robotframework/participant/creation/misc.robot index 918f80920b..a20c3757b7 100644 --- a/src/test/robotframework/participant/creation/misc.robot +++ b/src/test/robotframework/participant/creation/misc.robot @@ -9,11 +9,11 @@ Force Tags participant misc *** Test Cases *** Name and url should be stripped from leading and trailing spaces - Input Text id=name ${SPACE * 2}f${SPACE * 2} - Input Text id=url ${SPACE * 2}url${SPACE * 2} - Submit Form id=add-participant-form - Textfield Value Should Be id=name f - Urlfield Value Should Be id=url url + Input Text id:name ${SPACE * 2}f${SPACE * 2} + Input Text id:url ${SPACE * 2}url${SPACE * 2} + Submit Form id:add-participant-form + Textfield Value Should Be id:name f + Urlfield Value Should Be id:url url *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/participant/creation/validation.robot b/src/test/robotframework/participant/creation/validation.robot index 0e0b6413f4..949613a186 100644 --- a/src/test/robotframework/participant/creation/validation.robot +++ b/src/test/robotframework/participant/creation/validation.robot @@ -2,32 +2,34 @@ Documentation Verify participant creation validation scenarios Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags participant validation *** Test Cases *** Create participant with blank required fields - Submit Form id=add-participant-form - Element Text Should Be id=name.errors Value must not be empty + [Setup] Disable Client Validation + Submit Form id:add-participant-form + Element Text Should Be id:name.errors Value must not be empty Create participant with too short name - Input Text id=name xx - Submit Form id=add-participant-form - Element Text Should Be id=name.errors Value is less than allowable minimum of 3 characters + Input Text id:name xx + Submit Form id:add-participant-form + Element Text Should Be id:name.errors Value is less than allowable minimum of 3 characters Create participant with too long name and url ${letter}= Set Variable j - Input Text id=name ${letter * 51} - Input Text id=url http://${letter * 255} - Submit Form id=add-participant-form - Element Text Should Be id=name.errors Value is greater than allowable maximum of 50 characters - Element Text Should Be id=url.errors Value is greater than allowable maximum of 255 characters + Input Text id:name ${letter * 51} + Input Text id:url http://${letter * 255} + Submit Form id:add-participant-form + Element Text Should Be id:name.errors Value is greater than allowable maximum of 50 characters + Element Text Should Be id:url.errors Value is greater than allowable maximum of 255 characters Create participant with invalid url - Input Text id=url invalid-url - Submit Form id=add-participant-form - Element Text Should Be id=url.errors Value must be a valid URL + Input Text id:url invalid-url + Submit Form id:add-participant-form + Element Text Should Be id:url.errors Value must be a valid URL *** Keywords *** Before Test Suite @@ -36,3 +38,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/participant/add +Disable Client Validation + Remove Element Attribute name required diff --git a/src/test/robotframework/selenium.utils.robot b/src/test/robotframework/selenium.utils.robot index a88d17abbc..58825b6f77 100644 --- a/src/test/robotframework/selenium.utils.robot +++ b/src/test/robotframework/selenium.utils.robot @@ -24,20 +24,13 @@ Emailfield Value Should Be ${value}= Get Value ${locator} Should Be Equal ${expected} ${value} -Select Country - [Documentation] Select the given value in a select list that is using selectize.js - [Arguments] ${value} - # We can't use "Select From List By Label" because - # 1) it doesn't work with invisible elements (and selectize.js makes field invisible) - # 2) selectize.js dynamically creates list of countries only when we're clicking on the field - Click Element id=country-selectized - ${countryOption}= Catenate SEPARATOR=/ - ... //*[contains(@class, "selectize-control")] - ... *[contains(@class, "selectize-dropdown")] - ... *[contains(@class, "selectize-dropdown-content")] - ... *[contains(@class, "option") and text()="${value}"] - Wait Until Page Contains Element xpath=${countryOption} - Click Element xpath=${countryOption} +# We can't use "Select From List By Label" because +# 1) it doesn't work with invisible elements (and selectize.js makes a field invisible) +# 2) selectize.js dynamically creates a list of countries only when we click on a field +Selectize By Value + [Documentation] Select the given value in a select that is using selectize.js by provided id + [Arguments] ${id} ${slug} + Execute Javascript return $('#${id}').selectize()[0].selectize.setValue('${slug}'); Country Field Should Have Option [Documentation] Verify the selection of the select list that is using selectize.js @@ -45,10 +38,10 @@ Country Field Should Have Option # We can't use "List Selection Should Be" because # 1) it doesn't work with invisible elements (and selectize.js makes field invisible) # 2) selectize.js dynamically creates list of countries only when we're clicking on the field - Click Element id=country-selectized + Click Element id:country-selectized ${dropdownXpath}= Set Variable //*[contains(@class, "selectize-dropdown-content")] - Wait Until Page Contains Element xpath=${dropdownXpath}/*[contains(@class, "option")] - Xpath Should Match X Times xpath=${dropdownXpath}/*[text() = "${value}"] expectedXpathCount=1 + Wait Until Page Contains Element xpath:${dropdownXpath}/*[contains(@class, "option")] + Xpath Should Match X Times xpath:${dropdownXpath}/*[text() = "${value}"] expectedXpathCount=1 Link Should Point To [Documentation] Verify that "href" attribute of the element refers to a link @@ -74,3 +67,8 @@ Select Random Option From List ${size}= Get Length ${options} ${randomIndex}= Evaluate random.randint(0, ${size}-1) modules=random Select From List By Index ${locator} ${randomIndex} + +Remove Element Attribute + [Documentation] Remove an attribute with a specified name from an element identified by its id + [Arguments] ${id} ${name} + Execute Javascript return window.document.getElementById('${id}').removeAttribute('${name}'); diff --git a/src/test/robotframework/series/access.robot b/src/test/robotframework/series/access.robot index 4e381ba192..72195c10ef 100644 --- a/src/test/robotframework/series/access.robot +++ b/src/test/robotframework/series/access.robot @@ -9,13 +9,13 @@ Force Tags series access *** Test Cases *** Anonymous user cannot create series Go To ${SITE_URL}/series/add - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden Opening a page of non-existing series show an error Go To ${SITE_URL}/series/999 - Element Text Should Be id=error-code 404 - Element Text Should Match Regexp id=error-msg Requested page[\\n\\r]+not found + Element Text Should Be id:error-code 404 + Element Text Should Match Regexp id:error-msg Requested page[\\n\\r]+not found *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/add-image/logic.robot b/src/test/robotframework/series/add-image/logic.robot index d416f86e1d..8bd5a023c3 100644 --- a/src/test/robotframework/series/add-image/logic.robot +++ b/src/test/robotframework/series/add-image/logic.robot @@ -9,16 +9,16 @@ Force Tags series add-image logic *** Test Cases *** Add additional image by uploading a file - Page Should Not Contain Image id=series-image-2 - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Submit Form id=add-image-form - Page Should Contain Image id=series-image-2 + Page Should Not Contain Image id:series-image-2 + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + Submit Form id:add-image-form + Page Should Contain Image id:series-image-2 Add additional image by downloading a file from URL - Page Should Not Contain Image id=series-image-3 - Input Text id=image-url ${SITE_URL}/image/1 - Submit Form id=add-image-form - Page Should Contain Image id=series-image-3 + Page Should Not Contain Image id:series-image-3 + Input Text id:image-url ${SITE_URL}/image/1 + Submit Form id:add-image-form + Page Should Contain Image id:series-image-3 *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/add-image/validation.robot b/src/test/robotframework/series/add-image/validation.robot index bc0bc4fc9a..d36af4417e 100644 --- a/src/test/robotframework/series/add-image/validation.robot +++ b/src/test/robotframework/series/add-image/validation.robot @@ -8,51 +8,51 @@ Force Tags series add-image validation *** Test Cases *** Add image with empty required fields - Submit Form id=add-image-form - Element Text Should Be id=image.errors Image or image URL must be specified - Element Text Should Be id=image-url.errors Image or image URL must be specified + Submit Form id:add-image-form + Element Text Should Be id:image.errors Image or image URL must be specified + Element Text Should Be id:image-url.errors Image or image URL must be specified Add image with an empty file - Choose File id=image ${TEST_RESOURCE_DIR}${/}empty.jpg - Submit Form id=add-image-form - Element Text Should Be id=image.errors File must not be empty + Choose File id:image ${TEST_RESOURCE_DIR}${/}empty.jpg + Submit Form id:add-image-form + Element Text Should Be id:image.errors File must not be empty Add image with both image and an image URL - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Input Text id=image-url ${SITE_URL}/image/1 - Submit Form id=add-image-form - Element Text Should Be id=image.errors Image or image URL must be specified - Element Text Should Be id=image-url.errors Image or image URL must be specified + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + Input Text id:image-url ${SITE_URL}/image/1 + Submit Form id:add-image-form + Element Text Should Be id:image.errors Image or image URL must be specified + Element Text Should Be id:image-url.errors Image or image URL must be specified Add image with invalid URL - Input Text id=image-url invalid-url - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors Value must be a valid URL + Input Text id:image-url invalid-url + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors Value must be a valid URL Add image with URL with invalid response - Input Text id=image-url ${MOCK_SERVER}/series/response-400 - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors Could not download file + Input Text id:image-url ${MOCK_SERVER}/series/response-400 + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors Could not download file Add image with URL to a file that does not exist - Input Text id=image-url ${MOCK_SERVER}/series/response-404 - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors File not found + Input Text id:image-url ${MOCK_SERVER}/series/response-404 + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors File not found Add image with URL that causes a redirect - Input Text id=image-url ${MOCK_SERVER}/series/response-301 - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors URL must not redirect to another address + Input Text id:image-url ${MOCK_SERVER}/series/response-301 + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors URL must not redirect to another address Add image with URL to an empty file - Input Text id=image-url ${MOCK_SERVER}/series/empty-jpeg-file - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors File must not be empty + Input Text id:image-url ${MOCK_SERVER}/series/empty-jpeg-file + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors File must not be empty Add image with URL to a file of unsupported type (not an image) - Input Text id=image-url ${MOCK_SERVER}/series/not-image-file - Submit Form id=add-image-form - Element Text Should Be id=image-url.errors Invalid file type + Input Text id:image-url ${MOCK_SERVER}/series/not-image-file + Submit Form id:add-image-form + Element Text Should Be id:image-url.errors Invalid file type *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/creation/logic-admin.robot b/src/test/robotframework/series/creation/logic-admin.robot index 02d3777e41..fe8cabcf56 100644 --- a/src/test/robotframework/series/creation/logic-admin.robot +++ b/src/test/robotframework/series/creation/logic-admin.robot @@ -10,66 +10,65 @@ Force Tags series logic *** Test Cases *** Create series by filling only required fields and providing an image - Select From List By Label id=category Sport - Input Text id=quantity 2 - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Submit Form id=add-series-form - Element Text Should Be id=category_name Sport - Element Text Should Be id=quantity 2 - Element Text Should Be id=perforated Yes - Page Should Contain Image id=series-image-1 + Select From List By Label id:category Sport + Input Text id:quantity 2 + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + Submit Form id:add-series-form + Element Text Should Be id:category_name Sport + Element Text Should Be id:quantity 2 + Element Text Should Be id:perforated Yes + Page Should Contain Image id:series-image-1 Create series by filling only required fields and providing a URL to image - Select From List By Label id=category Sport - Input Text id=quantity 1 - Input Text id=image-url ${SITE_URL}/image/1 - Submit Form id=add-series-form - Element Text Should Be id=category_name Sport - Element Text Should Be id=quantity 1 - Element Text Should Be id=perforated Yes - Page Should Contain Image id=series-image-1 + Select From List By Label id:category Sport + Input Text id:quantity 1 + Input Text id:image-url ${SITE_URL}/image/1 + Submit Form id:add-series-form + Element Text Should Be id:category_name Sport + Element Text Should Be id:quantity 1 + Element Text Should Be id:perforated Yes + Page Should Contain Image id:series-image-1 Create series by filling all fields - [Tags] unstable - Select From List By Label id=category Sport - Select Country Italy - Input Text id=quantity 3 - Unselect Checkbox id=perforated - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Click Element id=specify-issue-date-link - Select From List By Value id=day 4 - Select From List By Value id=month 5 - Select From List By Value id=year 1999 - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers 101, 102, 103 - Input Text id=michelPrice 10.5 - Input Text id=scottNumbers 110, 111, 112 - Input Text id=scottPrice 1000 - Input Text id=yvertNumbers 120, 121, 122 - Input Text id=yvertPrice 8.11 - Input Text id=gibbonsNumbers 130, 131, 132 - Input Text id=gibbonsPrice 400.335 - Input Text id=solovyovNumbers 140, 141, 142 - Input Text id=solovyovPrice 200.5 - Input Text id=zagorskiNumbers 150, 151, 152 - Input Text id=zagorskiPrice 300.55 - Click Element id=add-comment-link - Input Text id=comment Any text - Submit Form id=add-series-form - Element Text Should Be id=category_name Sport - Element Text Should Be id=country_name Italy - Element Text Should Be id=issue_date 04.05.1999 - Element Text Should Be id=quantity 3 - Element Text Should Be id=perforated No - Element Text Should Be id=michel_catalog_info \#101-103 (10.5 EUR) - Element Text Should Be id=scott_catalog_info \#110-112 (1000 USD) - Element Text Should Be id=yvert_catalog_info \#120-122 (8.11 EUR) + Select From List By Label id:category Sport + Selectize By Value country italy + Input Text id:quantity 3 + Unselect Checkbox id:perforated + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + Click Element id:specify-issue-date-link + Select From List By Value id:day 4 + Select From List By Value id:month 5 + Select From List By Value id:year 1999 + Click Element id:add-catalog-numbers-link + Input Text id:michelNumbers 101, 102, 103 + Input Text id:michelPrice 10.5 + Input Text id:scottNumbers 110, 111, 112 + Input Text id:scottPrice 1000 + Input Text id:yvertNumbers 120, 121, 122 + Input Text id:yvertPrice 8.11 + Input Text id:gibbonsNumbers 130, 131, 132 + Input Text id:gibbonsPrice 400.335 + Input Text id:solovyovNumbers 140, 141, 142 + Input Text id:solovyovPrice 200.5 + Input Text id:zagorskiNumbers 150, 151, 152 + Input Text id:zagorskiPrice 300.55 + Click Element id:add-comment-link + Input Text id:comment Any text + Submit Form id:add-series-form + Element Text Should Be id:category_name Sport + Element Text Should Be id:country_name Italy + Element Text Should Be id:issue_date 04.05.1999 + Element Text Should Be id:quantity 3 + Element Text Should Be id:perforated No + Element Text Should Be id:michel_catalog_info \#101-103 (10.5 EUR) + Element Text Should Be id:scott_catalog_info \#110-112 (1000 USD) + Element Text Should Be id:yvert_catalog_info \#120-122 (8.11 EUR) # FIXME: disable rounding mode - Element Text Should Be id=gibbons_catalog_info \#130-132 (400.34 GBP) - Element Text Should Be id=solovyov_catalog_info \#140-142 (200.5 RUB) - Element Text Should Be id=zagorski_catalog_info \#150-152 (300.55 RUB) - Element Text Should Be id=comment Any text - Page Should Contain Image id=series-image-1 + Element Text Should Be id:gibbons_catalog_info \#130-132 (400.34 GBP) + Element Text Should Be id:solovyov_catalog_info \#140-142 (200.5 RUB) + Element Text Should Be id:zagorski_catalog_info \#150-152 (300.55 RUB) + Element Text Should Be id:comment Any text + Page Should Contain Image id:series-image-1 *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/creation/logic-user.robot b/src/test/robotframework/series/creation/logic-user.robot index 9d30c0934a..1493b5cf0d 100644 --- a/src/test/robotframework/series/creation/logic-user.robot +++ b/src/test/robotframework/series/creation/logic-user.robot @@ -10,52 +10,58 @@ Force Tags series logic *** Test Cases *** Create series by filling only required fields - Select From List By Label id=category Sport - Input Text id=quantity 2 - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Submit Form id=add-series-form - Element Text Should Be id=category_name Sport - Element Text Should Be id=quantity 2 - Element Text Should Be id=perforated Yes - Page Should Contain Image id=series-image-1 + Select From List By Label id:category Sport + Input Text id:quantity 2 + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + # Workaround for an invalid form when it contains required file input: + # https://github.com/HtmlUnit/htmlunit/issues/76 + Remove Element Attribute image required + Submit Form id:add-series-form + Element Text Should Be id:category_name Sport + Element Text Should Be id:quantity 2 + Element Text Should Be id:perforated Yes + Page Should Contain Image id:series-image-1 Create series by filling all fields - Select From List By Label id=category Sport - Select Country Italy - Input Text id=quantity 3 - Unselect Checkbox id=perforated - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Click Element id=specify-issue-date-link - Select From List By Value id=day 8 - Select From List By Value id=month 9 - Select From List By Value id=year 1999 - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers 1, 2, 3 - Input Text id=michelPrice 10.5 - Input Text id=scottNumbers 10, 11, 12 - Input Text id=scottPrice 1000 - Input Text id=yvertNumbers 20, 21, 22 - Input Text id=yvertPrice 8.11 - Input Text id=gibbonsNumbers 30, 31, 32 - Input Text id=gibbonsPrice 400.335 - Input Text id=solovyovNumbers 40, 41, 42 - Input Text id=solovyovPrice 140.2 - Input Text id=zagorskiNumbers 50, 51, 52 - Input Text id=zagorskiPrice 150.2 - Submit Form id=add-series-form - Element Text Should Be id=category_name Sport - Element Text Should Be id=country_name Italy - Element Text Should Be id=issue_date 08.09.1999 - Element Text Should Be id=quantity 3 - Element Text Should Be id=perforated No - Element Text Should Be id=michel_catalog_info \#1-3 (10.5 EUR) - Element Text Should Be id=scott_catalog_info \#10-12 (1000 USD) - Element Text Should Be id=yvert_catalog_info \#20-22 (8.11 EUR) + Select From List By Label id:category Sport + Selectize By Value country italy + Input Text id:quantity 3 + Unselect Checkbox id:perforated + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + # Workaround for an invalid form when it contains required file input: + # https://github.com/HtmlUnit/htmlunit/issues/76 + Remove Element Attribute image required + Click Element id:specify-issue-date-link + Select From List By Value id:day 8 + Select From List By Value id:month 9 + Select From List By Value id:year 1999 + Click Element id:add-catalog-numbers-link + Input Text id:michelNumbers 1, 2, 3 + Input Text id:michelPrice 10.5 + Input Text id:scottNumbers 10, 11, 12 + Input Text id:scottPrice 1000 + Input Text id:yvertNumbers 20, 21, 22 + Input Text id:yvertPrice 8.11 + Input Text id:gibbonsNumbers 30, 31, 32 + Input Text id:gibbonsPrice 400.335 + Input Text id:solovyovNumbers 40, 41, 42 + Input Text id:solovyovPrice 140.2 + Input Text id:zagorskiNumbers 50, 51, 52 + Input Text id:zagorskiPrice 150.2 + Submit Form id:add-series-form + Element Text Should Be id:category_name Sport + Element Text Should Be id:country_name Italy + Element Text Should Be id:issue_date 08.09.1999 + Element Text Should Be id:quantity 3 + Element Text Should Be id:perforated No + Element Text Should Be id:michel_catalog_info \#1-3 (10.5 EUR) + Element Text Should Be id:scott_catalog_info \#10-12 (1000 USD) + Element Text Should Be id:yvert_catalog_info \#20-22 (8.11 EUR) # FIXME: disable rounding mode - Element Text Should Be id=gibbons_catalog_info \#30-32 (400.34 GBP) - Element Text Should Be id=solovyov_catalog_info \#40-42 (140.2 RUB) - Element Text Should Be id=zagorski_catalog_info \#50-52 (150.2 RUB) - Page Should Contain Image id=series-image-1 + Element Text Should Be id:gibbons_catalog_info \#30-32 (400.34 GBP) + Element Text Should Be id:solovyov_catalog_info \#40-42 (140.2 RUB) + Element Text Should Be id:zagorski_catalog_info \#50-52 (150.2 RUB) + Page Should Contain Image id:series-image-1 *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/creation/misc-admin.robot b/src/test/robotframework/series/creation/misc-admin.robot index 78f4316fb6..e5e690e67d 100644 --- a/src/test/robotframework/series/creation/misc-admin.robot +++ b/src/test/robotframework/series/creation/misc-admin.robot @@ -2,16 +2,18 @@ Documentation Verify miscellaneous aspects of series creation Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags series misc *** Test Cases *** Comment should be stripped from leading and trailing spaces - Click Element id=add-comment-link - Input Text id=comment ${SPACE * 2}example comment${SPACE * 2} - Submit Form id=add-series-form - Textarea Value Should Be id=comment example comment + Disable Client Validation + Click Element id:add-comment-link + Input Text id:comment ${SPACE * 2}example comment${SPACE * 2} + Submit Form id:add-series-form + Textarea Value Should Be id:comment example comment *** Keywords *** Before Test Suite @@ -20,3 +22,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/series/add +Disable Client Validation + Remove Element Attribute quantity required diff --git a/src/test/robotframework/series/creation/misc-user.robot b/src/test/robotframework/series/creation/misc-user.robot index 4eb37279fb..242bf541ce 100644 --- a/src/test/robotframework/series/creation/misc-user.robot +++ b/src/test/robotframework/series/creation/misc-user.robot @@ -3,14 +3,15 @@ Documentation Verify miscellaneous aspects of series creation Library Collections Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags series misc *** Test Cases *** Issue year should have options for range from 1840 to the current year - Click Element id=specify-issue-date-link - ${availableYears}= Get List Items id=year + Click Element id:specify-issue-date-link + ${availableYears}= Get List Items id:year ${currentYear}= Get Time year NOW ${numberOfYears}= Get Length ${availableYears} # +2 here is to include the current year and option with title @@ -20,7 +21,6 @@ Issue year should have options for range from 1840 to the current year Should Be Equal As Integers ${numberOfYears} ${expectedNumberOfYears} Catalog numbers should accept valid values - [Tags] unstable [Template] Valid Catalog Numbers Should Be Accepted 7 7,8 @@ -28,61 +28,69 @@ Catalog numbers should accept valid values 1000 Catalog numbers should be stripped from any spaces - [Tags] unstable - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers ${SPACE * 2}1 , 2${SPACE * 2} - Input Text id=scottNumbers ${SPACE * 2}3 , 4${SPACE * 2} - Input Text id=yvertNumbers ${SPACE * 2}5 , 6${SPACE * 2} - Input Text id=gibbonsNumbers ${SPACE * 2}7 , 8${SPACE * 2} - Input Text id=solovyovNumbers ${SPACE * 2}9 , 10${SPACE * 2} - Input Text id=zagorskiNumbers ${SPACE * 2}11 , 12${SPACE * 2} - Submit Form id=add-series-form - Textfield Value Should Be id=michelNumbers 1,2 - Textfield Value Should Be id=scottNumbers 3,4 - Textfield Value Should Be id=yvertNumbers 5,6 - Textfield Value Should Be id=gibbonsNumbers 7,8 - Textfield Value Should Be id=solovyovNumbers 9,10 - Textfield Value Should Be id=zagorskiNumbers 11,12 + Go To ${SITE_URL}/series/add + Disable Client Validation + Click Element id:add-catalog-numbers-link + Wait Until Element Is Visible id:michelNumbers + Input Text id:michelNumbers ${SPACE * 2}1 , 2${SPACE * 2} + Input Text id:scottNumbers ${SPACE * 2}3 , 4${SPACE * 2} + Input Text id:yvertNumbers ${SPACE * 2}5 , 6${SPACE * 2} + Input Text id:gibbonsNumbers ${SPACE * 2}7 , 8${SPACE * 2} + Input Text id:solovyovNumbers ${SPACE * 2}9 , 10${SPACE * 2} + Input Text id:zagorskiNumbers ${SPACE * 2}11 , 12${SPACE * 2} + Submit Form id:add-series-form + Textfield Value Should Be id:michelNumbers 1,2 + Textfield Value Should Be id:scottNumbers 3,4 + Textfield Value Should Be id:yvertNumbers 5,6 + Textfield Value Should Be id:gibbonsNumbers 7,8 + Textfield Value Should Be id:solovyovNumbers 9,10 + Textfield Value Should Be id:zagorskiNumbers 11,12 Catalog numbers should ignore duplicate values - [Tags] unstable - Select From List By Label id=category Sport - Input Text id=quantity 2 - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers 104,105,104 - Input Text id=scottNumbers 114,115,114 - Input Text id=yvertNumbers 124,125,124 - Input Text id=gibbonsNumbers 134,135,134 - Input Text id=solovyovNumbers 144,145,144 - Input Text id=zagorskiNumbers 154,155,154 - Submit Form id=add-series-form - Element Text Should Be id=michel_catalog_info \#104, 105 - Element Text Should Be id=scott_catalog_info \#114, 115 - Element Text Should Be id=yvert_catalog_info \#124, 125 - Element Text Should Be id=gibbons_catalog_info \#134, 135 - Element Text Should Be id=solovyov_catalog_info \#144, 145 - Element Text Should Be id=zagorski_catalog_info \#154, 155 + Go To ${SITE_URL}/series/add + Select From List By Label id:category Sport + Input Text id:quantity 2 + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + # Workaround for an invalid form when it contains required file input: + # https://github.com/HtmlUnit/htmlunit/issues/76 + Remove Element Attribute image required + Click Element id:add-catalog-numbers-link + Input Text id:michelNumbers 104,105,104 + Input Text id:scottNumbers 114,115,114 + Input Text id:yvertNumbers 124,125,124 + Input Text id:gibbonsNumbers 134,135,134 + Input Text id:solovyovNumbers 144,145,144 + Input Text id:zagorskiNumbers 154,155,154 + Submit Form id:add-series-form + Element Text Should Be id:michel_catalog_info \#104, 105 + Element Text Should Be id:scott_catalog_info \#114, 115 + Element Text Should Be id:yvert_catalog_info \#124, 125 + Element Text Should Be id:gibbons_catalog_info \#134, 135 + Element Text Should Be id:solovyov_catalog_info \#144, 145 + Element Text Should Be id:zagorski_catalog_info \#154, 155 Catalog numbers should accept existing numbers Go To ${SITE_URL}/series/add - Select From List By Label id=category Sport - Input Text id=quantity 2 - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers 99 - Input Text id=scottNumbers 99 - Input Text id=yvertNumbers 99 - Input Text id=gibbonsNumbers 99 - Input Text id=solovyovNumbers 77 - Input Text id=zagorskiNumbers 83 - Submit Form id=add-series-form - Element Text Should Be id=michel_catalog_info \#99 - Element Text Should Be id=scott_catalog_info \#99 - Element Text Should Be id=yvert_catalog_info \#99 - Element Text Should Be id=gibbons_catalog_info \#99 - Element Text Should Be id=solovyov_catalog_info \#77 - Element Text Should Be id=zagorski_catalog_info \#83 + Select From List By Label id:category Sport + Input Text id:quantity 2 + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + # Workaround for an invalid form when it contains required file input: + # https://github.com/HtmlUnit/htmlunit/issues/76 + Remove Element Attribute image required + Click Element id:add-catalog-numbers-link + Input Text id:michelNumbers 99 + Input Text id:scottNumbers 99 + Input Text id:yvertNumbers 99 + Input Text id:gibbonsNumbers 99 + Input Text id:solovyovNumbers 77 + Input Text id:zagorskiNumbers 83 + Submit Form id:add-series-form + Element Text Should Be id:michel_catalog_info \#99 + Element Text Should Be id:scott_catalog_info \#99 + Element Text Should Be id:yvert_catalog_info \#99 + Element Text Should Be id:gibbons_catalog_info \#99 + Element Text Should Be id:solovyov_catalog_info \#77 + Element Text Should Be id:zagorski_catalog_info \#83 *** Keywords *** Before Test Suite @@ -91,19 +99,26 @@ Before Test Suite Log In As login=coder password=test Go To ${SITE_URL}/series/add +Disable Client Validation + Remove Element Attribute quantity required + Remove Element Attribute image required + Valid Catalog Numbers Should Be Accepted [Arguments] ${catalogNumbers} - Click Element id=add-catalog-numbers-link - Input Text id=michelNumbers ${catalogNumbers} - Input Text id=scottNumbers ${catalogNumbers} - Input Text id=yvertNumbers ${catalogNumbers} - Input Text id=gibbonsNumbers ${catalogNumbers} - Input Text id=solovyovNumbers ${catalogNumbers} - Input Text id=zagorskiNumbers ${catalogNumbers} - Submit Form id=add-series-form - Page Should Not Contain Element id=michelNumbers.errors - Page Should Not Contain Element id=scottNumbers.errors - Page Should Not Contain Element id=yvertNumbers.errors - Page Should Not Contain Element id=gibbonsNumbers.errors - Page Should Not Contain Element id=solovyovNumbers.errors - Page Should Not Contain Element id=zagorskiNumbers.errors + Go To ${SITE_URL}/series/add + Disable Client Validation + Click Element id:add-catalog-numbers-link + Wait Until Element Is Visible id:michelNumbers + Input Text id:michelNumbers ${catalogNumbers} + Input Text id:scottNumbers ${catalogNumbers} + Input Text id:yvertNumbers ${catalogNumbers} + Input Text id:gibbonsNumbers ${catalogNumbers} + Input Text id:solovyovNumbers ${catalogNumbers} + Input Text id:zagorskiNumbers ${catalogNumbers} + Submit Form id:add-series-form + Page Should Not Contain Element id:michelNumbers.errors + Page Should Not Contain Element id:scottNumbers.errors + Page Should Not Contain Element id:yvertNumbers.errors + Page Should Not Contain Element id:gibbonsNumbers.errors + Page Should Not Contain Element id:solovyovNumbers.errors + Page Should Not Contain Element id:zagorskiNumbers.errors diff --git a/src/test/robotframework/series/creation/validation-admin.robot b/src/test/robotframework/series/creation/validation-admin.robot index c6a7779c2c..6957ae9828 100644 --- a/src/test/robotframework/series/creation/validation-admin.robot +++ b/src/test/robotframework/series/creation/validation-admin.robot @@ -2,62 +2,64 @@ Documentation Verify series creation validation scenarios from admin Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser +Test Setup Disable Client Validation Force Tags series validation *** Test Cases *** Create series with empty required fields - Submit Form id=add-series-form - Element Text Should Be id=category.errors Value must not be empty - Element Text Should Be id=quantity.errors Value must not be empty - Element Text Should Be id=image.errors Image or image URL must be specified - Element Text Should Be id=image-url.errors Image or image URL must be specified + Submit Form id:add-series-form + Element Text Should Be id:category.errors Value must not be empty + Element Text Should Be id:quantity.errors Value must not be empty + Element Text Should Be id:image.errors Image or image URL must be specified + Element Text Should Be id:image-url.errors Image or image URL must be specified Create series with both image and an image URL - Choose File id=image ${MAIN_RESOURCE_DIR}${/}test.png - Input Text id=image-url ${SITE_URL}/image/1 - Submit Form id=add-series-form - Element Text Should Be id=image.errors Image or image URL must be specified - Element Text Should Be id=image-url.errors Image or image URL must be specified + Choose File id:image ${MAIN_RESOURCE_DIR}${/}test.png + Input Text id:image-url ${SITE_URL}/image/1 + Submit Form id:add-series-form + Element Text Should Be id:image.errors Image or image URL must be specified + Element Text Should Be id:image-url.errors Image or image URL must be specified Create series with invalid image URL - Input Text id=image-url invalid-url - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors Value must be a valid URL + Input Text id:image-url invalid-url + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors Value must be a valid URL Create series with image URL with invalid response - Input Text id=image-url ${MOCK_SERVER}/series/response-400 - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors Could not download file + Input Text id:image-url ${MOCK_SERVER}/series/response-400 + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors Could not download file Create series with image URL to a file that does not exist - Input Text id=image-url ${MOCK_SERVER}/series/response-404 - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors File not found + Input Text id:image-url ${MOCK_SERVER}/series/response-404 + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors File not found Create series with image URL that causes a redirect - Input Text id=image-url ${MOCK_SERVER}/series/response-301 - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors URL must not redirect to another address + Input Text id:image-url ${MOCK_SERVER}/series/response-301 + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors URL must not redirect to another address Create series with image URL to an empty file - Input Text id=image-url ${MOCK_SERVER}/series/empty-jpeg-file - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors File must not be empty + Input Text id:image-url ${MOCK_SERVER}/series/empty-jpeg-file + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors File must not be empty Create series with image URL to a file of unsupported type (not an image) - Input Text id=image-url ${MOCK_SERVER}/series/not-image-file - Submit Form id=add-series-form - Element Text Should Be id=image-url.errors Invalid file type + Input Text id:image-url ${MOCK_SERVER}/series/not-image-file + Submit Form id:add-series-form + Element Text Should Be id:image-url.errors Invalid file type Create series with too long comment ${letter}= Set Variable x - Click Element id=add-comment-link - Wait Until Element Is Visible id=comment - Input Text id=comment ${letter * 256} - Submit Form id=add-series-form - Element Text Should Be id=comment.errors Value is greater than allowable maximum of 255 characters + Click Element id:add-comment-link + Wait Until Element Is Visible id:comment + Input Text id:comment ${letter * 256} + Submit Form id:add-series-form + Element Text Should Be id:comment.errors Value is greater than allowable maximum of 255 characters *** Keywords *** Before Test Suite @@ -66,3 +68,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/series/add +Disable Client Validation + Remove Element Attribute quantity required diff --git a/src/test/robotframework/series/creation/validation-user.robot b/src/test/robotframework/series/creation/validation-user.robot index f247b1d963..878dc0f134 100644 --- a/src/test/robotframework/series/creation/validation-user.robot +++ b/src/test/robotframework/series/creation/validation-user.robot @@ -2,40 +2,41 @@ Documentation Verify series creation validation scenarios from a user Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser +Test Setup Disable Client Validation Force Tags series validation *** Test Cases *** Create series with empty required fields - Submit Form id=add-series-form - Element Text Should Be id=category.errors Value must not be empty - Element Text Should Be id=quantity.errors Value must not be empty - Element Text Should Be id=image.errors Value must not be empty - Page Should Not Contain Element id=image-url.errors + Submit Form id:add-series-form + Element Text Should Be id:category.errors Value must not be empty + Element Text Should Be id:quantity.errors Value must not be empty + Element Text Should Be id:image.errors Value must not be empty + Page Should Not Contain Element id:image-url.errors Create series with non-numeric quantity - Input Text id=quantity NaN - Submit Form id=add-series-form - Element Text Should Be id=quantity.errors Invalid value + Input Text id:quantity NaN + Submit Form id:add-series-form + Element Text Should Be id:quantity.errors Invalid value Create series with too small quantity - Input Text id=quantity 0 - Submit Form id=add-series-form - Element Text Should Be id=quantity.errors Value must be greater than or equal to 1 + Input Text id:quantity 0 + Submit Form id:add-series-form + Element Text Should Be id:quantity.errors Value must be greater than or equal to 1 Create series with too large quantity - Input Text id=quantity 51 - Submit Form id=add-series-form - Element Text Should Be id=quantity.errors Value must be less than or equal to 50 + Input Text id:quantity 51 + Submit Form id:add-series-form + Element Text Should Be id:quantity.errors Value must be less than or equal to 50 Create series with an empty image - Choose File id=image ${TEST_RESOURCE_DIR}${/}empty.jpg - Submit Form id=add-series-form - Element Text Should Be id=image.errors File must not be empty + Choose File id:image ${TEST_RESOURCE_DIR}${/}empty.jpg + Submit Form id:add-series-form + Element Text Should Be id:image.errors File must not be empty Catalog numbers should reject invalid values - [Tags] unstable [Template] Invalid Catalog Numbers Should Be Rejected t t,t @@ -48,7 +49,6 @@ Catalog numbers should reject invalid values 10000 Catalog price should reject invalid values - [Tags] unstable [Template] Invalid Catalog Price Should Be Rejected 0 -1 @@ -61,6 +61,10 @@ Before Test Suite Log In As login=coder password=test Go To ${SITE_URL}/series/add +Disable Client Validation + Remove Element Attribute quantity required + Remove Element Attribute image required + Invalid Catalog Numbers Should Be Rejected [Arguments] ${catalogNumbers} # open page each time to be sure that we're starting from the clean state. @@ -69,26 +73,27 @@ Invalid Catalog Numbers Should Be Rejected # invisible (because link is toggling the visibility and when there are # errors, fields are visible from the begining). Go To ${SITE_URL}/series/add - Click Element id=add-catalog-numbers-link + Disable Client Validation + Click Element id:add-catalog-numbers-link # we should wait until all 4 fields with class js-catalogs-info will be # visible but for simplicity we just check that the last field is visible - Wait Until Element Is Visible id=gibbonsNumbers - Input Text id=michelNumbers ${catalogNumbers} - Input Text id=scottNumbers ${catalogNumbers} - Input Text id=yvertNumbers ${catalogNumbers} - Input Text id=gibbonsNumbers ${catalogNumbers} - Input Text id=solovyovNumbers ${catalogNumbers} - Input Text id=zagorskiNumbers ${catalogNumbers} - Submit Form id=add-series-form + Wait Until Element Is Visible id:gibbonsNumbers + Input Text id:michelNumbers ${catalogNumbers} + Input Text id:scottNumbers ${catalogNumbers} + Input Text id:yvertNumbers ${catalogNumbers} + Input Text id:gibbonsNumbers ${catalogNumbers} + Input Text id:solovyovNumbers ${catalogNumbers} + Input Text id:zagorskiNumbers ${catalogNumbers} + Submit Form id:add-series-form ${alnumMessage} Catenate SEPARATOR=${SPACE} ... Value must be a list of numbers separated by comma. ... Any number may end with a latin letter in lower case - Element Text Should Be id=michelNumbers.errors Value must be a list of numbers separated by comma - Element Text Should Be id=scottNumbers.errors ${alnumMessage} - Element Text Should Be id=yvertNumbers.errors Value must be a list of numbers separated by comma - Element Text Should Be id=gibbonsNumbers.errors Value must be a list of numbers separated by comma - Element Text Should Be id=solovyovNumbers.errors Value must be a list of numbers separated by comma - Element Text Should Be id=zagorskiNumbers.errors Value must be a list of numbers separated by comma + Element Text Should Be id:michelNumbers.errors Value must be a list of numbers separated by comma + Element Text Should Be id:scottNumbers.errors ${alnumMessage} + Element Text Should Be id:yvertNumbers.errors Value must be a list of numbers separated by comma + Element Text Should Be id:gibbonsNumbers.errors Value must be a list of numbers separated by comma + Element Text Should Be id:solovyovNumbers.errors Value must be a list of numbers separated by comma + Element Text Should Be id:zagorskiNumbers.errors Value must be a list of numbers separated by comma Invalid Catalog Price Should Be Rejected [Arguments] ${catalogPrice} @@ -98,20 +103,21 @@ Invalid Catalog Price Should Be Rejected # invisible (because link is toggling the visibility and when there are # errors, fields are visible from the begining). Go To ${SITE_URL}/series/add - Click Element id=add-catalog-numbers-link + Disable Client Validation + Click Element id:add-catalog-numbers-link # we should wait until all 4 fields with class js-catalogs-info will be # visible but for simplicity we just check that the last field is visible - Wait Until Element Is Visible id=gibbonsPrice - Input Text id=michelPrice ${catalogPrice} - Input Text id=scottPrice ${catalogPrice} - Input Text id=yvertPrice ${catalogPrice} - Input Text id=gibbonsPrice ${catalogPrice} - Input Text id=solovyovPrice ${catalogPrice} - Input Text id=zagorskiPrice ${catalogPrice} - Submit Form id=add-series-form - Element Text Should Be id=michelPrice.errors Invalid value - Element Text Should Be id=scottPrice.errors Invalid value - Element Text Should Be id=yvertPrice.errors Invalid value - Element Text Should Be id=gibbonsPrice.errors Invalid value - Element Text Should Be id=solovyovPrice.errors Invalid value - Element Text Should Be id=zagorskiPrice.errors Invalid value + Wait Until Element Is Visible id:gibbonsPrice + Input Text id:michelPrice ${catalogPrice} + Input Text id:scottPrice ${catalogPrice} + Input Text id:yvertPrice ${catalogPrice} + Input Text id:gibbonsPrice ${catalogPrice} + Input Text id:solovyovPrice ${catalogPrice} + Input Text id:zagorskiPrice ${catalogPrice} + Submit Form id:add-series-form + Element Text Should Be id:michelPrice.errors Invalid value + Element Text Should Be id:scottPrice.errors Invalid value + Element Text Should Be id:yvertPrice.errors Invalid value + Element Text Should Be id:gibbonsPrice.errors Invalid value + Element Text Should Be id:solovyovPrice.errors Invalid value + Element Text Should Be id:zagorskiPrice.errors Invalid value diff --git a/src/test/robotframework/series/import/access.robot b/src/test/robotframework/series/import/access.robot index 843059c4ca..92760d21fc 100644 --- a/src/test/robotframework/series/import/access.robot +++ b/src/test/robotframework/series/import/access.robot @@ -8,18 +8,18 @@ Force Tags series import-series access *** Test Cases *** Anonymous user cannot request series import Go To ${SITE_URL}/series/import/request - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden Anonymous user cannot access the status of the series import Go To ${SITE_URL}/series/import/request/1 - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden Anonymous user cannot see a list of import requests Go To ${SITE_URL}/series/import/requests - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/import/request-logic.robot b/src/test/robotframework/series/import/request-logic.robot index dd1844ad6e..c26a13aa61 100644 --- a/src/test/robotframework/series/import/request-logic.robot +++ b/src/test/robotframework/series/import/request-logic.robot @@ -13,123 +13,123 @@ Force Tags series import-series logic Import series from an external site (in English, use category, country and date locators) [Documentation] Verify import from a page in English and with different locators ${importUrl}= Set Variable http://127.0.0.1:8080/series/2?lang=en - Input Text id=url ${importUrl} - Submit Form id=import-series-form + Input Text id:url ${importUrl} + Submit Form id:import-series-form ${requestLocation}= Get Location - ${category}= Get Selected List Label id=category - ${country}= Get Selected List Label id=country - ${quantity}= Get Value id=quantity - ${year}= Get Selected List Label id=year - Element Text Should Be id=request-url ${importUrl} - Element Text Should Be id=request-status ParsingSucceeded + ${category}= Get Selected List Label id:category + ${country}= Get Selected List Label id:country + ${quantity}= Get Value id:quantity + ${year}= Get Selected List Label id:year + Element Text Should Be id:request-url ${importUrl} + Element Text Should Be id:request-status ParsingSucceeded Should Be Equal ${category} Prehistoric animals Should Be Equal ${country} Italy Should Be Empty ${quantity} - Checkbox Should Be Selected id=perforated - Urlfield Value Should Be id=image-url http://127.0.0.1:8080/image/1 + Checkbox Should Be Selected id:perforated + Urlfield Value Should Be id:image-url http://127.0.0.1:8080/image/1 Should Be Equal ${year} 2000 - Input Text id=quantity 1 - Submit Form id=create-series-form + Input Text id:quantity 1 + Submit Form id:create-series-form ${seriesLocation}= Get Location - Element Text Should Be id=category_name Prehistoric animals - Element Text Should Be id=country_name Italy - Element Text Should Be id=issue_date 2000 - Element Text Should Be id=quantity 1 - Element Text Should Be id=perforated Yes + Element Text Should Be id:category_name Prehistoric animals + Element Text Should Be id:country_name Italy + Element Text Should Be id:issue_date 2000 + Element Text Should Be id:quantity 1 + Element Text Should Be id:perforated Yes # @todo #749 /series/{id}: add integration test that import info is only visible to admin - Element Text Should Be id=import-info ${importUrl} - Page Should Contain Image id=series-image-1 + Element Text Should Be id:import-info ${importUrl} + Page Should Contain Image id:series-image-1 Go To ${requestLocation} - Element Text Should Be id=request-status ImportSucceeded - Element Should Be Disabled id=category - Element Should Be Disabled id=country - Page Should Not Contain Element id=quantity - Page Should Not Contain Element id=perforated - Element Should Be Disabled id=image-url - Element Should Be Disabled id=year - Page Should Not Contain Element id=create-series-btn - Page Should Contain Link link=${seriesLocation} + Element Text Should Be id:request-status ImportSucceeded + Element Should Be Disabled id:category + Element Should Be Disabled id:country + Page Should Not Contain Element id:quantity + Page Should Not Contain Element id:perforated + Element Should Be Disabled id:image-url + Element Should Be Disabled id:year + Page Should Not Contain Element id:create-series-btn + Page Should Contain Link link:${seriesLocation} Import series from an external site (in Russian, use description locator) [Documentation] Verify import from a page in Russian and shared locator - Input Text id=url http://localhost:8080/series/2?lang=ru&str=тест - Submit Form id=import-series-form - ${category}= Get Selected List Label id=category - ${country}= Get Selected List Label id=country - ${quantity}= Get Value id=quantity - ${year}= Get Selected List Label id=year - Element Text Should Be id=request-url http://localhost:8080/series/2?lang=ru&str=тест - Element Text Should Be id=request-status ParsingSucceeded + Input Text id:url http://localhost:8080/series/2?lang=ru&str=тест + Submit Form id:import-series-form + ${category}= Get Selected List Label id:category + ${country}= Get Selected List Label id:country + ${quantity}= Get Value id:quantity + ${year}= Get Selected List Label id:year + Element Text Should Be id:request-url http://localhost:8080/series/2?lang=ru&str=тест + Element Text Should Be id:request-status ParsingSucceeded Should Be Equal ${category} Prehistoric animals Should Be Equal ${country} Italy Should Be Empty ${quantity} - Checkbox Should Be Selected id=perforated - Urlfield Value Should Be id=image-url http://localhost:8080/image/1 + Checkbox Should Be Selected id:perforated + Urlfield Value Should Be id:image-url http://localhost:8080/image/1 Should Be Equal ${year} 2000 Import series from external site with catalog numbers (use description locator) [Documentation] Verify import of catalog numbers by extracting them from a description - Input Text id=url ${MOCK_SERVER}/series/import/request-logic/catalog-numbers-in-description.html - Submit Form id=import-series-form - Textfield Value Should Be id=michel-numbers 2242-2246 - Submit Form id=create-series-form - Element Text Should Be id=michel_catalog_info \#2242-2246 - Click Link id=import-request-link - Element Should Be Disabled id=michel-numbers + Input Text id:url ${MOCK_SERVER}/series/import/request-logic/catalog-numbers-in-description.html + Submit Form id:import-series-form + Textfield Value Should Be id:michel-numbers 2242-2246 + Submit Form id:create-series-form + Element Text Should Be id:michel_catalog_info \#2242-2246 + Click Link id:import-request-link + Element Should Be Disabled id:michel-numbers Import series and series sale with existing seller from an external site [Documentation] Verify import series and sale (with existing seller) - Input Text id=url ${MOCK_SERVER}/series/import/request-logic/existing-seller.html - Submit Form id=import-series-form + Input Text id:url ${MOCK_SERVER}/series/import/request-logic/existing-seller.html + Submit Form id:import-series-form ${requestLocation}= Get Location # sale info should be parsed and shown at the request page - List Selection Should Be id=seller Eicca Toppinen - Textfield Value Should Be id=price 111 - List Selection Should Be id=currency RUB - Submit Form id=create-series-form + List Selection Should Be id:seller Eicca Toppinen + Textfield Value Should Be id:price 111 + List Selection Should Be id:currency RUB + Submit Form id:create-series-form # after importing a series, sale info should be shown at the info page ${currentDate}= Get Current Date result_format=%d.%m.%Y - Element Text Should Be id=series-sale-1-info ${currentDate} Eicca Toppinen was selling for 111.00 RUB - Link Should Point To id=series-sale-1-seller http://example.com/eicca-toppinen - Link Should Point To id=series-sale-1-transaction ${MOCK_SERVER}/series/import/request-logic/existing-seller.html + Element Text Should Be id:series-sale-1-info ${currentDate} Eicca Toppinen was selling for 111.00 RUB + Link Should Point To id:series-sale-1-seller http://example.com/eicca-toppinen + Link Should Point To id:series-sale-1-transaction ${MOCK_SERVER}/series/import/request-logic/existing-seller.html Go To ${requestLocation} # after importing a series, sale info at the request page should be shown as read-only - Element Should Be Disabled id=seller - Element Should Be Disabled id=price - Element Should Be Disabled id=currency + Element Should Be Disabled id:seller + Element Should Be Disabled id:price + Element Should Be Disabled id:currency Import series and series sale with a new seller from an external site [Documentation] Verify import series and sale (with a new seller) - Input Text id=url ${MOCK_SERVER}/series/import/request-logic/new-seller.html - Submit Form id=import-series-form + Input Text id:url ${MOCK_SERVER}/series/import/request-logic/new-seller.html + Submit Form id:import-series-form ${requestLocation}= Get Location # seller info should be parsed and shown at the request page - ${group}= Get Selected List Label id=seller-group + ${group}= Get Selected List Label id:seller-group Should Be Equal ${group} example.com - Textfield Value Should Be id=seller-name Lando Livianus - Urlfield Value Should Be id=seller-url http://example.com/lando-livianus - Submit Form id=create-series-form + Textfield Value Should Be id:seller-name Lando Livianus + Urlfield Value Should Be id:seller-url http://example.com/lando-livianus + Submit Form id:create-series-form # after importing a series, sale info should contain a new seller ${currentDate}= Get Current Date result_format=%d.%m.%Y - Element Text Should Be id=series-sale-1-info ${currentDate} Lando Livianus was selling for 320.50 RUB - Link Should Point To id=series-sale-1-seller http://example.com/lando-livianus + Element Text Should Be id:series-sale-1-info ${currentDate} Lando Livianus was selling for 320.50 RUB + Link Should Point To id:series-sale-1-seller http://example.com/lando-livianus # @todo #857 Check that a just created seller belongs to the "example.com" group Go To ${requestLocation} # after importing a series, sale info at the request page should be shown as read-only - Element Should Be Disabled id=seller-group - Element Should Be Disabled id=seller-name - Element Should Be Disabled id=seller-url + Element Should Be Disabled id:seller-group + Element Should Be Disabled id:seller-name + Element Should Be Disabled id:seller-url Submit a request that will fail to download a file - Input Text id=url ${MOCK_SERVER}/series/response-404 - Submit Form id=import-series-form - Element Text Should Be id=request-status DownloadingFailed + Input Text id:url ${MOCK_SERVER}/series/response-404 + Submit Form id:import-series-form + Element Text Should Be id:request-status DownloadingFailed Submit a request with a document that couldn't be parsed [Documentation] Verify submitting a URL with an empty HTML document - Input Text id=url ${MOCK_SERVER}/series/import/request-logic/simple.html - Submit Form id=import-series-form - Element Text Should Be id=request-status ParsingFailed + Input Text id:url ${MOCK_SERVER}/series/import/request-logic/simple.html + Submit Form id:import-series-form + Element Text Should Be id:request-status ParsingFailed *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/import/validation.robot b/src/test/robotframework/series/import/validation.robot index c082c40b25..1cf139601a 100644 --- a/src/test/robotframework/series/import/validation.robot +++ b/src/test/robotframework/series/import/validation.robot @@ -2,25 +2,27 @@ Documentation Verify import series validation scenarios Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags series import-series validation *** Test Cases *** Submit request with blank required field - Submit Form id=import-series-form - Element Text Should Be id=url.errors Value must not be empty + [Setup] Disable Client Validation + Submit Form id:import-series-form + Element Text Should Be id:url.errors Value must not be empty Submit request with too long url ${letter}= Set Variable j - Input Text id=url http://${letter * 767} - Submit Form id=import-series-form - Element Text Should Be id=url.errors Value is greater than allowable maximum of 767 characters + Input Text id:url http://${letter * 767} + Submit Form id:import-series-form + Element Text Should Be id:url.errors Value is greater than allowable maximum of 767 characters Submit request with invalid url - Input Text id=url invalid-url - Submit Form id=import-series-form - Element Text Should Be id=url.errors Value must be a valid URL + Input Text id:url invalid-url + Submit Form id:import-series-form + Element Text Should Be id:url.errors Value must be a valid URL *** Keywords *** Before Test Suite @@ -29,3 +31,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/series/import/request +Disable Client Validation + Remove Element Attribute url required diff --git a/src/test/robotframework/series/sales/import/logic.robot b/src/test/robotframework/series/sales/import/logic.robot index 30b3b840fe..8d9c9ecbd5 100644 --- a/src/test/robotframework/series/sales/import/logic.robot +++ b/src/test/robotframework/series/sales/import/logic.robot @@ -9,20 +9,20 @@ Force Tags series sales import-sales logic react-related *** Test Cases *** Import a series sale with an existing seller - Input Text id=series-sale-url ${MOCK_SERVER}/series/sales/import/logic/existing-seller.html - Submit Form id=import-series-sale-form + Input Text id:series-sale-url ${MOCK_SERVER}/series/sales/import/logic/existing-seller.html + Submit Form id:import-series-sale-form # the original field is emptied after successful request, so we wait for it Wait Until Element Value Is series-sale-url ${EMPTY} - Urlfield Value Should Be id=url ${MOCK_SERVER}/series/sales/import/logic/existing-seller.html - List Selection Should Be id=seller Eicca Toppinen - Textfield Value Should Be id=price 350 - List Selection Should Be id=currency RUB + Urlfield Value Should Be id:url ${MOCK_SERVER}/series/sales/import/logic/existing-seller.html + List Selection Should Be id:seller Eicca Toppinen + Textfield Value Should Be id:price 350 + List Selection Should Be id:currency RUB Import a series sale without information - Input Text id=series-sale-url ${MOCK_SERVER}/series/sales/import/logic/empty.html - Submit Form id=import-series-sale-form - Wait Until Element Is Visible id=import-series-sale-failed-msg - Element Text Should Be id=import-series-sale-failed-msg Could not import information from this page + Input Text id:series-sale-url ${MOCK_SERVER}/series/sales/import/logic/empty.html + Submit Form id:import-series-sale-form + Wait Until Element Is Visible id:import-series-sale-failed-msg + Element Text Should Be id:import-series-sale-failed-msg Could not import information from this page *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/series/sales/import/validation.robot b/src/test/robotframework/series/sales/import/validation.robot index a6be2d2666..50abdb6acc 100644 --- a/src/test/robotframework/series/sales/import/validation.robot +++ b/src/test/robotframework/series/sales/import/validation.robot @@ -2,28 +2,30 @@ Documentation Verify validation scenarios for importing a series sale Library SeleniumLibrary Resource ../../../auth.steps.robot +Resource ../../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags series sales import-sales validation react-related *** Test Cases *** Import a series sale with empty required field - Submit Form id=import-series-sale-form - Wait Until Element Is Visible id=series-sale-url.errors - Element Text Should Be id=series-sale-url.errors Value must not be empty + Disable Client Validation + Submit Form id:import-series-sale-form + Wait Until Element Is Visible id:series-sale-url.errors + Element Text Should Be id:series-sale-url.errors Value must not be empty Import a series sale with invalid url - Input Text id=series-sale-url invalid-url - Submit Form id=import-series-sale-form - Wait Until Element Is Visible id=series-sale-url.errors - Element Text Should Be id=series-sale-url.errors Value must be a valid URL + Input Text id:series-sale-url invalid-url + Submit Form id:import-series-sale-form + Wait Until Element Is Visible id:series-sale-url.errors + Element Text Should Be id:series-sale-url.errors Value must be a valid URL Import a series sale with too long url ${letter}= Set Variable j - Input Text id=series-sale-url http://${letter * 767} - Submit Form id=import-series-sale-form - Wait Until Element Is Visible id=series-sale-url.errors - Element Text Should Be id=series-sale-url.errors Value is greater than allowable maximum of 767 characters + Input Text id:series-sale-url http://${letter * 767} + Submit Form id:import-series-sale-form + Wait Until Element Is Visible id:series-sale-url.errors + Element Text Should Be id:series-sale-url.errors Value is greater than allowable maximum of 767 characters *** Keywords *** Before Test Suite @@ -31,3 +33,6 @@ Before Test Suite Register Keyword To Run On Failure Log Source Log In As login=admin password=test Go To ${SITE_URL}/series/1 + +Disable Client Validation + Remove Element Attribute series-sale-url required diff --git a/src/test/robotframework/series/sales/misc.robot b/src/test/robotframework/series/sales/misc.robot index b96c2e03e4..62da502ec1 100644 --- a/src/test/robotframework/series/sales/misc.robot +++ b/src/test/robotframework/series/sales/misc.robot @@ -9,9 +9,10 @@ Force Tags series sales misc *** Test Cases *** Url should be stripped from leading and trailing spaces - Input Text id=url ${SPACE * 2}bad-value${SPACE * 2} - Submit Form id=add-series-sales-form - Urlfield Value Should Be id=url bad-value + [Setup] Disable Client Validation + Input Text id:url ${SPACE * 2}bad-value${SPACE * 2} + Submit Form id:add-series-sales-form + Urlfield Value Should Be id:url bad-value *** Keywords *** Before Test Suite @@ -20,3 +21,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/series/1 +Disable Client Validation + Remove Element Attribute price required diff --git a/src/test/robotframework/series/sales/validation.robot b/src/test/robotframework/series/sales/validation.robot index 3bcd851bef..588d609786 100644 --- a/src/test/robotframework/series/sales/validation.robot +++ b/src/test/robotframework/series/sales/validation.robot @@ -2,35 +2,37 @@ Documentation Verify validation scenarios for adding series sales Library SeleniumLibrary Resource ../../auth.steps.robot +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser +Test Setup Disable Client Validation Force Tags series sales validation *** Test Cases *** Create series sale with too long url ${letter}= Set Variable j - Input Text id=url http://${letter * 767} - Submit Form id=add-series-sales-form - Element Text Should Be id=url.errors Value is greater than allowable maximum of 767 characters + Input Text id:url http://${letter * 767} + Submit Form id:add-series-sales-form + Element Text Should Be id:url.errors Value is greater than allowable maximum of 767 characters Create series sale with invalid url - Input Text id=url invalid-url - Submit Form id=add-series-sales-form - Element Text Should Be id=url.errors Value must be a valid URL + Input Text id:url invalid-url + Submit Form id:add-series-sales-form + Element Text Should Be id:url.errors Value must be a valid URL Create series sale with the prices in the same currency - Input Text id=price 100 - Select From List By Label id=currency USD - Input Text id=alt-price 200 - Select From List By Label id=alt-currency USD - Submit Form id=add-series-sales-form - Element Text Should Be id=alt-currency.errors Price and alternative price must be in a different currencies + Input Text id:price 100 + Select From List By Label id:currency USD + Input Text id:alt-price 200 + Select From List By Label id:alt-currency USD + Submit Form id:add-series-sales-form + Element Text Should Be id:alt-currency.errors Price and alternative price must be in a different currencies Create series sale with the same seller and buyer - Select From List By Label id=seller Tommy Lee Jones - Select From List By Label id=buyer Tommy Lee Jones - Submit Form id=add-series-sales-form - Element Text Should Be id=buyer.errors Seller and buyer must be different + Select From List By Label id:seller Tommy Lee Jones + Select From List By Label id:buyer Tommy Lee Jones + Submit Form id:add-series-sales-form + Element Text Should Be id:buyer.errors Seller and buyer must be different *** Keywords *** Before Test Suite @@ -39,3 +41,5 @@ Before Test Suite Log In As login=admin password=test Go To ${SITE_URL}/series/1 +Disable Client Validation + Remove Element Attribute price required diff --git a/src/test/robotframework/series/search/logic-anonymous.robot b/src/test/robotframework/series/search/logic-anonymous.robot index 3970b76157..e7b24bca58 100644 --- a/src/test/robotframework/series/search/logic-anonymous.robot +++ b/src/test/robotframework/series/search/logic-anonymous.robot @@ -8,10 +8,10 @@ Force Tags series search logic *** Test Cases *** Search series by non-existing catalog number - Input Text id=catalogNumber 888 - Select Random Option From List id=catalogName - Submit Form id=search-series-form - Element Text Should Be id=no-series-found No series found + Input Text id:catalogNumber 888 + Select Random Option From List id:catalogName + Submit Form id:search-series-form + Element Text Should Be id:no-series-found No series found Search series by existing catalog number [Template] Search Series By Catalog Name And Number @@ -30,7 +30,7 @@ Before Test Suite Search Series By Catalog Name And Number [Arguments] ${name} ${number} Go To ${SITE_URL} - Input Text id=catalogNumber ${number} - Select From List By Value id=catalogName ${name} - Submit Form id=search-series-form - Page Should Contain Element css=#search-results [href="/series/1"] + Input Text id:catalogNumber ${number} + Select From List By Value id:catalogName ${name} + Submit Form id:search-series-form + Page Should Contain Element css:#search-results [href="/series/1"] diff --git a/src/test/robotframework/series/search/logic-user.robot b/src/test/robotframework/series/search/logic-user.robot index 3bf963cb3f..b1e3b3a81d 100644 --- a/src/test/robotframework/series/search/logic-user.robot +++ b/src/test/robotframework/series/search/logic-user.robot @@ -9,11 +9,11 @@ Force Tags series search logic *** Test Cases *** Search series by non-existing catalog number in a collection - Input Text id=catalogNumber 888 - Select Random Option From List id=catalogName - Select Checkbox id=in-collection - Submit Form id=search-series-form - Element Text Should Be id=no-series-found No series found + Input Text id:catalogNumber 888 + Select Random Option From List id:catalogName + Select Checkbox id:in-collection + Submit Form id:search-series-form + Element Text Should Be id:no-series-found No series found Search series by existing catalog number in a collection [Template] Search Series By Catalog Name And Number In Collection @@ -34,8 +34,8 @@ Before Test Suite Search Series By Catalog Name And Number In Collection [Arguments] ${name} ${number} Go To ${SITE_URL} - Input Text id=catalogNumber ${number} - Select From List By Value id=catalogName ${name} - Select Checkbox id=in-collection - Submit Form id=search-series-form - Page Should Contain Element css=#search-results [href="/series/1"] + Input Text id:catalogNumber ${number} + Select From List By Value id:catalogName ${name} + Select Checkbox id:in-collection + Submit Form id:search-series-form + Page Should Contain Element css:#search-results [href="/series/1"] diff --git a/src/test/robotframework/series/search/validation.robot b/src/test/robotframework/series/search/validation.robot index 6d7d3d43c0..a8ebd1a87c 100644 --- a/src/test/robotframework/series/search/validation.robot +++ b/src/test/robotframework/series/search/validation.robot @@ -1,16 +1,21 @@ *** Settings *** Documentation Verify series search validation scenarios Library SeleniumLibrary +Resource ../../selenium.utils.robot Suite Setup Before Test Suite Suite Teardown Close Browser Force Tags series search validation *** Test Cases *** Search the series with empty required field - Submit Form id=search-series-form - Element Text Should Be id=catalogNumber.errors Value must not be empty + [Setup] Disable Client Validation + Submit Form id:search-series-form + Element Text Should Be id:catalogNumber.errors Value must not be empty *** Keywords *** Before Test Suite Open Browser ${SITE_URL}/ ${BROWSER} Register Keyword To Run On Failure Log Source + +Disable Client Validation + Remove Element Attribute catalogNumber required diff --git a/src/test/robotframework/series/similar/logic.robot b/src/test/robotframework/series/similar/logic.robot index 57fa4661cc..9fd0a228ab 100644 --- a/src/test/robotframework/series/similar/logic.robot +++ b/src/test/robotframework/series/similar/logic.robot @@ -8,9 +8,9 @@ Force Tags series similar-series logic *** Test Cases *** Similar series should be linked to each other Go To ${SITE_URL}/series/4 - Page Should Contain Element css=#similar-series [href="/series/5"] + Page Should Contain Element css:#similar-series [href="/series/5"] Go To ${SITE_URL}/series/5 - Page Should Contain Element css=#similar-series [href="/series/4"] + Page Should Contain Element css:#similar-series [href="/series/4"] *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/site/change-lang/logic.robot b/src/test/robotframework/site/change-lang/logic.robot index 4bb76cdf55..a1c7536b64 100644 --- a/src/test/robotframework/site/change-lang/logic.robot +++ b/src/test/robotframework/site/change-lang/logic.robot @@ -7,9 +7,9 @@ Force Tags main-page lang logic *** Test Cases *** Language should be changed after switching language - Element Text Should Be id=logo My stamps - Click Link id=change-lang-link - Element Text Should Be id=logo Мои марки + Element Text Should Be id:logo My stamps + Click Link id:change-lang-link + Element Text Should Be id:logo Мои марки *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/site/misc-admin.robot b/src/test/robotframework/site/misc-admin.robot index 5b5ca7d675..65c50d27c8 100644 --- a/src/test/robotframework/site/misc-admin.robot +++ b/src/test/robotframework/site/misc-admin.robot @@ -9,31 +9,31 @@ Force Tags misc main-page *** Test Cases *** Admin should see a link to a page for importing a series [Tags] import-series - Page Should Contain Link link=import a series + Page Should Contain Link link:import a series Admin should see a link to a list of import requests [Tags] import-series - Page Should Contain Link link=show list of import requests + Page Should Contain Link link:show list of import requests Admin should see a link for adding series [Tags] series - Page Should Contain Link link=add a stamp series + Page Should Contain Link link:add a stamp series Admin should see a link for adding countries [Tags] country - Page Should Contain Link link=add a country + Page Should Contain Link link:add a country Admin should see a link for listing countries [Tags] country - Page Should Contain Link link=show list of countries + Page Should Contain Link link:show list of countries Admin should see a link for adding categories [Tags] category - Page Should Contain Link link=add a category + Page Should Contain Link link:add a category Admin should see a link for listing categories [Tags] category - Page Should Contain Link link=show list of categories + Page Should Contain Link link:show list of categories *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/site/misc-anonymous.robot b/src/test/robotframework/site/misc-anonymous.robot index 78efc797f2..7a9b941473 100644 --- a/src/test/robotframework/site/misc-anonymous.robot +++ b/src/test/robotframework/site/misc-anonymous.robot @@ -8,23 +8,23 @@ Force Tags misc main-page *** Test Cases *** Anonymous should see a link for listing categories [Tags] category - Page Should Contain Link link=show list of categories + Page Should Contain Link link:show list of categories Anonymous should not see a link for adding categories [Tags] category - Page Should Not Contain Link link=add a category + Page Should Not Contain Link link:add a category Anonymous should see a link for listing countries [Tags] country - Page Should Contain Link link=show list of countries + Page Should Contain Link link:show list of countries Anonymous should not see a link for adding countries [Tags] country - Page Should Not Contain Link link=add a country + Page Should Not Contain Link link:add a country Anonymous should not see a link for adding series [Tags] series - Page Should Not Contain Link link=add a stamp series + Page Should Not Contain Link link:add a stamp series *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/site/misc-user.robot b/src/test/robotframework/site/misc-user.robot index e93d181365..141e3c79e5 100644 --- a/src/test/robotframework/site/misc-user.robot +++ b/src/test/robotframework/site/misc-user.robot @@ -9,31 +9,31 @@ Force Tags misc main-page *** Test Cases *** User should not see a link to a page for importing a series [Tags] import-series - Page Should Not Contain Link link=import a series + Page Should Not Contain Link link:import a series User should not see a link to a list of import requests [Tags] import-series - Page Should Not Contain Link link=show list of import requests + Page Should Not Contain Link link:show list of import requests User should see a link for adding series [Tags] series - Page Should Contain Link link=add a stamp series + Page Should Contain Link link:add a stamp series User should see a link for adding countries [Tags] country - Page Should Contain Link link=add a country + Page Should Contain Link link:add a country User should see a link for listing countries [Tags] country - Page Should Contain Link link=show list of countries + Page Should Contain Link link:show list of countries User should see a link for adding categories [Tags] category - Page Should Contain Link link=add a category + Page Should Contain Link link:add a category User should see a link for listing categories [Tags] category - Page Should Contain Link link=show list of categories + Page Should Contain Link link:show list of categories *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/togglz/access-anonymous.robot b/src/test/robotframework/togglz/access-anonymous.robot index 752752f787..bbda34f353 100644 --- a/src/test/robotframework/togglz/access-anonymous.robot +++ b/src/test/robotframework/togglz/access-anonymous.robot @@ -8,8 +8,8 @@ Force Tags togglz access *** Test Cases *** Anonymous user don't have access to Togglz console Go To ${SITE_URL}/togglz - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/togglz/access-user.robot b/src/test/robotframework/togglz/access-user.robot index d7cebf9d47..23570303d3 100644 --- a/src/test/robotframework/togglz/access-user.robot +++ b/src/test/robotframework/togglz/access-user.robot @@ -9,8 +9,8 @@ Force Tags togglz access *** Test Cases *** User don't have access to Togglz console Go To ${SITE_URL}/togglz - Element Text Should Be id=error-code 403 - Element Text Should Be id=error-msg Forbidden + Element Text Should Be id:error-code 403 + Element Text Should Be id:error-msg Forbidden *** Keywords *** Before Test Suite diff --git a/src/test/robotframework/togglz/misc.robot b/src/test/robotframework/togglz/misc.robot index 297bebbf5c..2676b50e62 100644 --- a/src/test/robotframework/togglz/misc.robot +++ b/src/test/robotframework/togglz/misc.robot @@ -7,7 +7,7 @@ Force Tags togglz misc *** Test Cases *** Extra characters should never be shown if Togglz works - Page Should Not Contain Element id=always-disabled-element + Page Should Not Contain Element id:always-disabled-element *** Keywords *** Before Test Suite