Fix employee adding

This commit is contained in:
2015-02-27 11:09:16 +01:00
parent 6e805fed3e
commit bfc0f336d1
13 changed files with 137 additions and 21 deletions
+34 -1
View File
@@ -1,5 +1,38 @@
Feature: Manage employees
@javascript
Scenario: create an not yet existing extra employee
Given there is a confirmed and open supplier
And I am signed in as supplier
When the supplier employee visits the 'employees' path
And I click on selector '.new-employee-button'
And the supplier emloyee sets the 'name' to 'New employee' in the employee popup
And the supplier emloyee sets the 'email' to 'new-employee@example.com' in the employee popup
And I click on selector '.form-row.manager .switch'
And I click on selector '.modal-confirm'
And I wait 1 second
Then the new employee should be added to the supplier
@javascript
Scenario: adding an already existing employee that was firstly added as manager without manager and active
Given there is a confirmed and open supplier
And I am signed in as supplier
When the supplier employee visits the 'employees' path
And I click on selector '.new-employee-button'
And the supplier emloyee sets the 'name' to 'Existing employee' in the employee popup
And the supplier emloyee sets the 'email' to 'existing-employee@example.com' in the employee popup
And I click on selector '.form-row.manager .switch'
And I click on selector '.modal-confirm'
And the supplier employee clicks on the existing employee table destroy button
And I click on selector '.modal-confirm'
And I click on selector '.new-employee-button'
And the supplier emloyee sets the 'name' to 'Existing employee readded' in the employee popup
And the supplier emloyee sets the 'email' to 'existing-employee@example.com' in the employee popup
And I click on selector '.form-row.active .switch'
And I click on selector '.modal-confirm'
And I wait 1 second
Then the new employee should be re-added to the supplier as non manager non active
@javascript
Scenario: a just signed up manager can manage employees
Given there is a confirmed and open supplier
@@ -7,7 +40,7 @@ Feature: Manage employees
And I am signed in as supplier
When the supplier employee visits the 'employees' path
And the supplier employee clicks on the other employee table edit button
And the supplier emloyee sets the 'name' to 'Edited employee'
And the supplier emloyee sets the 'name' to 'Edited employee' in the employee popup
And the supplier emloyee clicks the active switch to deactivate the employee
And the supplier employee clicks the confirm modal button
Then the other employee should no longer be active for the current supplier