File tree Expand file tree Collapse file tree 3 files changed +45
-4
lines changed
Expand file tree Collapse file tree 3 files changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ class FeatureContext extends MinkContext
1616{
1717
1818 private $ params = array ();
19+ private $ data = array ();
1920
2021 /**
2122 * Initializes context.
@@ -54,4 +55,22 @@ public function iRecreateTheDatabase()
5455 mysqli_query ($ db ,'drop database if exists phplistbehattestdb ' );
5556 mysqli_query ($ db ,'create database phplistbehattestdb ' );
5657 }
58+
59+ /**
60+ * @When /^I fill in "([^"]*)" with an email address$/
61+ */
62+ public function iFillInWithAnEmailAddress ($ fieldName )
63+ {
64+ $ this ->
data [
'email ' ] =
'[email protected] ' ;
// at some point really make random 65+ $ this ->fillField ($ fieldName , $ this ->data ['email ' ]);
66+ }
67+
68+ /**
69+ * @Given /^I should see the email address I entered$/
70+ */
71+ public function iShouldSeeTheEmailAddressIEntered ()
72+ {
73+ $ this ->assertSession ()->pageTextContains ($ this ->data ['email ' ]);
74+ }
75+
5776}
Original file line number Diff line number Diff line change 1- Feature : Create new campaign
2- In order to create a new campaign
1+ Feature : Load default attributes
2+ In order to load default attributes
33 As an admin user
4- I need to be able to login and start a new campaign
4+ I need to be able to login and load default attributes and add a value
55
6- Scenario : Login and create a campaign
6+ Scenario : Load default attributes and add a value
77 Given I am on "/lists/admin/?page=attributes"
88 When I fill in "login" with "admin"
99 And I fill in "password" with "Mypassword123+"
Original file line number Diff line number Diff line change 1+ Feature : Create a new subscriber
2+ In order to create a new subscriber
3+ As an admin user
4+ I need to be able to login and start a new campaign
5+
6+ Scenario : Login and create a campaign
7+ Given I am on "/lists/admin/"
8+ When I fill in "login" with "admin"
9+ And I fill in "password" with "Mypassword123+"
10+ And I press "Continue"
11+ Then I should see "Add a new subscriber"
12+ When I follow "Add a new subscriber"
13+ Then I should see "Email address"
14+ When I fill in "email" with an email address
15+ And I press "change"
16+ Then I should see "subscriber profile"
17+ # Then print last response
18+ # this fails, even though the address is there
19+ # And I should see the email address I entered
20+ And I follow "History"
21+ Then I should see the email address I entered
22+
You can’t perform that action at this time.
0 commit comments