-
-
Notifications
You must be signed in to change notification settings - Fork 182
/
test_controlpanel_types.robot
80 lines (55 loc) · 2.41 KB
/
test_controlpanel_types.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
*** Settings *****************************************************************
Resource plone/app/robotframework/keywords.robot
Resource plone/app/robotframework/saucelabs.robot
Library Remote ${PLONE_URL}/RobotRemote
Resource keywords.robot
Test Setup Run keywords Plone Test Setup
Test Teardown Run keywords Plone Test Teardown
*** Test Cases ***************************************************************
Scenario: Allow comments for Link Type
Given a logged-in manager
and Globaly enabled comments
and the types control panel
When I select 'Link' in types dropdown
and Allow discussion
Then Wait until page contains Content Settings
When I add new Link 'my_link'
Then Link 'my_link' should have comments enabled
Scenarion: Change default workflow
Given a logged-in site administrator
and the types control panel
When I select 'Single State Workflow' workflow
Then Wait until page contains Content Settings
When I add new Link 'my_link'
Then Link 'my_link' should have Single State Workflow enabled
*** Keywords *****************************************************************
# --- GIVEN ------------------------------------------------------------------
a logged-in manager
Enable autologin as Manager
the types control panel
Go to ${PLONE_URL}/@@content-controlpanel
Globaly enabled comments
Go to ${PLONE_URL}/@@discussion-settings
Select checkbox name=form.widgets.globally_enabled:list
Click button Save
# --- WHEN -------------------------------------------------------------------
I select '${content_type}' in types dropdown
Select from list name=type_id ${content_type}
Wait until page contains Globally addable
Allow discussion
Select checkbox name=allow_discussion:boolean
Click Button Save
I select '${workflow}' workflow
Select from list name=new_workflow ${workflow}
Click Button Save
I add new Link '${id}'
Go to ${PLONE_URL}
Create content type=Link id=${id} title=${id}
# --- THEN -------------------------------------------------------------------
Link '${id}' should have comments enabled
Go to ${PLONE_URL}/${id}
Page should contain element xpath=//div[@id="commenting"]
Link '${id}' should have Single State Workflow enabled
Go to ${PLONE_URL}/${id}
# We check that single state worklow is used, publish button is not present
Page should not contain element xpath=//a[@id="workflow-transition-publish"]