use helper function for smoke test (#15964)

This commit is contained in:
Vasu Bhog
2021-06-30 21:33:54 -07:00
committed by GitHub
parent 0e10e3e3ca
commit 7cf7ca5d15

View File

@@ -154,12 +154,7 @@ export class Notebook {
}
async waitForAllResults(): Promise<void> {
let cellIds: string[] = [];
await this.code.waitForElements('div.notebook-cell', false, result => {
cellIds = result.map(cell => cell.attributes['id']);
return true;
});
await this.waitForResults(cellIds);
await this.waitForResults(await this.getCellIds());
}
async waitForActiveCellResultsGone(): Promise<void> {
@@ -174,12 +169,7 @@ export class Notebook {
}
async waitForAllResultsGone(): Promise<void> {
let cellIds: string[] = [];
await this.code.waitForElements('div.notebook-cell', false, result => {
cellIds = result.map(cell => cell.attributes['id']);
return true;
});
await this.waitForResultsGone(cellIds);
await this.waitForResultsGone(await this.getCellIds());
}
async waitForTrustedElements(): Promise<void> {