@@ -32,12 +32,10 @@ export function MachineLearningNavigationProvider({
3232 } ,
3333
3434 async navigateToArea ( linkSubject : string , pageSubject : string ) {
35- await retry . tryForTime ( 2 * 60 * 1000 , async ( ) => {
36- if ( ( await testSubjects . exists ( `${ linkSubject } selected` ) ) === false ) {
37- await testSubjects . click ( linkSubject ) ;
38- await testSubjects . existOrFail ( `${ linkSubject } selected` , { timeout : 30 * 1000 } ) ;
39- await testSubjects . existOrFail ( pageSubject , { timeout : 30 * 1000 } ) ;
40- }
35+ await testSubjects . click ( linkSubject ) ;
36+ await retry . tryForTime ( 60 * 1000 , async ( ) => {
37+ await testSubjects . existOrFail ( `${ linkSubject } & ~selected` ) ;
38+ await testSubjects . existOrFail ( pageSubject ) ;
4139 } ) ;
4240 } ,
4341
@@ -51,11 +49,11 @@ export function MachineLearningNavigationProvider({
5149 } ,
5250
5351 async navigateToOverview ( ) {
54- await this . navigateToArea ( 'mlMainTab overview' , 'mlPageOverview' ) ;
52+ await this . navigateToArea ( '~ mlMainTab & ~ overview' , 'mlPageOverview' ) ;
5553 } ,
5654
5755 async navigateToAnomalyDetection ( ) {
58- await this . navigateToArea ( 'mlMainTab anomalyDetection' , 'mlPageJobManagement' ) ;
56+ await this . navigateToArea ( '~ mlMainTab & ~ anomalyDetection' , 'mlPageJobManagement' ) ;
5957 await this . assertTabsExist ( 'mlSubTab' , [
6058 'jobManagement' ,
6159 'anomalyExplorer' ,
@@ -65,33 +63,33 @@ export function MachineLearningNavigationProvider({
6563 } ,
6664
6765 async navigateToDataFrameAnalytics ( ) {
68- await this . navigateToArea ( 'mlMainTab dataFrameAnalytics' , 'mlPageDataFrameAnalytics' ) ;
66+ await this . navigateToArea ( '~ mlMainTab & ~ dataFrameAnalytics' , 'mlPageDataFrameAnalytics' ) ;
6967 await this . assertTabsExist ( 'mlSubTab' , [ ] ) ;
7068 } ,
7169
7270 async navigateToDataVisualizer ( ) {
73- await this . navigateToArea ( 'mlMainTab dataVisualizer' , 'mlPageDataVisualizerSelector' ) ;
71+ await this . navigateToArea ( '~ mlMainTab & ~ dataVisualizer' , 'mlPageDataVisualizerSelector' ) ;
7472 await this . assertTabsExist ( 'mlSubTab' , [ ] ) ;
7573 } ,
7674
7775 async navigateToJobManagement ( ) {
7876 await this . navigateToAnomalyDetection ( ) ;
79- await this . navigateToArea ( 'mlSubTab jobManagement' , 'mlPageJobManagement' ) ;
77+ await this . navigateToArea ( '~ mlSubTab & ~ jobManagement' , 'mlPageJobManagement' ) ;
8078 } ,
8179
8280 async navigateToAnomalyExplorer ( ) {
8381 await this . navigateToAnomalyDetection ( ) ;
84- await this . navigateToArea ( 'mlSubTab anomalyExplorer' , 'mlPageAnomalyExplorer' ) ;
82+ await this . navigateToArea ( '~ mlSubTab & ~ anomalyExplorer' , 'mlPageAnomalyExplorer' ) ;
8583 } ,
8684
8785 async navigateToSingleMetricViewer ( ) {
8886 await this . navigateToAnomalyDetection ( ) ;
89- await this . navigateToArea ( 'mlSubTab singleMetricViewer' , 'mlPageSingleMetricViewer' ) ;
87+ await this . navigateToArea ( '~ mlSubTab & ~ singleMetricViewer' , 'mlPageSingleMetricViewer' ) ;
9088 } ,
9189
9290 async navigateToSettings ( ) {
9391 await this . navigateToAnomalyDetection ( ) ;
94- await this . navigateToArea ( 'mlSubTab settings' , 'mlPageSettings' ) ;
92+ await this . navigateToArea ( '~ mlSubTab & ~ settings' , 'mlPageSettings' ) ;
9593 } ,
9694 } ;
9795}
0 commit comments