-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
Showing
1 changed file
with
51 additions
and
14 deletions.
There are no files selected for viewing
65 changes: 51 additions & 14 deletions
65
tests/features/managing-subscribers/newsubscriber.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 |
---|---|---|
@@ -1,17 +1,54 @@ | ||
Feature: Create a new subscriber | ||
In order to create a new subscriber | ||
Feature: Import subscribers | ||
In order to import subscribers | ||
As an admin user | ||
I must be able to save a new subscriber's details | ||
|
||
Scenario: Login and create a subscriber | ||
I need to be able to login and import email addresses | ||
//this needs to be extended to search for emails added | ||
|
||
Scenario: Choose import method | ||
Given I have logged in as an administrator | ||
Given I follow "Subscribers" | ||
Given I follow "Search subscribers" | ||
Given I follow "Add a subscriber" | ||
Then I should see "Email address" | ||
When I fill in "email" with an email address | ||
And I press "change" | ||
Then I should see "subscriber profile" | ||
Then I should see "Add to blacklist" | ||
And I follow "Search subscribers" | ||
Then I should see the email address I entered | ||
Given I follow "Import subscribers" | ||
Then I should see "Please choose one of the import methods below" | ||
And I should see "Copy and paste list of email addresses" | ||
And I should see "Import by uploading a file with email addresses" | ||
And I should see "Import by uploading a CSV file with email addresses and additional data" | ||
When I follow "Copy and paste list of email addresses" | ||
Then I should be on "/lists/admin/?page=importsimple" | ||
Given I go back | ||
When I follow "Import by uploading a file with email addresses" | ||
Then I should be on "/lists/admin/?page=import1" | ||
Given I go back | ||
And I follow "Import by uploading a CSV file with email addresses and additional data" | ||
Then I should be on "/lists/admin/?page=import2" | ||
|
||
Scenario:Import subscribers using copy&paste | ||
Given I have logged in as an administrator | ||
Given I am on "/lists/admin/?page=import" | ||
Given I follow "Copy and paste list of email addresses" | ||
Then I should see "Select the lists to add the emails to" | ||
Given I check "importlists[all]" | ||
And I fill in "importcontent" with "[email protected]" | ||
When I press "doimport" | ||
Then I should see "Send a campaign" | ||
And I should see "Import some more emails" | ||
|
||
Scenario:Import subscribers by uploading a txt file with emails | ||
Given I have logged in as an administrator | ||
Given I am on "/lists/admin/?page=import" | ||
Given I follow "Import by uploading a file with email addresses" | ||
Then I should see "Select the lists to add the emails to" | ||
Given I check "importlists[all]" | ||
When I attach the file "importFile.txt" to "import_file" | ||
When I press "Import" | ||
Then I should see "There should only be ONE email per line. If the output looks ok, go Back to resubmit for real." | ||
|
||
|
||
Scenario:Import subscribers by uploading a CSV file with emails | ||
Given I have logged in as an administrator | ||
Given I am on "/lists/admin/?page=import" | ||
Given I follow "Import by uploading a CSV file with email addresses and additional data" | ||
Then I should see "Select the lists to add the emails to" | ||
Given I check "lists[all]" | ||
And I attach the file "ImportCSV.csv" to "import_file" | ||
And I press "Import" | ||
Then I should see "Reading emails from file" |