-
Notifications
You must be signed in to change notification settings - Fork 0
/
declaration_details.feature
97 lines (83 loc) · 3.53 KB
/
declaration_details.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Feature: Test Declaration Details Page in NHS admin panel
Description: The purpose of this feature is to test get Declaration details page
Background: User is authorized and on DECLARATION_DETAILS_PAGE by person
Given I navigate to the login page
When I submit username and password
And I approve scopes
Then I should be logged in
And I navigate to the PERSON_DETAILS_PAGE
And I navigate to DECLARATIONS tab
And I press `details` field
Background: User is authorized and on DECLARATION_DETAILS_PAGE by declaration status
Given I navigate to the login page
When I submit username and password
And I approve scopes
Then I should be logged in
And I navigate to the DECLARATION_LIST_PAGE
And I navigate to PENDING_VERIFICATION_DECLARATIONS tab
And I press `details` field
Background: User is authorized and on DECLARATION_DETAILS_PAGE by declaration number
Given I navigate to the login page
When I submit username and password
And I approve scopes
Then I should be logged in
And I navigate to the DECLARATION_LIST_PAGE
And I input DECLARATION_NUMBER
And I submit form
And I press `details` field
Scenario: Get Person Details
Given I am on the DECLARATION_DETAILS_PAGE
Then I should see header with id, declarationNumber and status
And I see tabs GENERAL_INFO, LEGAL_ENTITY, DIVISION, EMPLOYEE, PATIENT, DOCUMENTS
And if status='ACTIVE'
Then I should see button TERMINATE on GENERAL_INFO tab
And if status is PENDING_VERIFICATION
Then I should see button APPROVE and button REJECT in headers
And if status is TERMINATED or status is REJECTED
Then I shouldn't see any button
Scenario: Get Declaration Details (GENERAL_INFO)
Given I am on the GENERAL_INFO tab
Then I should see startDate, endDate, status, statusReason, type
Scenario: Get Declaration Details (LEGAL_ENTITY)
Given I am on the LEGAL_ENTITY tab
Then I should see id, name, edrpou, addresses
Scenario: Get Declaration Details (DIVISION)
Given I am on the DIVISION tab
Then I should see id, name, type, addresses, mountainGroup, phones, email
Scenario: Get Declaration Details (EMPLOYEE)
Given I am on the EMPLOYEE tab
Then I should see id, firstName, lastName, secondName, speciality, position
Scenario: Get Declaration Details (PATIENT)
Given I am on the EMPLOYEE tab
Then I should see id, firstName, secondName, lastName, birthDate, birthCountry, birthSettlement, taxId, noTaxId, unzr, phones
Scenario: Get Declaration Details (DOCUMENTS)
Given I am on the DOCUMENTS tab
Then I should see documents preview if any was attached
Scenario: Terminate Declaration
Given I am on the GENERAL_INFO tab
And Declaration status is ACTIVE
Then I should see button TERMINATE declaration
And I press it
Then I see popup with input field and button BACK and FORWARD
And I fill input field with text
And I press FORWARD
Then I return to same tab
And I see Declaration status=TERMINATED
Scenario: APPROVE Declaration
Given I am on the any tab
And Declaration status=PENDING_VERIFICATION
Then I should see button APPROVE declaration
And I press it
Then I see popup with text notifications and buttons BACK and FORWARD
And I press FORWARD
Then I return to same tab
And I see Declaration status=ACTIVE
Scenario: REJECT Declaration
Given I am on the any tab
And Declaration status=PENDING_VERIFICATION
Then I should see button REJECT declaration
And I press it
Then I see popup with text notifications and buttons BACK and FORWARD
And I press FORWARD
Then I return to same tab
And I see Declaration status=REJECTED