Skip to content

Commit f3d9592

Browse files
authored
E2e wait for notebook2 (#2198)
* prevent unwanted errors in postgres container * use run all command instead of restarting kernel
1 parent d8e7bcc commit f3d9592

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

services/docker-compose.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,15 @@ services:
273273
- interactive_services_subnet
274274
- computational_services_subnet
275275
healthcheck:
276-
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
276+
test:
277+
[
278+
"CMD",
279+
"pg_isready",
280+
"--username",
281+
"${POSTGRES_USER}",
282+
"--dbname",
283+
"${POSTGRES_DB}",
284+
]
277285
interval: 15s
278286
retries: 5
279287
# NOTES: this is not yet compatible with portainer deployment but could work also for other containers

tests/e2e/tutorials/jupyters.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,12 @@ async function runTutorial() {
4848

4949

5050
// inside the first notebook, click Run all button
51-
const runAllButtonSelector = '#run_int > button:nth-child(4)';
52-
await utils.waitAndClick(nbIframe, runAllButtonSelector);
51+
const cellMenuSelector = '#menus > div > div > ul > li:nth-child(5) > a'
52+
await utils.waitAndClick(nbIframe, cellMenuSelector);
53+
const runAllCellsSelector = '#run_all_cells > a'
54+
await utils.waitAndClick(nbIframe, runAllCellsSelector);
5355
await tutorial.takeScreenshot("pressRunAllButtonNotebook");
5456

55-
// inside the first notebook, click confirm run all (NOTE: this dialog does not appear in headless mode)
56-
try {
57-
const confirmRunAllButtonSelector = 'body > div.modal.fade.in > div > div > div.modal-footer > button.btn.btn-default.btn-sm.btn-danger';
58-
await utils.waitAndClick(nbIframe, confirmRunAllButtonSelector, 10000);
59-
await tutorial.takeScreenshot("pressRunNotebookAfterConfirmation");
60-
} catch (err) {
61-
console.log("The confirmation dialog appears only in --demo mode.");
62-
}
63-
64-
6557
// now check that the input contains [4]
6658
console.log('Waiting for notebook results...');
6759
const finishedRunningCheckboxSelector = '#notebook-container > div:nth-child(5) > div.input > div.prompt_container > div.prompt.input_prompt';

0 commit comments

Comments
 (0)