1 | <?php |
||
24 | final class ImpersonatingCustomersContext implements Context |
||
25 | { |
||
26 | /** @var ShowPageInterface */ |
||
27 | private $customerShowPage; |
||
28 | |||
29 | /** @var DashboardPageInterface */ |
||
30 | private $dashboardPage; |
||
31 | |||
32 | /** @var HomePageInterface */ |
||
33 | private $homePage; |
||
34 | |||
35 | /** @var ImpersonateUserPageInterface */ |
||
36 | protected $impersonateUserPage; |
||
37 | |||
38 | public function __construct( |
||
49 | |||
50 | /** |
||
51 | * @Given I am impersonating the customer :customer |
||
52 | */ |
||
53 | public function iAmImpersonatingCustomer(CustomerInterface $customer) |
||
59 | |||
60 | /** |
||
61 | * @When I visit the store |
||
62 | */ |
||
63 | public function iVisitTheStore() |
||
67 | |||
68 | /** |
||
69 | * @When I log out from the store |
||
70 | */ |
||
71 | public function iLogOut() |
||
75 | |||
76 | /** |
||
77 | * @When I log out from my admin account |
||
78 | */ |
||
79 | public function iLogOutFromMyAdminAccount() |
||
84 | |||
85 | /** |
||
86 | * @When I impersonate them |
||
87 | */ |
||
88 | public function iTryToImpersonateThem() |
||
92 | |||
93 | /** |
||
94 | * @When I impersonate the customer :customer |
||
95 | */ |
||
96 | public function iImpersonateCustomer(CustomerInterface $customer) |
||
100 | |||
101 | /** |
||
102 | * @Then I should be unable to impersonate them |
||
103 | */ |
||
104 | public function iShouldBeUnableToImpersonateThem() |
||
108 | |||
109 | /** |
||
110 | * @Then I should still be able to access the administration dashboard |
||
111 | */ |
||
112 | public function iShouldBeAbleToAccessAdministrationDashboard() |
||
116 | |||
117 | /** |
||
118 | * @Then I should be logged in as :fullName |
||
119 | */ |
||
120 | public function iShouldBeLoggedInAs($fullName) |
||
125 | |||
126 | /** |
||
127 | * @Then I should not be logged in as :fullName |
||
128 | */ |
||
129 | public function iShouldNotBeLoggedInAs($fullName) |
||
136 | |||
137 | /** |
||
138 | * @Then I should see that impersonating :email was successful |
||
139 | */ |
||
140 | public function iShouldSeeThatImpersonatingWasSuccessful($email) |
||
144 | } |
||
145 |