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