n/n | Description | Test Case Inputs | Expected Result | Step by step Script | Actual Result |
---|
CIT1 | Create INNM Dosage | - Authorization = NHS Admin
- name - valid
- form = valid
- innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 200 INNM Dosages created. Saved to DB | - Login as NHS Admin
- Create innm Dosage copy
| |
CIT2 | Create INNM Dosage with 0 ingredients | - Authorization = NHS Admin
- name - valid
- form = valid
- Innm
- id - active
- Numerator unit - true
- Numerator value = 0
- Denumerator unit - true
- Denumerator value = 0
- is active - true
| Response 422 message: expected the value to be > 0 | - Login as NHS Admin
- Create INNM Dosage with 0 ingredients
| |
CIT3 | Create innm Dosage with not active Innm | - Authorization = NHS Admin
- name - valid
- form = valid
- Innm
- id - NOT active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
| Response 200 INNMS created. Saved to DB | - is active - true
| Response 422 message: "Innm in ingredients must be active!" | innm copy- innm Dosage with not active Innm
| |
CIT4 | Create | INNM with 0 innm Dosage with 2 is_active_subst ingredients | - Authorization = NHS Admin
- name - valid
- form = valid
Substance - Innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
- Innm
- id - active
- Numerator unit - true
- Numerator value
= - > 0
- Denumerator unit - true
- Denumerator value
= | Response 422 message: | expected the value to be > 0"One of ingredients must be is active Innm!" | - Login as NHS Admin
- Create
| INNM with 0 - innm Dosage with 2 is_active_subst ingredients
| |
CIT5 | Create | innm with not active substanceinnm Dosage 1 ingredient and is_promary=false | - Authorization = NHS Admin
- name - valid
- form = valid
Substance NOT - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active -
true | Response 422 message: " | Substance in One of ingredients must be is active Innm!" | | innm with not active substance- innm Dosage 1 ingredient and is_primary=false
| |
CIT6 | Create innm innm Dosage with 2 ingredients is_active_subst ingredients=true & is_active=false | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance Innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
Substance - Innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - truefalse
| Response 422message: "One of ingredients must be is active substance!"201 INNM Dosage created. Saved to DB
| innm is_active_subst | Create innm 1 ingredient and is_active_substance=false |
CIT7 | Create innm Dosage with 2 ingredients with the same id | Create innm with 2 ingredients is_active=true & - Authorization = NHS Admin
- name - valid
- form = valid
- Substance Innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0is active - false
| Response 422 message: "One of ingredients must be is active substance!" | - Login as NHS Admin
- Create innm 1 ingredient and is_active_substance=false
| | _=false- Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- - true
- Innm
- id - active, the same
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
Substance - false
| Response 422 | - Login as NHS Admin
- Create innm Dosage with 2 ingredients with the same id
| |
CIT8 | Create innm Dosage not by NHS Admin | - Authorization = NHS Admin
- name - valid
- form = valid
- Innm
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - false
Response 201 INNM created. Saved to DB | Response 403 Message: Your scope does not allow to access this resource. Missing allowances: innm_dosage:write | | |
CIT9 | Deactivate INNM Dosage | - Authorization = NHS Admin
- INNM_Dosage_id - Active
| Response 201 | - Login as NHS Admin
- Create innm with 2 ingredientsDeactivate INNM Dosage
| |
Create innm with 2 ingredients with the same idCIT10 | Deactivate not active INNM Dosage | - Authorization = NHS Admin
- name - valid
- form = valid
- Substance
- id - active
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - true
- Substance
- id - active, the same
- Numerator unit - true
- Numerator value > 0
- Denumerator unit - true
- Denumerator value > 0
- is active - false
Response 422 | Response 404 | - Login as NHS Admin
- Deactivate not active INNM Dosage
| |
CIT11 | Deactivate INNM Dosage with active medication | - Authorization = NHS Admin
- Create INNM Dosage
- Create Medication
- Deactivate INNM Dosage
| Response 404 | - Login as NHS Admin
- Create innm Dosage to deactivate
- Create innm with 2 ingredients with the same idmedication to deactivate innm Dosage
- Deactivate INNM Dosage with active medication
| |