@@ -4,13 +4,11 @@ import {WelcomePage} from 'dsm/pages/welcome-page';
4
4
import { Navigation } from 'dsm/component/navigation/navigation' ;
5
5
import { StudyEnum } from 'dsm/component/navigation/enums/selectStudyNav-enum' ;
6
6
import { SamplesNavEnum } from 'dsm/component/navigation/enums/samplesNav-enum' ;
7
- import { KitTypeEnum } from 'dsm/component/kitType/enums/kitType-enum' ;
8
7
import KitsWithoutLabelPage from 'dsm/pages/kitsInfo-pages/kitsWithoutLabel-page' ;
9
8
import { KitsColumnsEnum } from 'dsm/pages/kitsInfo-pages/enums/kitsColumns-enum' ;
10
- import { studyShortName } from 'utils/test-utils' ;
9
+ import { getExpectedKitSelection , studyShortName } from 'utils/test-utils' ;
11
10
12
- // don't run in parallel
13
- test . describe . serial ( 'Blood Kits upload flow' , ( ) => {
11
+ test . describe ( 'Kits without Labels UI' , ( ) => {
14
12
let welcomePage : WelcomePage ;
15
13
let navigation : Navigation ;
16
14
@@ -22,12 +20,11 @@ test.describe.serial('Blood Kits upload flow', () => {
22
20
} ) ;
23
21
24
22
for ( const study of studies ) {
25
- test ( `Kit Upload page ui @dsm @${ study } @kit` , async ( { page} ) => {
23
+ test ( `Page verifications @dsm @${ study } @kit` , async ( { page} ) => {
26
24
const expectedKitSelection = getExpectedKitSelection ( study ) ;
27
25
const { realm : expectedRealm } = studyShortName ( study ) ;
28
26
await welcomePage . selectStudy ( study ) ;
29
27
30
- // Kit Upload page
31
28
const kitsWithoutLabelPage = await navigation . selectFromSamples < KitsWithoutLabelPage > ( SamplesNavEnum . KITS_WITHOUT_LABELS ) ;
32
29
await kitsWithoutLabelPage . waitForReady ( expectedKitSelection ) ;
33
30
const kitsTable = kitsWithoutLabelPage . kitsWithoutLabelTable ;
@@ -57,17 +54,4 @@ test.describe.serial('Blood Kits upload flow', () => {
57
54
expect ( test . info ( ) . errors ) . toHaveLength ( 0 ) ;
58
55
} )
59
56
}
60
-
61
- function getExpectedKitSelection ( study : StudyEnum ) : KitTypeEnum [ ] {
62
- let types = [ KitTypeEnum . SALIVA , KitTypeEnum . BLOOD ] ;
63
- switch ( study ) {
64
- case StudyEnum . PANCAN :
65
- types = types . concat ( [ KitTypeEnum . STOOL ] ) ;
66
- break ;
67
- case StudyEnum . RGP :
68
- types = [ KitTypeEnum . BLOOD , KitTypeEnum . BLOOD_AND_RNA ] ;
69
- break ;
70
- }
71
- return types ;
72
- }
73
57
} )
0 commit comments