parent
98b5c60c10
commit
eb27dc6169
@ -0,0 +1,41 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "6f7028b9-4d2c-4fa2-96ee-bfa77bbee434",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": ["print('1\\n' * 200)"]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "6f7028b9-4d2c-4fa2-96ee-bfa77bbee434",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": ["print('1\\n' * 20)"]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.7"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
import { IJupyterLabPageFixture } from '@jupyterlab/galata';
|
||||
|
||||
/**
|
||||
* Run the selected cell and advance.
|
||||
*/
|
||||
export async function runAndAdvance(
|
||||
page: IJupyterLabPageFixture
|
||||
): Promise<void> {
|
||||
await page.click(
|
||||
"//button[normalize-space(@title)='Run the selected cells and advance']"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for the kernel to be ready
|
||||
*/
|
||||
export async function waitForKernelReady(
|
||||
page: IJupyterLabPageFixture
|
||||
): Promise<void> {
|
||||
await page.waitForSelector('.jp-RetroKernelStatus-fade');
|
||||
await page.waitForFunction(() => {
|
||||
const status = window.document.getElementsByClassName(
|
||||
'jp-RetroKernelStatus'
|
||||
)[0];
|
||||
|
||||
if (!status) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const finished = status?.getAnimations().reduce((prev, curr) => {
|
||||
return prev && curr.playState === 'finished';
|
||||
}, true);
|
||||
return finished;
|
||||
});
|
||||
}
|
||||
Loading…
Reference in new issue