1
+ @mink:selenium2 @alice(Page) @reset-schema
2
+ Feature : Manage a Button widget
3
+
4
+ Background :
5
+ Given I am on homepage
6
+
7
+ Scenario : I can create a new Button widget
8
+ When I switch to "layout" mode
9
+ Then I should see "New content"
10
+ When I select "Button" from the "1" select of "main_content" slot
11
+ Then I should see "Widget (Button)"
12
+ And I should see "1" quantum
13
+ When I fill in "_a_static_widget_button[title]" with "My Button Widget title"
14
+ And I fill in "_a_static_widget_button[icon]" with "fa-calendar"
15
+ And I fill in "_a_static_widget_button[hoverTitle]" with "My Button Widget hover"
16
+ And I select "Large" from "_a_static_widget_button[size]"
17
+ And I select "Warning" from "_a_static_widget_button[style]"
18
+ And I submit the widget
19
+ Then I should see the success message for Widget edit
20
+ When I reload the page
21
+ Then I should see "My Button Widget title"
22
+ And I should see a button "My Button Widget title" with class "btn-lg"
23
+ And I should see a button "My Button Widget title" with class "btn-warning"
24
+ And I should see a button "My Button Widget title" with hover title "My Button Widget hover"
25
+ And I should see a button "My Button Widget title" with a "fa-calendar" icon
26
+
27
+ Scenario : I can update a Button widget
28
+ Given the following WidgetMap:
29
+ | view | action | slot |
30
+ | home | create | main_content |
31
+ And the following WidgetButton:
32
+ | widgetMap | title | icon | hoverTitle | size | style |
33
+ | home | Button Widget to edit | fa -truck | Button Widget to edit hover | md | danger |
34
+ When I reload the page
35
+ Then I should see "Button Widget to edit"
36
+ And I should see a button "Button Widget to edit" with class "btn-md"
37
+ And I should see a button "Button Widget to edit" with class "btn-danger"
38
+ And I should see a button "Button Widget to edit" with hover title "Button Widget to edit hover"
39
+ And I should see a button "Button Widget to edit" with a "fa-truck" icon
40
+ When I switch to "edit" mode
41
+ And I edit the "Button" widget
42
+ And I should see "1" quantum
43
+ When I fill in "_a_static_widget_button[title]" with "Button Widget modified"
44
+ And I fill in "_a_static_widget_button[icon]" with "fa-pencil"
45
+ And I fill in "_a_static_widget_button[hoverTitle]" with "Button Widget modified hover"
46
+ And I select "Tiny" from "_a_static_widget_button[size]"
47
+ And I select "Success" from "_a_static_widget_button[style]"
48
+ And I submit the widget
49
+ Then I should see the success message for Widget edit
50
+ When I reload the page
51
+ Then I should see "Button Widget modified"
52
+ And I should see a button "Button Widget modified" with class "btn-sm"
53
+ And I should see a button "Button Widget modified" with class "btn-success"
54
+ And I should see a button "Button Widget modified" with hover title "Button Widget modified hover"
55
+ And I should see a button "Button Widget modified" with a "fa-pencil" icon
0 commit comments