1
+ @mink:selenium2 @alice(Page) @alice(MediaFile) @reset-schema
2
+ Feature : Manage an Image widget
3
+
4
+ Background :
5
+ Given I am on homepage
6
+
7
+ Scenario : I can create a new Image widget
8
+ When I switch to "layout" mode
9
+ Then I should see "New content"
10
+ When I select "Image" from the "1" select of "main_content" slot
11
+ Then I should see "Widget (Image)"
12
+ And I should see "1" quantum
13
+ When I attach image with id "1" to victoire field "a_static_widget_image_image_widget"
14
+ And I fill in "_a_static_widget_image[alt]" with "My alternative text"
15
+ And I fill in "_a_static_widget_image[legend]" with "My legend"
16
+ And I submit the widget
17
+ Then I should see "My legend"
18
+ And I should see an image with url "/uploads/55953304833d5.jpg" and alternative text "My alternative text"
19
+
20
+ Scenario : I can update an Image widget
21
+ Given the following WidgetMap:
22
+ | view | action | slot |
23
+ | home | create | main_content |
24
+ And the following WidgetImage:
25
+ | widgetMap | alt | image | legend |
26
+ | home | Alternative text to modify | victoire | Legend to modify |
27
+ When I reload the page
28
+ Then I should see "Legend to modify"
29
+ And I should see an image with url "/uploads/55dc8d8a4c9d3.jpg" and alternative text "Alternative text to modify"
30
+ When I switch to "edit" mode
31
+ And I edit the "Image" widget
32
+ And I should see "Widget #1 (Image)"
33
+ And I should see "1" quantum
34
+ When I attach image with id "1" to victoire field "a_static_widget_image_image_widget"
35
+ And I fill in "_a_static_widget_image[alt]" with "Alternative text modified"
36
+ And I fill in "_a_static_widget_image[legend]" with "Legend modified"
37
+ And I submit the widget
38
+ Then I should see "Legend modified"
39
+ And I should see an image with url "/uploads/55953304833d5.jpg" and alternative text "Alternative text modified"
0 commit comments