|
| 1 | +@mink:selenium2 @alice(Page) @reset-schema |
| 2 | +Feature: Display a page's content in a modal |
| 3 | + |
| 4 | + Background: |
| 5 | + Given I maximize the window |
| 6 | + And I am on homepage |
| 7 | + |
| 8 | + Scenario: I can create a modal link to a page |
| 9 | + Given I switch to "layout" mode |
| 10 | + And I should see "New content" |
| 11 | + When I select "Button" from the "1" select of "main_content" slot |
| 12 | + And I wait 2 seconds |
| 13 | + Then I should see "Label" |
| 14 | + # Add modal button |
| 15 | + When I fill in "Label" with "Render test in a modal" |
| 16 | + And I select "Website page" from "Link type" |
| 17 | + Then I should see "Choose a page" |
| 18 | + And I should not see "Modal style" |
| 19 | + When I select "└── English test" from "Website page" |
| 20 | + And I select "In a new modal window" from "Link target" |
| 21 | + Then I should see "Modal style" |
| 22 | + When I select "My custom modal" from "Modal style" |
| 23 | + And I submit the widget |
| 24 | + And I should see "Render test in a modal" |
| 25 | + # Add Force widget in test page |
| 26 | + When I am on "/en/english-test" |
| 27 | + And I switch to "layout" mode |
| 28 | + Then I should see "New content" |
| 29 | + And I select "Force" from the "1" select of "main_content" slot |
| 30 | + Then I should see "Force side" |
| 31 | + When I fill in "Force side" with "dark" |
| 32 | + And I submit the widget |
| 33 | + Then I should see "The dark side of the force" |
| 34 | + # Test Force widget rendering in modal |
| 35 | + When I am on homepage |
| 36 | + And I follow "Render test in a modal" |
| 37 | + Then I should see "My Custom modal" |
| 38 | + Then I should not see "The dark side of the force" |
| 39 | + # Change modal style |
| 40 | + When I am on homepage |
| 41 | + And I switch to "edit" mode |
| 42 | + And I edit the "Button" widget |
| 43 | + Then I should see "Modal style" |
| 44 | + When I select "Default" from "Modal style" |
| 45 | + And I submit the widget |
| 46 | + Then I should see "Render test in a modal" |
| 47 | + When I switch to "readonly" mode |
| 48 | + And I follow "Render test in a modal" |
| 49 | + Then I should not see "My Custom modal" |
| 50 | + And I should see "The dark side of the force" |
0 commit comments