-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e61c10
commit 12d9d6c
Showing
4 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/behat/features/cu_digital_campaign_bundle/a_b_testing.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
@digital_campaign | ||
Feature: Perform A/B testing using beans. | ||
|
||
@ab_testing @javascript | ||
Scenario: Create An A/B test. | ||
Given I am logged in as a user with the "developer" role | ||
# Turning the auto-complete field into a select list doesn't work like on my local... | ||
When I go to "admin/structure/field-collections/field-block-option/fields/field_block/widget-type" | ||
And I select "Select list" from "Widget type" | ||
And I press "Continue" | ||
When I am on "block/add/a-b-block" | ||
And I fill in "Label" with "A/B Block" | ||
And I select "Text Block A (Text Block A)" from "field_block_option[und][0][field_block][und]" | ||
And I fill in "edit-field-block-option-und-0-field-percentage-und-0-value" with "100" | ||
And I press "Add another item" | ||
And I wait for the ".ajax-new-content" element to appear | ||
And I select "Text Block B (Text Block B)" from "field_block_option[und][1][field_block][und]" | ||
And I fill in "edit-field-block-option-und-1-field-percentage-und-0-value" with "0" | ||
When I press "Save" | ||
Then I should see "A/B Block" | ||
And I should see "Text Block A Content AAA" | ||
When I follow "Edit Block" | ||
And I fill in "edit-field-block-option-und-0-field-percentage-und-0-value" with "0" | ||
And I fill in "edit-field-block-option-und-1-field-percentage-und-0-value" with "100" | ||
When I press "Save" | ||
Then I should see "A/B Block" | ||
And I should see "Text Block B Content BBB" |
64 changes: 64 additions & 0 deletions
64
tests/behat/features/cu_digital_campaign_bundle/tracking_pixels.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@digital_campaign | ||
Feature: Create and edit tracking pixel embeds. | ||
|
||
@tracking_pixels | ||
Scenario: Create a Facebook tracking pixel. | ||
Given I am logged in as a user with the "site_owner" role | ||
And I am on "admin/content/embeds/add/facebook" | ||
And I fill in "Label" with "Facebook Tracking Pixel" | ||
And I fill in "Path" with "node/1" | ||
And I fill in "ID" with "123456" | ||
And I select "Published" from "Status" | ||
When I press "Save" | ||
And I am on "node/1" | ||
Then the response should contain "https://www.facebook.com/tr?id=123456&ev=PageView&noscript=1" | ||
|
||
@tracking_pixels | ||
Scenario: Create a DoubleClick tracking pixel. | ||
Given I am logged in as a user with the "campaign_manager" role | ||
And I am on "admin/content/embeds/add/doubleclick" | ||
And I fill in "Label" with "DoubleClick Tracking Pixel" | ||
And I fill in "Path" with "node/1" | ||
And I fill in "ID" with "452315" | ||
And I fill in "Activity" with "activity_one" | ||
And I fill in "Creation Date" with "creation_date_one" | ||
And I fill in "Page Location" with "location_one" | ||
And I fill in "Type" with "type_one" | ||
And I fill in "Category" with "category_one" | ||
And I select "Top" from "Position" | ||
And I select "Published" from "Status" | ||
When I press "Save" | ||
And I am on "node/1" | ||
Then the response should contain "document.write('<iframe src=\"https://452315.fls.doubleclick.net/activityi;src=452315;type=type_one;cat=category_one;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;ord=' + a + '?\" width=\"1\" height=\"1\" frameborder=\"0\" style=\"display:none\"></iframe>');" | ||
|
||
|
||
@tracking_pixels | ||
Scenario: Create a Twitter tracking pixel. | ||
Given I am logged in as a user with the "site_owner" role | ||
And I am on "admin/content/embeds/add/twitter" | ||
And I fill in "Label" with "Twitter Tracking Pixel" | ||
And I fill in "Path" with "node/1" | ||
And I fill in "ID" with "456789" | ||
And I fill in "Activity" with "activity_nine" | ||
And I select "Published" from "Status" | ||
When I press "Save" | ||
And I am on "node/1" | ||
Then the response should contain "twq('init', '456789');" | ||
And the response should contain "twq('track', 'PageView');" | ||
And the response should contain "twq('track', 'activity_nine');" | ||
|
||
|
||
@tracking_pixels | ||
Scenario: Create a LinkedIn Insight Tag tracking pixel. | ||
Given I am logged in as a user with the "campaign_manager" role | ||
And I am on "admin/content/embeds/add/et_linkedin" | ||
And I fill in "Label" with "LinkedIn Tracking Pixel" | ||
And I fill in "Path" with "node/1" | ||
And I fill in "Account ID" with "9030612" | ||
And I fill in "Position" with "bottom" | ||
And I select "Published" from "Status" | ||
When I press "Save" | ||
And I am on "node/1" | ||
Then the response should contain "_linkedin_data_partner_id = \"9030612\";" | ||
And the response should contain "<img height=\"1\" width=\"1\" style=\"display:none;\" alt=\"\" src=\"https://dc.ads.linkedin.com/collect/?pid=9030612&fmt=gif\"/>" | ||
|
24 changes: 24 additions & 0 deletions
24
tests/behat/features/cu_digital_campaign_bundle/zzz_embed_admin_screen.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
@digital_campaign | ||
Feature: Interaction with the Embed Templates admin screens. | ||
|
||
|
||
@embed_templates @current | ||
Scenario Outline: Access Embed Templates Overview Page. | ||
Given I am logged in as a user with the <role> role | ||
And am on "admin/content/embeds" | ||
Then I should see <message> | ||
|
||
Examples: | ||
| role | message | | ||
| site_owner | "Add Embeds" | | ||
| administrator | "Add Embeds" | | ||
| developer | "Add Embeds" | | ||
| campaign_manager | "Add Embeds" | | ||
| edit_my_content | "Access Denied" | | ||
| content_editor | "Access Denied" | | ||
# | authenticated_user | "Access Denied" | | ||
| site_editor | "Access Denied" | | ||
| edit_only | "Access Denied" | | ||
| access_manager | "Access Denied" | | ||
| configuration_manager | "Access Denied" | | ||
|