1
- *** Settings *****************************************************************
1
+ *** Settings ***
2
2
3
- Resource plone/app/robotframework/keywords.robot
4
- Resource plone/app/robotframework/saucelabs.robot
5
- Resource plone/app/robotframework/selenium.robot
3
+ Resource plone/app/robotframework/browser.robot
4
+ Resource keywords.robot
6
5
7
6
Library Remote ${PLONE_URL } /RobotRemote
8
7
9
- Test Setup Run keywords Plone Test Setup
10
- Test Teardown Run keywords Plone Test Teardown
8
+ Test Setup Run Keywords Plone test setup
9
+ Test Teardown Run keywords Plone test teardown
11
10
12
-
13
- *** Test Cases ***************************************************************
11
+ *** Test Cases ***
14
12
15
13
Scenario: Allow comments for Link Type
16
14
Given a logged-in manager
17
15
and Globally enabled comments
18
16
and the types control panel
19
17
When I select 'Link' in types dropdown
20
18
and Allow discussion
21
- Then Wait until page contains Content Settings
19
+ Then Wait For Condition Text //body contains Content Settings
20
+
22
21
When I add new Link 'my_link'
23
- Then Link 'my_link' should have comments enabled
22
+ Then Link 'my_link' should have comments enabled
24
23
25
24
26
- *** Keywords *****************************************************************
25
+ *** Keywords ***
27
26
28
- # --- GIVEN ------------------------------------------------------------------
27
+ # GIVEN
29
28
30
29
a logged-in manager
31
- Enable autologin as Manager
30
+ Enable autologin as Manager
32
31
33
32
the types control panel
34
- Go to ${PLONE_URL } /@@content-controlpanel
35
- Wait until page contains Content Settings
33
+ Go to ${PLONE_URL } /@@content-controlpanel
34
+ Wait For Condition Text //body contains Content Settings
36
35
37
36
Globally enabled comments
38
- Go to ${PLONE_URL } /@@discussion-settings
39
- Wait until page contains Discussion settings
40
- Select checkbox name=form.widgets.globally_enabled:list
41
- Click button Save
42
-
37
+ Go to ${PLONE_URL } /@@discussion-settings
38
+ Wait For Condition Text //body contains Discussion settings
39
+ Check Checkbox //input[@name="form.widgets.globally_enabled:list"]
40
+ Click //button[@name="form.buttons.save"]
43
41
44
42
45
- # --- WHEN -------------------------------------------------------------------
43
+ # WHEN
46
44
47
45
I select '${content_type}' in types dropdown
48
- Select from list by label name=type_id ${content_type }
49
- Wait until page contains Globally addable
46
+ Select Options By //select[@ name=" type_id"] label ${content_type }
47
+ Wait For Condition Text //body contains Globally addable
50
48
51
49
Allow discussion
52
- Select checkbox name=allow_discussion:boolean
53
- Click Button Save
50
+ Check Checkbox //input[@ name=" allow_discussion:boolean"]
51
+ Click //button[@name="form.button. Save"]
54
52
55
53
I add new Link '${id}'
56
- Go to ${PLONE_URL }
57
- Wait until page contains Plone site
58
- Create content type=Link id=${id } title=${id } remoteUrl=http://www.starzel.de
54
+ Go to ${PLONE_URL }
55
+ Wait For Condition Text //body contains Plone site
56
+ Create content
57
+ ... type=Link
58
+ ... id=${id }
59
+ ... title=${id }
60
+ ... remoteUrl=http://www.starzel.de
59
61
60
62
61
- # --- THEN -------------------------------------------------------------------
63
+ # THEN
62
64
63
65
Link '${id}' should have comments enabled
64
- Go to ${PLONE_URL } /${id }
65
- Wait until page contains ${id }
66
- Page should contain element xpath=//div[@id="commenting"]
66
+ Go to ${PLONE_URL } /${id }
67
+ Wait For Condition Text //body contains ${id }
68
+ Get Element Count //div[@id="commenting"] should be 1
69
+
70
+ # Misc
71
+
72
+ Pause
73
+ [Documentation] Visually pause test execution with interactive dialog by
74
+ ... importing **Dialogs**-library and calling its
75
+ ... **Pause Execution**-keyword.
76
+ Import library Dialogs
77
+ Pause execution
0 commit comments