Skip to content

E2e wait for notebook2 #2198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,15 @@ services:
- interactive_services_subnet
- computational_services_subnet
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"]
test:
[
"CMD",
"pg_isready",
"--username",
"${POSTGRES_USER}",
"--dbname",
"${POSTGRES_DB}",
]
interval: 15s
retries: 5
# NOTES: this is not yet compatible with portainer deployment but could work also for other containers
Expand Down
16 changes: 4 additions & 12 deletions tests/e2e/tutorials/jupyters.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,12 @@ async function runTutorial() {


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

// inside the first notebook, click confirm run all (NOTE: this dialog does not appear in headless mode)
try {
const confirmRunAllButtonSelector = 'body > div.modal.fade.in > div > div > div.modal-footer > button.btn.btn-default.btn-sm.btn-danger';
await utils.waitAndClick(nbIframe, confirmRunAllButtonSelector, 10000);
await tutorial.takeScreenshot("pressRunNotebookAfterConfirmation");
} catch (err) {
console.log("The confirmation dialog appears only in --demo mode.");
}


// now check that the input contains [4]
console.log('Waiting for notebook results...');
const finishedRunningCheckboxSelector = '#notebook-container > div:nth-child(5) > div.input > div.prompt_container > div.prompt.input_prompt';
Expand Down