[bitnami/jupyterhub] Improve jupyter hub testing inetability (#26869)

Signed-off-by: Rafael Rios Saavedra <rrios@vmware.com>
This commit is contained in:
Rafael Ríos Saavedra
2024-06-05 15:37:38 +02:00
committed by GitHub
parent f234976ace
commit 308ecd12cd
3 changed files with 5 additions and 2 deletions

View File

@@ -8,4 +8,5 @@ module.exports = {
setupNodeEvents(on, config) {},
baseUrl: 'http://localhost/',
},
retries: 5
}

View File

@@ -11,6 +11,7 @@ it('allows to upload and execute a python notebook', () => {
const notebookName = `notebook_template_${random}.ipynb`;
const userName = Cypress.env('username');
cy.clearCookies()
cy.login();
cy.visit(`/user/${userName}/tree/tmp`);
cy.contains('Upload').should('be.visible');
@@ -29,6 +30,7 @@ it('allows to upload and execute a python notebook', () => {
it('allows generating an API token', () => {
cy.session('test_token', () => {
cy.clearCookies()
cy.login();
cy.visit('/hub/token');
// We need to wait until the background API request is finished

View File

@@ -20,13 +20,13 @@ for (const command of ['click']) {
Cypress.Commands.add(
'login',
(username = Cypress.env('username'), password = Cypress.env('password')) => {
cy.visit('/hub/login');
cy.visit('/');
cy.get('#username_input').type(username);
cy.get('#password_input').type(password);
cy.get('#login_submit').click();
// The authentication is not completed until the page is rendered
// Accessing the for the first time may take extra-time: "Your server is starting up"
cy.contains('Launcher', {timeout: 120000});
cy.contains('Launcher', {timeout: 60000});
}
);