diff --git a/e2e-tests/cypress/e2e/connect.cy.js b/e2e-tests/cypress/e2e/connect.cy.js index 4339369d1..556241367 100644 --- a/e2e-tests/cypress/e2e/connect.cy.js +++ b/e2e-tests/cypress/e2e/connect.cy.js @@ -1,3 +1,5 @@ +const path = require('path'); + describe('Initialization', () => { it('successfully loads', () => { cy.visit('http://localhost:3000'); @@ -29,9 +31,9 @@ describe('Initialization', () => { cy.visit('http://localhost:3000'); cy.contains('Connections'); - cy.realPress("F1"); - cy.realType("Close all"); - cy.realPress("Enter"); + cy.realPress('F1'); + cy.realType('Close all'); + cy.realPress('Enter'); cy.get('[data-testid=ConnectionList_buttonNewConnection]').click(); cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL'); @@ -60,9 +62,9 @@ describe('Initialization', () => { cy.visit('http://localhost:3000'); cy.contains('Connections'); - cy.realPress("F1"); - cy.realType("Close all"); - cy.realPress("Enter"); + cy.realPress('F1'); + cy.realType('Close all'); + cy.realPress('Enter'); cy.get('[data-testid=ConnectionList_buttonNewConnection]').click(); cy.get('[data-testid=ConnectionDriverFields_connectionType]').select('MySQL'); @@ -73,12 +75,16 @@ describe('Initialization', () => { cy.get('[data-testid=ConnectionTab_tabSshTunnel]').click(); cy.get('[data-testid=ConnectionSshTunnelFields_useSshTunnel]').check(); - cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear().type('root'); - cy.get('[data-testid=ConnectionSshTunnelFields_sshPassword]').clear().type('root'); + cy.get('[data-testid=ConnectionSshTunnelFields_sshMode]').select('Key file'); + cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').clear() + cy.get('[data-testid=ConnectionSshTunnelFields_sshLogin]').type('root'); + cy.get('[data-testid=ConnectionSshTunnelFields_sshKeyfile]') + .clear() + .type(path.join(Cypress.config('fileServerFolder'), 'cypress', 'e2e', 'mykey')); if (runOnCI) { - cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-login'); + cy.get('[data-testid=ConnectionSshTunnelFields_sshHost]').clear().type('mysql-ssh-keyfile'); } else { - cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16006'); + cy.get('[data-testid=ConnectionSshTunnelFields_sshPort]').clear().type('16008'); } cy.get('[data-testid=ConnectionTab_buttonSave]').click(); cy.get('[data-testid=ConnectionTab_buttonConnect]').click();