@@ -9,7 +9,8 @@ const SELECT_SAMPLES_BUTTON = 'button=Select Samples';
9
9
const ADD_FILTERS_BUTTON = 'button=Add Filters' ;
10
10
const STUDY_VIEW_HEADER = `div[data-test="study-view-header"]` ;
11
11
const SETTINGS_MENU_BUTTON = `button[data-test="study-view-settings-menu"]` ;
12
- const DISABLE_AUTOCOMMIT_FIELD = `label=Manually submit` ;
12
+ const MANUALLY_COMMIT_RADIO = `input[name="hesitateMode"][value="manual"]` ;
13
+ const AUTOCOMMIT_RADIO = `input[name="hesitateMode"][value="auto"]` ;
13
14
const SUBMIT_STUDY_FILTERS = `button[data-test="submit-study-filters"]` ;
14
15
const PUTATIVE_PROFILE =
15
16
"//span[text() = 'Putative copy-number alterations from GISTIC']" ;
@@ -30,13 +31,16 @@ describe.only('Toggling of study view filters autosubmit', function() {
30
31
assert ( ! isFilterQueued ) ;
31
32
} ) ;
32
33
33
- it ( 'can disable filter submission in settings menu' , ( ) => {
34
- $ ( SETTINGS_MENU_BUTTON ) . waitForDisplayed ( { timeout : 20000 } ) ;
34
+ it ( 'can toggle to manual submit in settings menu' , ( ) => {
35
+ $ ( SETTINGS_MENU_BUTTON ) . waitForDisplayed ( { timeout : 5000 } ) ;
35
36
$ ( SETTINGS_MENU_BUTTON ) . click ( ) ;
36
- $ ( DISABLE_AUTOCOMMIT_FIELD ) . waitForDisplayed ( { timeout : 20000 } ) ;
37
- $ ( DISABLE_AUTOCOMMIT_FIELD ) . click ( ) ;
37
+ $ ( AUTOCOMMIT_RADIO ) . waitForDisplayed ( { timeout : 5000 } ) ;
38
+ assert ( $ ( AUTOCOMMIT_RADIO ) . isSelected ( ) ) ;
38
39
39
- assert ( $ ( SUBMIT_STUDY_FILTERS ) . isDisplayed ( ) ) ;
40
+ $ ( MANUALLY_COMMIT_RADIO ) . click ( ) ;
41
+
42
+ assert ( $ ( MANUALLY_COMMIT_RADIO ) . isSelected ( ) ) ;
43
+ assert ( ! $ ( AUTOCOMMIT_RADIO ) . isSelected ( ) ) ;
40
44
} ) ;
41
45
42
46
it ( 'queues new filters when autosubmit disabled' , ( ) => {
@@ -45,6 +49,7 @@ describe.only('Toggling of study view filters autosubmit', function() {
45
49
46
50
const queuedFilterInHeader = $ ( STUDY_VIEW_HEADER ) . $ ( LOG2_PROFILE ) ;
47
51
assert ( queuedFilterInHeader . isDisplayed ( ) ) ;
52
+ assert ( $ ( SUBMIT_STUDY_FILTERS ) . isDisplayed ( ) ) ;
48
53
const isFilterQueued = hasFilterClass ( queuedFilterInHeader , 'pending' ) ;
49
54
assert ( isFilterQueued ) ;
50
55
} ) ;
0 commit comments