@@ -340,6 +340,32 @@ public QueryChartDialog selectTrendline(String field)
340340 return this ;
341341 }
342342
343+ public QueryChartDialog setTrendlineProvidedParameters (String field )
344+ {
345+ clickFieldOptions ("Trendline" ); // open the popover
346+ if (field != null )
347+ getTrendlineProvidedParametersSelect ().select (field );
348+ else
349+ getTrendlineProvidedParametersSelect ().clearSelection ();
350+ clickFieldOptions ("Trendline" ); // close the popover
351+ return this ;
352+ }
353+
354+ public List <String > getTrendlineProvidedParametersOptions ()
355+ {
356+ clickFieldOptions ("Trendline" ); // open the popover
357+ List <String > options = getTrendlineProvidedParametersSelect ().getOptions ();
358+ clickFieldOptions ("Trendline" ); // close the popover
359+ return options ;
360+ }
361+
362+ private ReactSelect getTrendlineProvidedParametersSelect ()
363+ {
364+ // can't use elementCache() because the popover is outside the dialog
365+ Locator loc = Locator .tag ("div" ).withChild (Locator .tagContainingText ("label" , "Provided Parameters" ));
366+ return ReactSelect .finder (getDriver ()).find (loc .waitForElement (getDriver (), 1500 ));
367+ }
368+
343369 public String getSelectedSeries ()
344370 {
345371 return elementCache ().reactSelectByLabel ("Series" ).getValue ();
@@ -399,6 +425,12 @@ public boolean isPreviewPresent()
399425 elementCache ().svgLoc .existsIn (elementCache ().previewContainer ());
400426 }
401427
428+ public List <String > getPreviewErrors ()
429+ {
430+ return elementCache ().svgErrorLoc .findElements (elementCache ().previewContainer ()).stream ()
431+ .map (WebElement ::getText ).toList ();
432+ }
433+
402434 public WebElement getSvgChart ()
403435 {
404436 WebDriverWrapper .waitFor (()-> isPreviewPresent (),
@@ -534,6 +566,7 @@ public String grayTextPreviewInstruction()
534566
535567 private final Locator previewBodyLoc = Locator .tagWithClass ("div" , "chart-builder-preview-body" );
536568 private final Locator svgLoc = Locator .tagWithClass ("div" , "svg-chart__chart" ).childTag ("svg" );
569+ private final Locator svgErrorLoc = Locator .tagWithClass ("div" , "svg-chart__chart" ).childTag ("div" );
537570
538571 public WebElement svg ()
539572 {
0 commit comments