This is the smallest of the three most critical, oft-used workflows within Atlas.
Will use this issue to set up E2E test framework.
Sub-tasks
[x] Anthony-Nolan/Atlas#1169
[x] Anthony-Nolan/Atlas.Auto.Tests#1
[x] Encode donor import E2E tests (this ticket)
blocked by:
Anthony-Nolan/Atlas#1162
Anthony-Nolan/Atlas#1169
Anthony-Nolan/Atlas.Auto.Tests#1
Tests to encode
Diff mode - Happy paths
[x] Create (C) new donor - donor should be created
[x] Create (NU) new donor - donor should be created
[x] Update (U) existing donor - donor should be updated
[x] Update (NU) existing donor - donor should be updated
[x] Delete (D) existing donor - donor should be deleted
[x] Delete (D) a donor that doesn't exist
Diff mode - Exception paths
[x] Create (C) a donor that already exists - import succeeds, but update fails validation
[x] Update (U) a donor that doesn't exist - import succeeds, but update fails validation
[x] Create (C/NU) a donor that has missing required field - import succeeds, but update fails validation
[x] Create a donor with required fields but invalid HLA - import succeeds, update does not fail validation but it does fail to be applied to the matching algorithm
[x] File contains a mixture of valid and invalid updates - import succeeds, only invalid updates are failed, and valid ones are applied correctly.
Full mode - Exception path
New app setting, allowFullModeImport, has been added to prevent full mode imports from taking place once an instance is in use (see #1155). It must be set to false for the following tests.
[x] Check that full mode import is not allowed
[x] Create (C) a new donor in Full mode - fail import and raise alert
Following tests were not added as one test is sufficient to prove full mode is disabled
~~Create (NU) a new donor in Full mode - fail import and raise alert
Update (NU) existing donor in Full mode - fail import and raise alert
Update (NU) existing donor in Full mode - fail import and raise alert
Delete (D) existing donor - fail import and raise alert~~
Full mode - Happy path
As Full mode import is only done once during setup of a new Atlas instance, tests for this will not be covered in this ticket, as this issue (and E2E tests in general) focuses on the most critical paths that are used in production.
A new ticket will be raised to cover Full import when deemed necessary.
This is the smallest of the three most critical, oft-used workflows within Atlas. Will use this issue to set up E2E test framework.
Sub-tasks
Tests to encode
Diff mode - Happy paths
C
) new donor - donor should be createdNU
) new donor - donor should be createdU
) existing donor - donor should be updatedNU
) existing donor - donor should be updatedD
) existing donor - donor should be deletedD
) a donor that doesn't existDiff mode - Exception paths
C
) a donor that already exists - import succeeds, but update fails validationU
) a donor that doesn't exist - import succeeds, but update fails validationC
/NU
) a donor that has missing required field - import succeeds, but update fails validationFull mode - Exception path
New app setting,
allowFullModeImport
, has been added to prevent full mode imports from taking place once an instance is in use (see #1155). It must be set tofalse
for the following tests.C
) a new donor inFull
mode - fail import and raise alert Following tests were not added as one test is sufficient to prove full mode is disabled ~~Create (NU
) a new donor inFull
mode - fail import and raise alert Update (NU
) existing donor inFull
mode - fail import and raise alert Update (NU
) existing donor inFull
mode - fail import and raise alert Delete (D
) existing donor - fail import and raise alert~~Full mode - Happy path