Skip to content

Commit 64d8f7a

Browse files
authored
Merge pull request #22 from Victoire/feature/integrate-victoire-master-tests
Feature/integrate victoire master tests
2 parents 6bb2598 + 99032c5 commit 64d8f7a

2 files changed

Lines changed: 88 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@mink:selenium2 @alice(Page) @reset-schema
2+
Feature: Create link to a Business Page
3+
Background:
4+
Given I maximize the window
5+
And I am on homepage
6+
7+
Scenario: I can view the mercenary show view
8+
Given the following Mercenaries:
9+
| name | midiChlorians | slug |
10+
| Boba fet | 1500 | boba-fet |
11+
And the following BusinessTemplate:
12+
| currentLocale | name | backendName | slug | businessEntityId | parent | template |
13+
| en | Character profile - {{item.name}} | Character profile | character-profile-{{item.slug}} | character | home | base |
14+
And the following WidgetMap:
15+
| view | action | slot |
16+
| character-profile-{{item.slug}} | create | main_content |
17+
And the following WidgetText:
18+
| widgetMap | fields | mode | businessEntityId |
19+
| character-profile-{{item.slug}} | a:1:{s:7:"content";s:4:"name";} | businessEntity | character |
20+
And I am on "/en/victoire-dcms/business-template/show/4"
21+
Then I should see "Boba fet"
22+
And I am on "/en/character-profile-boba-fet"
23+
Then I should see "Boba fet"
24+
When I am on "/"
25+
Then I switch to "layout" mode
26+
And I should see "New content"
27+
When I select "Button" from the "1" select of "main_content" slot
28+
Then I should see "Widget (Button)"
29+
When I select "Website page" from "_a_static_widget_button[link][linkType]"
30+
And I should see "Choose a page"
31+
When I select "Character profile - Boba fet" from "_a_static_widget_button[link][viewReference]"
32+
And I fill in "_a_static_widget_button[title]" with "Boba fet profile"
33+
And I submit the widget
34+
When I reload the page
35+
Then I should see "Boba fet profile"
36+
When I follow "Boba fet profile"
37+
Then I should be on "/en/character-profile-boba-fet"
38+

Tests/Features/modal.feature

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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

Comments
 (0)