@@ -4,13 +4,11 @@ import {WelcomePage} from 'dsm/pages/welcome-page';
44import { Navigation } from 'dsm/component/navigation/navigation' ;
55import { StudyEnum } from 'dsm/component/navigation/enums/selectStudyNav-enum' ;
66import { SamplesNavEnum } from 'dsm/component/navigation/enums/samplesNav-enum' ;
7- import { KitTypeEnum } from 'dsm/component/kitType/enums/kitType-enum' ;
87import KitsWithoutLabelPage from 'dsm/pages/kitsInfo-pages/kitsWithoutLabel-page' ;
98import { KitsColumnsEnum } from 'dsm/pages/kitsInfo-pages/enums/kitsColumns-enum' ;
10- import { studyShortName } from 'utils/test-utils' ;
9+ import { getExpectedKitSelection , studyShortName } from 'utils/test-utils' ;
1110
12- // don't run in parallel
13- test . describe . serial ( 'Blood Kits upload flow' , ( ) => {
11+ test . describe ( 'Kits without Labels UI' , ( ) => {
1412 let welcomePage : WelcomePage ;
1513 let navigation : Navigation ;
1614
@@ -22,12 +20,11 @@ test.describe.serial('Blood Kits upload flow', () => {
2220 } ) ;
2321
2422 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} ) => {
2624 const expectedKitSelection = getExpectedKitSelection ( study ) ;
2725 const { realm : expectedRealm } = studyShortName ( study ) ;
2826 await welcomePage . selectStudy ( study ) ;
2927
30- // Kit Upload page
3128 const kitsWithoutLabelPage = await navigation . selectFromSamples < KitsWithoutLabelPage > ( SamplesNavEnum . KITS_WITHOUT_LABELS ) ;
3229 await kitsWithoutLabelPage . waitForReady ( expectedKitSelection ) ;
3330 const kitsTable = kitsWithoutLabelPage . kitsWithoutLabelTable ;
@@ -57,17 +54,4 @@ test.describe.serial('Blood Kits upload flow', () => {
5754 expect ( test . info ( ) . errors ) . toHaveLength ( 0 ) ;
5855 } )
5956 }
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- }
7357} )
0 commit comments