|
| 1 | +*** Settings *** |
| 2 | +Documentation Verify access to a collection estimation page |
| 3 | +Library SeleniumLibrary |
| 4 | +Resource ../../auth.steps.robot |
| 5 | +Suite Setup Before Test Suite |
| 6 | +Suite Teardown Close Browser |
| 7 | +Force Tags collection estimation access |
| 8 | + |
| 9 | +*** Test Cases *** |
| 10 | +Anonymouser user doesn't have access to someone's estimation page |
| 11 | + Go To ${SITE_URL}/collection/paid/estimation |
| 12 | + Element Text Should Be id=error-msg Forbidden |
| 13 | + |
| 14 | +User doesn't have access to someone's estimation page |
| 15 | + Log In As login=coder password=test openPage=${true} |
| 16 | + Go To ${SITE_URL}/collection/paid/estimation |
| 17 | + Element Text Should Be id=error-msg Forbidden |
| 18 | + Log Out |
| 19 | + |
| 20 | +Paid user has access only to its own estimation page |
| 21 | + Log In As login=paid password=test openPage=${true} |
| 22 | + Go To ${SITE_URL}/collection/paid/estimation |
| 23 | + Element Text Should Be tag=h3 Paid User's collection |
| 24 | + Go To ${SITE_URL}/collection/admin/estimation |
| 25 | + Element Text Should Be id=error-msg Forbidden |
| 26 | + Log Out |
| 27 | + |
| 28 | +Admin has access only to its own estimation page |
| 29 | + Log In As login=paid password=test openPage=${true} |
| 30 | + Go To ${SITE_URL}/collection/paid/estimation |
| 31 | + Element Text Should Be tag=h3 Paid User's collection |
| 32 | + Go To ${SITE_URL}/collection/admin/estimation |
| 33 | + Element Text Should Be id=error-msg Forbidden |
| 34 | + # No need to log out as a browser will be closed after the test |
| 35 | + |
| 36 | +*** Keywords *** |
| 37 | +Before Test Suite |
| 38 | + Open Browser ${SITE_URL} ${BROWSER} |
| 39 | + Register Keyword To Run On Failure Log Source |
| 40 | + |
0 commit comments