Skip to content

Commit

Permalink
behat tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Jan 7, 2024
1 parent b4d0dcc commit 8bc1afe
Showing 1 changed file with 51 additions and 14 deletions.
65 changes: 51 additions & 14 deletions tests/features/managing-subscribers/newsubscriber.feature
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"

0 comments on commit 8bc1afe

Please sign in to comment.