mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
(cherry picked from commit cbca869e8f
)
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
parent
5b0b35e789
commit
5d1e96aca3
1 changed files with 14 additions and 6 deletions
|
@ -450,19 +450,27 @@ export class VisualBuilderPageObject extends FtrService {
|
|||
return await tableView.getVisibleText();
|
||||
}
|
||||
|
||||
private async switchTab(visType: string, tab: string) {
|
||||
const testSubj = `${visType}Editor${tab}Btn`;
|
||||
await this.retry.try(async () => {
|
||||
await this.testSubjects.click(testSubj);
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
if (!(await (await this.testSubjects.find(testSubj)).elementHasClass('euiTab-isSelected'))) {
|
||||
throw new Error('tab not active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public async clickPanelOptions(tabName: string) {
|
||||
await this.testSubjects.click(`${tabName}EditorPanelOptionsBtn`);
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
await this.switchTab(tabName, 'PanelOptions');
|
||||
}
|
||||
|
||||
public async clickDataTab(tabName: string) {
|
||||
await this.testSubjects.click(`${tabName}EditorDataBtn`);
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
await this.switchTab(tabName, 'Data');
|
||||
}
|
||||
|
||||
public async clickAnnotationsTab() {
|
||||
await this.testSubjects.click('timeSeriesEditorAnnotationsBtn');
|
||||
await this.header.waitUntilLoadingHasFinished();
|
||||
await this.switchTab('timeSeries', 'Annotations');
|
||||
}
|
||||
|
||||
public async clickAnnotationsAddDataSourceButton() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue