diff --git a/notebooks/computational_resources.ipynb b/notebooks/computational_resources.ipynb index db6f9e319..418827408 100644 --- a/notebooks/computational_resources.ipynb +++ b/notebooks/computational_resources.ipynb @@ -56,27 +56,6 @@ "display(resources1)\n", "display(resources2)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ee9ed2e5", - "metadata": {}, - "outputs": [], - "source": [ - "db = awb.databases.NewComputationalResourcesDatabaseWidget()\n", - "display(db)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "11b53118", - "metadata": {}, - "outputs": [], - "source": [ - "print(db.code_selector.value)" - ] } ], "metadata": { diff --git a/tests_notebooks/test_notebooks.py b/tests_notebooks/test_notebooks.py index c18344d0f..4c710d2cd 100644 --- a/tests_notebooks/test_notebooks.py +++ b/tests_notebooks/test_notebooks.py @@ -128,50 +128,24 @@ def test_computational_resources_code_setup( # Select daint.cscs.ch domain driver.find_element(By.XPATH, '(//option[text()="daint.cscs.ch"])[1]').click() - # Select computer multicore - driver.find_element(By.XPATH, '(//option[text()="multicore"])[1]').click() + # Select computer mc + driver.find_element(By.XPATH, '(//option[text()="mc"])[1]').click() - # select code pw-7.0-multicore - driver.find_element(By.XPATH, '(//option[text()="pw-7.0-multicore"])[1]').click() + # select code + driver.find_element(By.XPATH, '(//option[text()="cp2k-9.1"])[1]').click() # fill the SSH username driver.find_element( By.XPATH, "(//label[text()='username:'])[1]/following-sibling::input" ).send_keys("dummyuser") - - # click the quick setup - driver.find_element(By.XPATH, '(//button[text()="Quick Setup"])[1]').click() - time.sleep(1.0) - - # check the new code pw-7.0@daint-mc is in code list - output = aiidalab_exec("verdi code list").decode().strip() - assert "pw-7.0@daint-mc" in output - - # Set the second code of the same computer - # issue https://github.com/aiidalab/aiidalab-widgets-base/issues/416 - # click the "Setup new code" button - driver.find_element(By.XPATH, '(//button[text()="Setup new code"])[2]').click() - - # Select daint.cscs.ch domain - driver.find_element(By.XPATH, '(//option[text()="daint.cscs.ch"])[2]').click() - - # Select computer multicore - driver.find_element(By.XPATH, '(//option[text()="multicore"])[2]').click() - - # select code pw-7.0-multicore - driver.find_element(By.XPATH, '(//option[text()="dos-7.0-multicore"])[2]').click() - - # fill the SSH username - # Get the element of index 3 which is the SSH username of second widget - # the one of index 2 is the SSH username in detail setup of the first widget. driver.find_element( - By.XPATH, "(//label[text()='username:'])[3]/following-sibling::input" + By.XPATH, "(//label[text()='Slurm account'])[1]/following-sibling::input" ).send_keys("dummyuser") # click the quick setup - driver.find_element(By.XPATH, '(//button[text()="Quick Setup"])[2]').click() + driver.find_element(By.XPATH, '(//button[text()="Quick Setup"])').click() time.sleep(1.0) # check the new code pw-7.0@daint-mc is in code list output = aiidalab_exec("verdi code list").decode().strip() - assert "dos-7.0@daint-mc" in output + assert "cp2k-9.1@daint-mc" in output