@@ -36,25 +36,37 @@ export function InfraSourceConfigurationFormProvider({ getService }: FtrProvider
3636 return await testSubjects . find ( '~addLogColumnPopover' ) ;
3737 } ,
3838 async addTimestampLogColumn ( ) {
39- await ( await this . getAddLogColumnButton ( ) ) . click ( ) ;
39+ // try to open the popover
40+ const popover = await retry . try ( async ( ) => {
41+ await ( await this . getAddLogColumnButton ( ) ) . click ( ) ;
42+ return this . getAddLogColumnPopover ( ) ;
43+ } ) ;
44+
45+ // try to select the timestamp field
4046 await retry . try ( async ( ) => {
41- await (
42- await testSubjects . findDescendant (
43- '~addTimestampLogColumn' ,
44- await this . getAddLogColumnPopover ( )
45- )
46- ) . click ( ) ;
47+ await ( await testSubjects . findDescendant ( '~addTimestampLogColumn' , popover ) ) . click ( ) ;
4748 } ) ;
49+
50+ // wait for timestamp panel to show up
51+ await testSubjects . findDescendant ( '~systemLogColumnPanel:Timestamp' , await this . getForm ( ) ) ;
4852 } ,
4953 async addFieldLogColumn ( fieldName : string ) {
50- await ( await this . getAddLogColumnButton ( ) ) . click ( ) ;
54+ // try to open the popover
55+ const popover = await retry . try ( async ( ) => {
56+ await ( await this . getAddLogColumnButton ( ) ) . click ( ) ;
57+ return this . getAddLogColumnPopover ( ) ;
58+ } ) ;
59+
60+ // try to select the given field
5161 await retry . try ( async ( ) => {
52- const popover = await this . getAddLogColumnPopover ( ) ;
5362 await ( await testSubjects . findDescendant ( '~fieldSearchInput' , popover ) ) . type ( fieldName ) ;
5463 await (
5564 await testSubjects . findDescendant ( `~addFieldLogColumn:${ fieldName } ` , popover )
5665 ) . click ( ) ;
5766 } ) ;
67+
68+ // wait for field panel to show up
69+ await testSubjects . findDescendant ( `~fieldLogColumnPanel:${ fieldName } ` , await this . getForm ( ) ) ;
5870 } ,
5971 async getLogColumnPanels ( ) : Promise < WebElementWrapper [ ] > {
6072 return await testSubjects . findAllDescendant ( '~logColumnPanel' , await this . getForm ( ) ) ;
0 commit comments