Skip to content

Commit dbb2185

Browse files
committed
test(collection/estimation/access.robot): add tests for the access to a collection estimation page.
Addressed to #893
1 parent c22b681 commit dbb2185

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

src/test/robotframework/auth.steps.robot

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ Log In As
99
Input Text id=login ${login}
1010
Input Password id=password ${password}
1111
Submit Form id=auth-account-form
12+
13+
Log Out
14+
[Documentation] Logout the current user
15+
Submit Form id=logout-form
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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

Comments
 (0)